Commit fce7a71a by Jaxon

fix: 修复 element版本引发的次级问题:

tableColumn 变动频繁导致页面无法正常渲染和点击
1 parent 10eb46d1
<!-- 商品上架 --> <!-- 商品上架 -->
<template> <template>
<d2-container class="shelf-product-wrapper"> <d2-container v-loading="loading.page" class="shelf-product-wrapper">
<template #header> <template #header>
<div class="header"> <div v-if="table.formSchema.length" class="header">
<d2-search class="show-search" <d2-search class="show-search"
label-width="100px" label-width="100px"
:form-data="table.formSchema" :form-data="table.formSchema"
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
</div> </div>
</div> </div>
</template> </template>
<div class="d2-container-content"> <div v-if="table.tableParams.tableColumns.length" class="d2-container-content">
<d2-table-header :left-span="24"> <d2-table-header :left-span="24">
<template #left> <template #left>
<div class="table-title-wrapper"> <div class="table-title-wrapper">
...@@ -114,6 +114,9 @@ export default { ...@@ -114,6 +114,9 @@ export default {
mixins: [reportTrackFunMixin], mixins: [reportTrackFunMixin],
data() { data() {
return { return {
loading: {
page: false,
},
table: { table: {
pageSizes: [10, 50, 100], pageSizes: [10, 50, 100],
hasNum: false, hasNum: false,
...@@ -156,11 +159,16 @@ export default { ...@@ -156,11 +159,16 @@ export default {
}; };
}, },
async mounted() { async mounted() {
this.trackMenu(); this.loading.page = true;
await this.getBaseData(); try {
await this.getHeaderSummary(); this.trackMenu();
this.table.formSchema = await getTableFormSchema(); await this.getBaseData();
this.table.tableParams.tableColumns = await getTableColumns(); await this.getHeaderSummary();
this.table.formSchema = await getTableFormSchema();
this.table.tableParams.tableColumns = await getTableColumns();
} finally {
this.loading.page = false;
}
}, },
methods: { methods: {
...mapActions({ ...mapActions({
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!