Skip to content

t-waterfall-item

WaterfallItem 瀑布流项

组件介绍

t-waterfall-item 是瀑布流的子组件,用于承载单个卡片并参与列布局。配合 t-waterflow 使用实现瀑布流布局效果。

平台兼容

HarmonyH5AndroidiOS小程序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是否启用点击效果booleanfalse
type组件主题类型string''
disabled是否禁用booleanfalse
effect组件显示主题string''
size组件尺寸string''

Slots

插槽名说明
default瀑布流项内容