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

源代码#

组件文档

贡献者

相关推荐
lightgis27 分钟前
16openlayers加载COG(云优化Geotiff)
前端·javascript·html·html5
小飞大王66632 分钟前
TypeScript核心类型系统完全指南
前端·javascript·typescript
你的人类朋友2 小时前
✍️记录自己的git分支管理实践
前端·git·后端
合作小小程序员小小店3 小时前
web网页开发,在线考勤管理系统,基于Idea,html,css,vue,java,springboot,mysql
java·前端·vue.js·后端·intellij-idea·springboot
防火墙在线3 小时前
前后端通信加解密(Web Crypto API )
前端·vue.js·网络协议·node.js·express
Jacky-0083 小时前
Node + vite + React 创建项目
前端·react.js·前端框架
CoderYanger4 小时前
前端基础——CSS练习项目:百度热榜实现
开发语言·前端·css·百度·html·1024程序员节
i_am_a_div_日积月累_4 小时前
10个css更新
前端·css
她是太阳,好耀眼i4 小时前
Nvm 实现vue版本切换
javascript·vue.js·ecmascript
蒲公英10015 小时前
在wps软件的word中使用js宏命令设置表格背景色
javascript·word·wps