vue element plus Text

文本的常见操作

基础用法#

type 属性来选择 Text 的类型。

DefaultPrimarySuccessInfoWarningDanger

尺寸#

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

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 默认内容

源代码#

组件文档

贡献者

相关推荐
To_OC3 小时前
后端接口还没交付,前端如何独立把整套业务跑通
前端·react.js·全栈
王琦03184 小时前
WEB服务
前端
霹雳桃4 小时前
Vue3 + Vite 构建版本注入实战:一份 version.json 终结「线上到底是哪一版」
前端
黄金决明子4 小时前
浏览器Window底层操作全解
前端·javascript
ydyd202604214 小时前
设备OEE怎么提升?数据采集+分析优化的完整方案
java·服务器·前端
(╹◡╹)5 小时前
11.RK3588本地大模型内存评估优化
java·linux·前端
电气研究所5 小时前
Java + Redis 实现工业设备告警去抖,避免变频器故障重复推送
java·前端
AI视觉网奇5 小时前
cannot import name ‘model_urls‘ from ‘torchvision.models.resnet‘
linux·前端·javascript
小锋java12345 小时前
【技术专题】Vue3 - 生命周期
vue.js·vite