跳到主要内容

eo-tag

<eo-tag>
Alias: <basic.general-tag>

通用标签构件

Playground

Examples

Closable & Event

Playground

Checkable & Event

Playground

Disabled

Playground

Size

Playground

Color

Playground

TagStyle

Playground

EllipsisWidth

Playground

Properties

NameDescriptionTypeDefaultRequired
size

按钮大小

ComponentSize "medium"
icon

图标

GeneralIconProps
color

颜色

TagColor | string
outline

是否有边线

boolean
disabled

是否禁用

boolean
closable

是否允许关闭

boolean
ellipsisWidth

超过宽度文本隐藏宽度

string
checkable

是否允许选择

boolean
checked

是否选择

boolean
tagStyle

标签自定义样式

React.CSSProperties

Events

NameDescriptionEvent Detail
checkTagProps
closeTagProps

Type references

ComponentSize

"large" | "medium" | "small" | "xs"

TagColorenum

blue = "blue",
"blue-inverse" = "blue-inverse",
cyan = "cyan",
"cyan-inverse" = "cyan-inverse",
geekblue = "geekblue",
"geekblue-inverse" = "geekblue-inverse",
grayblue = "grayblue",
"grayblue-inverse" = "grayblue-inverse",
gray = "gray",
"gray-inverse" = "gray-inverse",
green = "green",
"green-inverse" = "green-inverse",
orange = "orange",
"orange-inverse" = "orange-inverse",
purple = "purple",
"purple-inverse" = "purple-inverse",
red = "red",
"red-inverse" = "red-inverse",
yellow = "yellow",
"yellow-inverse" = "yellow-inverse",
teal = "teal",
"teal-inverse" = "teal-inverse",
pink = "pink",
"pink-inverse" = "pink-inverse",

TagProps

NameTypeRequiredDescription
sizeComponentSize
iconGeneralIconProps
colorTagColor | string
outlineboolean
closableboolean
disabledboolean
checkableboolean
checkedboolean
hiddenboolean
ellipsisWidthstring
tagStyleReact.CSSProperties