Commit fce7a71a by Jaxon

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

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