跳到主要内容

eo-button

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

通用按钮构件。

Playground

Examples​

Types​

Playground

Sizes​

Playground

Shapes​

Playground

Danger​

Playground

Disabled​

Playground

Tooltips​

Playground

Icons​

Playground

Click​

Playground
Playground

Properties​

NameDescriptionTypeDefaultRequired
type

按钮类型

ButtonType
size

按钮大小

ComponentSize "medium"
danger

是否开启危险状态

boolean false
icon

图标

(GeneralIconProps & HTMLAttributes<GeneralIcon>)
shape

按钮形状,支持圆形、椭圆形,不设置为默认方形

Shape
disabled

是否禁用

boolean false
url

链接地址

string
href

跳转外链地址

string
target

链接类型

string
tooltip

tooltip

string
buttonStyle

按钮样式

React.CSSProperties
themeVariant

主题变体

"default" | "elevo"
textContent

文本内容

string

Slots​

NameDescription
(default)

按钮内容

Events​

NameDescriptionEvent Detail
click

点击

Parts​

NameDescription
button

按钮元素

Type references​

ButtonType​

"primary" | "default" | "dashed" | "ghost" | "link" | "text" | "icon" | "ai" | "ai-alt" | "neutral" | "flat"

ComponentSize​

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

Shape​

"round" | "circle"