Skip to content
On this page

点击反馈

通过clickable 属性开启

html
<uv-cell clickable title="test" value="内容"/>

卡片式

通过使用uv-cell-group 组件包裹,并传入card属性即可,两边需要间隙可以开启gap属性

html
<uv-cell-group card gap>
  <uv-cell title="test" value="内容"/>
  <uv-cell
    title="test"
    value="内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容"
  />
</uv-cell-group>

字体大小

通过size 设置

html
<uv-cell size="16" title="test" value="内容"/>

添加图标

通过icon 设置

html
<uv-cell icon="add" icon-color="#4fc0a7" size="16" title="test" value="内容"/>

显示箭头

通过arrow 设置,默认右边,通过down设置为下边

html
<uv-cell-group card>
  <uv-cell
    arrow
    title="test"
    value="内容"
  />
  <uv-cell
    arrow
    arrow-direction="down"
    title="test"
    value="内容"
  />
</uv-cell-group>

使用插槽

title设置左边的标题插槽,value设置右边内容插槽

html
<uv-cell>
  <template #title>
    自定义title
  </template>
  <template #value>
    自定义value
  </template>
</uv-cell>

props

属性含义类型默认值
title标题Stringdefault
value右边的值[String,Number,Boolean]-
bgColor背景颜色String'#fff'
size字体大小[String,Number]'14'
icon图标名称String-
iconColor图标颜色String-
iconSize图标大小Number16
arrow是否显示箭头Booleanfalse
arrowDirection箭头位置String'right'
clickable点击反馈Booleanfalse
labelWidth标题的宽度Number-
labelPosition标题的对齐方式String'left'

events

事件名称含义参数
click点击事件-

css变量

css
--uv-cell-after-right: 15px;
  --uv-cell-after-left: 15px;
  --uv-cell-after-border-bottom: 1px solid #f5f6f7;
  --uv-cell-clickable-bg-color: #f2f3f5;
  --uv-cell-content-padding: 10px 16px;
  --uv-cell-content-title-margin-right: 20px;
  --uv-cell-content-value-color: #969799;
  --uv-cell-content-value-slot-text-align: right;
  --uv-cell-content-justify-content: space-between;
  --uv-cell-tips-color: #ee0a24;
  --uv-cell-tips-font-size: 13px;

Released under the MIT License.