mirror of
https://github.com/element-plus/element-plus.git
synced 2024-11-21 01:02:59 +08:00
4b5a9bf279
* docs(components): [text] line-clamp prop and update example * test(components): [text] line-clamp test * fix(components): [text] not support multi-line ellipsis * docs: updata --------- Co-authored-by: qiang <qw13131wang@gmail.com>
1.6 KiB
1.6 KiB
title | lang |
---|---|
Text | en-US |
Text
Used for text.
Basic
:::demo Use the type
attribute to define Text's type.
text/basic
:::
Sizes
:::demo Use attribute size
to set additional sizes with large
, default
or small
.
text/sizes
:::
Ellipsis
:::demo Pass the truncated
prop to render an ellipsis when the text exceeds the width of the viewport or max-width set. line-clamp
prop to render multiline ellipsis.
text/truncated
:::
Override
:::demo Use attribute tag
to override element
text/override
:::
Mixed
:::demo Text mixed component
text/mixed
:::
API
Attributes
Name | Description | Type | Default |
---|---|---|---|
type | text type | ^[enum]'primary' | 'success' | 'warning' | 'danger' | 'info' |
— |
size | text size | ^[enum]'large' | 'default' | 'small' |
default |
truncated | render ellipsis | ^[boolean] | false |
line-clamp ^(2.4.0) | maximum lines | ^[string] / ^[number] | - |
tag | custom element tag | ^[string] | span |
Slots
Name | Description |
---|---|
default | default content |