Skip to content

Button 按钮

常用的操作按钮。

基础用法

基础按钮
支持六种语义类型。
默认主要成功警告危险信息

朴素 / 圆角 / 圆形

形态
plain、shape='round'、shape='circle'。
朴素圆角

尺寸

尺寸
small / medium / large。
中(默认)

加载与禁用

加载与禁用
加载中已禁用

块级按钮

block 充满父容器
提交

API

Props

属性说明类型默认值
type按钮语义类型'default' | 'primary' | 'success' | 'warning' | 'danger' | 'info''default'
size按钮尺寸'small' | 'medium' | 'large''medium'
shape形状'square' | 'round' | 'circle''square'
plain是否朴素booleanfalse
disabled是否禁用booleanfalse
loading加载状态booleanfalse
block是否块级(占满父容器)booleanfalse
icon前置图标 namestring
native-typeH5 下原生 button type'button' | 'submit' | 'reset''button'
open-type微信小程序 open-type 透传string

Events

事件说明回调参数
click点击触发(disabled / loading 时不触发)(e: Event) => void

Slots

名称说明
default按钮文字

Released under the MIT License.