vue element plus Text

文本的常见操作

基础用法#

由 type 属性来选择 Text 的类型。

DefaultPrimarySuccessInfoWarningDanger

尺寸#

使用 size 属性配置尺寸,可选的尺寸大小有: large, default 或 small

LargeDefaultSmall

省略#

通过 truncated 属性,在文本超过视图或最大宽度设置时展示省略符。 通过 line-clamp 属性控制多行的样式

Self element set width 100px

Squeezed by parent element

The -webkit-line-clamp CSS property

allows limiting of the contents of

a block to the specified number of lines.

覆盖#

使用属性 tag 覆盖元素

span

This is a paragraph.

Bold

Italic

This is subscript

This is superscript

Inserted

Deleted

Marked

混合使用#

混合使用 Text 组件

Element-Plus

Rate

This is text mixed icon and component Button

API#

Attributes#

属性名 描述 类型 默认值
type 类型 enum ---
size 大小 enum default
truncated 显示省略号 boolean false
line-clamp 2.4.0 最大行数 string / number -
tag 自定义元素标签 string span

Slots#

名称 详情
default 默认内容

源代码#

组件 • 文档

贡献者

相关推荐
Elcker6 小时前
YnuoAgent(依诺):一个 npm 包,跑起属于自己的 AI 研发平台
前端·人工智能·npm
酷炫码神7 小时前
Day 8|Vue3 响应式:告别手动操作 DOM,让数据驱动界面
javascript·vue.js·ecmascript
计算机魔术师7 小时前
发现2天,修复2个月:AI挖穿PHP后,卡兹克讲透攻防时间差
前端
风骏时光牛马7 小时前
测试标题001
前端
IT_陈寒7 小时前
Java性能优化完全指南
前端·人工智能·后端
电子IT笔记8 小时前
对接群晖NAS,上传和删除踩坑记录
前端·后端
计算机魔术师8 小时前
半年前说不缺钱,半年后150亿美元超募
前端
用户5708462574408 小时前
自动化发布器里最贵的 Bug:返回成功,但什么都没发生
前端
爱吃馒头不吃辣8 小时前
加一道题,改一天代码:题库即数据的降维打击
前端·架构
aiks_yuan8 小时前
Requestly规则使用技巧:前端联调、接口Mock与网络请求调试实战
前端