Skip to content

Text 文本

介绍

用于展示文本内容,支持基础样式配置,提供部分额外样式定制能力。

基础用法

html
<vd-text value="文本内容" />
<vd-text>文本内容</vd-text>

颜色主题

通过 type 设置文本颜色主题。

html
<vd-text type="primary">文本内容</vd-text>
<vd-text type="success">文本内容</vd-text>
<vd-text type="warning">文本内容</vd-text>
<vd-text type="danger">文本内容</vd-text>

API

Props

参数说明类型默认值
value内容string-
color颜色string-
size字体大小number | string-
bold是否粗体booleanfalse
line-height行高number | string-
lines最大行数,超出部分省略号显示number | string-
decoration文本装饰none overline underline line-through-
breakword是否允许单词断开换行booleanfalse
clickable是否可点击booleanfalse

代替原始 Props

参数说明类型默认值
custom-id根节点idstring-
custom-class根节点类名ClassValue-
custom-style根节点样式StyleValue-

Events

事件名说明回调参数
click点击时触发MouseEvent

Slots

名称说明
default自定义内容

赣ICP备2025061025号-1