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

源代码#

组件文档

贡献者

相关推荐
神奇的程序员9 小时前
我的软件冲进苹果商店下载榜前 50 了
前端
阳光是sunny10 小时前
别再被 worktree 绕晕了!AI 编程时代你必须掌握的 Git 隔离神器
前端·人工智能·后端
万少11 小时前
万少的博客 - 技术分享与解决方案
前端·javascript·后端
尘世中一位迷途小书童13 小时前
用 Cesium 撸了一个森林火情监控大屏,弧线、粒子、发光效果都齐了
前端·javascript
IT_陈寒14 小时前
垃圾回收器选错了,我的Java服务内存炸了
前端·人工智能·后端
月光下的丝瓜15 小时前
Flutter 国内安装指南
前端·flutter
先吃饱再说15 小时前
JavaScript中`this` 的“千层套路”:从默认绑定到箭头函数的五种指向
javascript
玄星啊15 小时前
AI 编程的第 30 天,我怀念古法 Coding 了
前端·ai编程
Jolyne_15 小时前
Angular基础速通
前端·angular.js
foxire15 小时前
基于nodejs实现服务端内核引擎
javascript