使用 CSS flex(横向) 实现瀑布流布局(需要后端配合数据分左右)

核心代码(提供思路)

<up-waterfall v-model="flowList">
    <template v-slot:left="{leftList}">
        <view v-for="(item, index) in leftList" :key="index">
            <!-- 这里编写您的内容,item为您传递给v-model的数组元素 -->
        </view>
    </template>
    <template v-slot:right="{rightList}">
        <view v-for="(item, index) in rightList" :key="index">
            <!-- 这里编写您的内容,item为您传递给v-model的数组元素 -->
        </view>
    </template>
</up-waterfall>

 

posted @ 2025-01-22 17:25  xuanPhoto  阅读(82)  评论(0)    收藏  举报