Skip to content

SeeCell 单元格

列表项组件,用于展示信息、设置项、表单项等场景。

平台支持

平台支持情况
H5
微信小程序
支付宝小程序
APP

基础用法

vue
<template>
  <see-cell title="标题" value="内容" />
  <see-cell title="标题" value="带箭头" is-link />
</template>

带图标

通过 icon 属性设置左侧图标,可通过 iconSize 自定义图标大小。

vue
<template>
  <see-cell title="设置" icon="⚙️" value="进入" is-link />
  <see-cell title="消息" icon="🔔" value="99+" />
</template>

带描述

通过 label 属性设置描述文字,展示在标题下方。

vue
<template>
  <see-cell title="标题" label="这是一段描述信息" value="内容" />
  <see-cell title="标题" label="较长的描述信息会自动换行显示" is-link />
</template>

必填字段

设置 isRequired 显示表单必填星号。

vue
<template>
  <see-cell title="用户名" value="请输入" is-required />
  <see-cell title="手机号" value="请输入" is-required is-link />
</template>

页面跳转

设置 to 属性后,点击单元格会自动跳转到对应页面。

vue
<template>
  <see-cell title="个人中心" is-link to="/pages/index/index" />
</template>

自定义插槽

组件提供了 icontitlevalueright 四个插槽用于自定义内容。

vue
<template>
  <see-cell title="用户头像">
    <template #right>
      <image src="/static/avatar.png" class="avatar" />
    </template>
  </see-cell>

  <see-cell>
    <template #title>
      <text style="color: #07c160; font-weight: bold;">自定义标题</text>
    </template>
    <template #value>
      <text style="color: #ee0a24;">自定义值</text>
    </template>
  </see-cell>
</template>

无边框

设置 borderfalse 隐藏下边框。

vue
<template>
  <see-cell title="无下边框" value="内容" :border="false" />
</template>

居中对齐

设置 isCenter 使内容居中显示。

vue
<template>
  <see-cell title="居中显示" value="内容" is-center />
</template>

点击反馈

通过 clickEffect 属性控制点击反馈效果,支持 backgroundopacitynone 三种模式。

vue
<template>
  <see-cell title="背景反馈" click-effect="background" />
  <see-cell title="透明度反馈" click-effect="opacity" />
  <see-cell title="无反馈" click-effect="none" />
</template>

Props

属性说明类型默认值
title标题string-
value值/右侧文字string-
label描述/副标题string-
icon左侧图标名称string-
iconSize图标大小string'40rpx'
isLink是否显示右侧箭头booleanfalse
to跳转 URL(设置后点击自动跳转)string-
isRequired是否显示表单必填星号booleanfalse
border是否显示下边框booleantrue
height单元格高度string-
clickEffect点击反馈效果'background' | 'opacity' | 'none''background'
titleWidth标题宽度string'auto'
isCenter是否居中booleanfalse

Events

事件名说明回调参数
onClick点击单元格时触发-

Slots

插槽名说明
icon自定义左侧图标
title自定义标题内容
value自定义右侧值内容
right自定义右侧区域

辽 ICP 备 2025070134 号