refactor(home): 替换瀑布流组件

- 移除 masonry-wall 组件
- 使用自定义 WaterfallFlow 组件替换- 保持原有布局和样式不变
This commit is contained in:
xingyy 2025-02-14 10:45:06 +08:00
parent 0eafa906e6
commit 0c2b973419

View File

@ -3,6 +3,7 @@ import { ref } from 'vue'
import { goodStore } from "@/stores/goods" import { goodStore } from "@/stores/goods"
import DetailPopup from '../DetailPopup/index.vue' import DetailPopup from '../DetailPopup/index.vue'
import MasonryWall from '@yeger/vue-masonry-wall' import MasonryWall from '@yeger/vue-masonry-wall'
import WaterfallFlow from '@/components/WaterfallFlow.vue'
const { const {
itemList, itemList,
pageRef, pageRef,
@ -59,7 +60,7 @@ const openShow = async (item) => {
@load="loadMore" @load="loadMore"
> >
<div class="w-full flex gap-[16px]"> <div class="w-full flex gap-[16px]">
<masonry-wall :items="itemList" :ssr-columns="2" :maxColumns="2" :minColumns="2" :gap="5"> <WaterfallFlow :items="itemList" :column-count="2">
<template #default="{ item, index }"> <template #default="{ item, index }">
<div <div
@click="openShow(item)" @click="openShow(item)"
@ -92,7 +93,7 @@ const openShow = async (item) => {
</div> </div>
</div> </div>
</template> </template>
</masonry-wall> </WaterfallFlow>
</div> </div>
</van-list> </van-list>
</van-pull-refresh> </van-pull-refresh>