Skip to content

List 列表 ​

使用 fui-list 组织列表标题、内容和底部说明,使用 fui-list-cell 显示列表项。

支持平台 ​

以下为官网文档所列的平台支持情况,具体功能及版本限制请参见本页的平台说明。

App-vueApp-nvue微信小程序支付宝小程序百度小程序字节小程序QQ小程序H5PC快手小程序钉钉小程序
✓✓✓✓✓✓✓✓✓✓✓

基础用法 ​

vue
<!-- 设置列表 -->
<fui-list title="设置">
  <!-- 可点击列表项 -->
  <fui-list-cell arrow :index="0">
    <text>账号设置</text>
  </fui-list-cell>
</fui-list>

列表属性 ​

属性类型说明官网默认值
marginTopNumber、String顶部外边距,单位 rpx0
titleString列表标题空
colorString标题颜色#7F7F7F
sizeNumber、String标题字号,单位 rpx28
paddingArray标题内边距['32rpx', '32rpx', '20rpx', '32rpx']
backgroundString标题背景色transparent
footerString底部说明文字空
footerColorString底部文字颜色#7F7F7F
footerSizeNumber、String底部文字字号,单位 rpx28
footerPaddingArray底部文字内边距['20rpx', '32rpx', '0']
topBorderBoolean是否显示顶部边框true
bottomBorderBoolean是否显示底部边框false
borderColorString边框颜色#EEEEEE
topLeftNumber、String上边框左侧偏移,单位 rpx0
topRightNumber、String上边框右侧偏移,单位 rpx0
bottomLeftNumber、String下边框左侧偏移,单位 rpx0
bottomRightNumber、String下边框右侧偏移,单位 rpx0

列表项属性 ​

属性类型说明官网默认值
paddingArray内容内边距,nvue 右侧内边距有平台限制['32rpx', '32rpx']
marginTopNumber、String上外边距,单位 rpx0
marginBottomNumber、String下外边距,单位 rpx0
backgroundString列表项背景色#fff
highlightBoolean是否显示点击态true
arrowBoolean是否显示右侧箭头false
arrowColorString箭头颜色#B2B2B2
topBorderBoolean是否显示顶部边框false
bottomBorderBoolean是否显示底部边框true
borderColorString边框颜色#EEEEEE
topLeftNumber、String上边框左侧偏移,单位 rpx0
topRightNumber、String上边框右侧偏移,单位 rpx0
bottomLeftNumber、String下边框左侧偏移,单位 rpx32
bottomRightNumber、String下边框右侧偏移,单位 rpx0
radiusString列表项圆角0
indexNumber点击事件携带的索引0

事件 ​

事件说明回调参数
click(fui-list-cell)点击列表项{ index }

列表容器 fui-list 的源码未声明自定义事件。

平台及版本说明 ​

表中为官网列出的默认显示值。本地 fui-list-cell 的部分 props 初始值为空或 -1,运行时会读取全局配置或样式变量;nvue 和其他平台的背景及边框处理有所不同。

插槽 ​

插槽说明
default列表主体内容