# tui-list-view 列表 开源组件

介绍

列表外层盒子,可结合 tui-list-cell 组件使用

# 引入

# uni-app引入

第一种,手动引入(可全局引入)

import tuiListView from "@/components/thorui/tui-list-view/tui-list-view.vue"
export default {
	components:{
		tuiListView
	}
}

第二种,开启easycom组件模式,如果不了解如何配置,可先查看 官网文档 (opens new window)

# uni-app版本平台差异说明

App-Nvue App-vue H5 微信小程序 支付宝小程序 百度小程序 字节小程序 QQ小程序
升级中

# 微信小程序引入(可在app.json中全局引入)

{
  "usingComponents": {
    "tui-list-view": "/components/thorui/tui-list-view/tui-list-view"
  }
}

# 代码演示

部分功能演示,具体可参考示例程序以及文档API。

设置标题

通过 title 属性设置标题。

<tui-list-view title="不带箭头">
	<tui-list-cell>不带箭头</tui-list-cell>
	<tui-list-cell>不带箭头</tui-list-cell>
	<tui-list-cell>不带箭头</tui-list-cell>
</tui-list-view>
设置背景色

通过 backgroundColor 属性设置背景色。

<tui-list-view backgroundColor="#fff">
	<view>设置背景色为白色</view>
</tui-list-view>

# Slots

插槽名称 说明
default 标签内自定义内容展示

# Props

属性名 类型 说明 默认值
title String 列表标题 -
color String 标题颜色 #666
size Number 标题字体大小,单位rpx 30
backgroundColor String 背景色 transparent
unlined String 去掉线条,可设置:top(去掉上边线条),bottom(去掉下边线条),all(去掉所有线条) -
marginTop String margin-top值 0
radius V2.2.0+ Number,String 圆角值,单位rpx 0

# Events

事件名 说明 回调参数
- - -

# 预览

# 特别说明

  • 该组件为 开源组件,uni-app版所有用户均可免费使用。
  • 微信小程序原生版仅开源至v1.4.2,后续版本需开通会员才可获取使用。

# 线上程序扫码预览

ThorUI组件库 H5二维码 ThorUI示例
ThorUI组件库小程序码 H5二维码 ThorUI示例小程序码
Last Updated: 7/21/2023, 2:12:46 PM