t-waterfall-item
WaterfallItem 瀑布流项
组件介绍
t-waterfall-item 是瀑布流的子组件,用于承载单个卡片并参与列布局。配合 t-waterflow 使用实现瀑布流布局效果。
平台兼容
| Harmony | H5 | Android | iOS | 小程序 | UTS |
|---|---|---|---|---|---|
| ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
基础用法
t-waterfall-item 作为 t-waterflow 的子组件使用,用于包裹每个瀑布流项的内容。
vue
<template>
<t-waterflow :loadmore="true" @scrolltolower="loadMore">
<t-waterfall-item v-for="(item, index) in list" :key="index">
<view class="card">
<image :src="item.image" mode="widthFix"></image>
<text>{{ item.title }}</text>
</view>
</t-waterfall-item>
</t-waterflow>
</template>
<script setup>
const list = ref<UTSJSONObject[]>([])
function loadMore() {
}
</script>Props
| 属性名 | 说明 | 类型 | 默认值 |
|---|---|---|---|
path | 点击组件后跳转的页面路径 | string | '' |
hover | 是否启用点击效果 | boolean | false |
type | 组件主题类型 | string | '' |
disabled | 是否禁用 | boolean | false |
effect | 组件显示主题 | string | '' |
size | 组件尺寸 | string | '' |
Slots
| 插槽名 | 说明 |
|---|---|
default | 瀑布流项内容 |