naive-ui/demo/documentation/components/button/zhCN/index.md

55 lines
1.0 KiB
Markdown
Raw Normal View History

2020-02-03 21:48:56 +08:00
# 按钮 Button
2019-12-02 02:58:45 +08:00
按钮用来触发一些操作。
2019-09-21 17:03:05 +08:00
## 演示
```demo
basic
2020-03-02 12:09:15 +08:00
size
2019-12-31 17:15:55 +08:00
text
2019-09-21 17:03:05 +08:00
disabled
icon
events
shape
ghost
loading
2019-09-22 22:59:29 +08:00
group
2019-09-21 17:03:05 +08:00
debug
```
2020-02-03 20:45:06 +08:00
## Props
### Button Props
2020-02-07 23:40:07 +08:00
|名称|类型|默认值|说明|
2020-02-03 20:45:06 +08:00
|-|-|-|-|
2020-02-08 16:21:09 +08:00
|size|`'small' \| 'medium' \| 'large'`|`'medium'`||
2020-02-03 20:45:06 +08:00
|type|`'default' \| 'primary' \| 'success' \| 'info' \| 'warning' \| 'error'`|`'default'`||
|text|`boolean`|`false`||
2020-02-08 16:21:09 +08:00
|block|`boolean`|`false`||
2020-02-03 20:45:06 +08:00
|ghost|`boolean`|`false`||
|disabled|`boolean`|`false`||
|circle|`boolean`|`false`||
|round|`boolean`|`false`||
|loading|`boolean`|`false`||
|icon-placement|`'left' \| 'right'`|`'left'`||
### Button Group Props
2020-02-07 23:40:07 +08:00
|名称|类型|默认值|说明|
2020-02-03 20:45:06 +08:00
|-|-|-|-|
2020-02-08 16:21:09 +08:00
|size|`'small' \| 'medium' \| 'large'`|`'medium'`|在组内的按钮的尺寸。如果设定,内部的按钮尺寸将不生效|
2020-02-03 20:45:06 +08:00
|vertical|`boolean`|`false`||
## Slots
### Button Slots
2020-02-07 23:40:07 +08:00
|名称|参数|说明|
2020-02-03 20:45:06 +08:00
|-|-|-|
|default|`()`||
|icon|`()`||
### Button Group Slots
2020-02-07 23:40:07 +08:00
|名称|参数|说明|
2020-02-03 20:45:06 +08:00
|-|-|-|
|default|`()`||
## Events
### Button Events
2020-02-07 23:40:07 +08:00
|名称|参数|说明|
2020-02-03 20:45:06 +08:00
|-|-|-|
|click|`(e: MouseEvent)`||