Browse Source

🎈 perf(product-list): 修改展示骨架屏参数

陈雪 1 month ago
parent
commit
f6f3acc8d3
1 changed files with 2 additions and 3 deletions
  1. 2 3
      src/components/product-list/product-list.vue

+ 2 - 3
src/components/product-list/product-list.vue

@@ -1,5 +1,5 @@
 <template>
-  <view v-if="isLoading" class="product-list-container">
+  <view v-if="showSkeleton" class="product-list-container">
     <view v-for="k in skeletonCount" :key="k" class="skeleton-item">
       <wd-skeleton
         :row-col="[
@@ -24,11 +24,10 @@
   defineOptions({
     name: 'ProductList',
   })
-  withDefaults(defineProps<{ skeletonCount?: number }>(), {
+  withDefaults(defineProps<{ skeletonCount?: number; showSkeleton?: boolean }>(), {
     skeletonCount: 2,
   })
 
-  const isLoading = ref(true)
   const productList = ref<ProductSimpleType[]>(data)
 </script>