|
@@ -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>
|
|
|
|