Преглед на файлове

移除商品管理模块懒加载表格

WanGxC преди 6 месеца
родител
ревизия
8fcd904f21

+ 1 - 4
src/views/product-manage/competitor-monitor/index.vue

@@ -60,11 +60,8 @@ const statusOptions = [
   { label: '下架', value: 10 }
 ];
 
-const isTableReady = ref(false);
-
 onBeforeMount(async () => {
   await fetchOptions(); // 确保选项数据加载完成
-  isTableReady.value = true; // 数据加载完成后设置为 true
 });
 
 async function fetchOptions() {
@@ -185,7 +182,7 @@ async function resetParameter() {
         </div>
       </div>
       <el-divider ref="dividerContainer" style="margin: 20px 0 12px 0;" />
-      <div v-if="isTableReady" :style="{ height: tableHeight + 'px' }">
+      <div :style="{ height: tableHeight + 'px' }">
         <DataTable ref="table" />
       </div>
     </el-card>

+ 1 - 4
src/views/product-manage/product-monitor/index.vue

@@ -62,11 +62,8 @@ const statusOptions = [
   { label: '下架', value: 10 }
 ];
 
-const isTableReady = ref(false);
-
 onBeforeMount(async () => {
   await fetchOptions(); // 确保选项数据加载完成
-  isTableReady.value = true; // 数据加载完成后设置为 true
 });
 
 async function fetchOptions() {
@@ -203,7 +200,7 @@ async function resetParameter() {
         </div>
       </div>
       <el-divider ref="dividerContainer" style="margin: 20px 0 12px 0;" />
-      <div v-if="isTableReady" :style="{ height: tableHeight + 'px' }">
+      <div :style="{ height: tableHeight + 'px' }">
         <DataTable ref="table" />
       </div>
     </el-card>

+ 0 - 1
src/views/store-manage/online-merchandise/component/DataTableSlot.vue

@@ -33,7 +33,6 @@ async function goto() {
   }
   
   const res: any = await useResponse(api.getDetail, query )
-  console.log("(DataTableSlot.vue: 36)=> res", res);
   
   const routeUrl = router.resolve({
     path: '/product/comment',