docs(components): [button] add api prefix (#10628)

* docs(components): [button] add api prefix

* docs(components): [button] use CamelCase
This commit is contained in:
Xc 2022-11-18 11:21:01 +08:00 committed by GitHub
parent 1eeeb18c81
commit 8b974f1da0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -125,29 +125,29 @@ button/custom
## Button API
### Attributes
### Button Attributes
| Name | Description | Type | Default |
| ---------------------------------- | ----------------------------------------------------------------------- | -------------------------------------------------------------------------------- | ------- |
| size | button size | ^[string]`'large'\| 'default'\| 'small'` | — |
| type | button type | ^[string]`'primary'\| 'success'\| 'warning'\| 'danger'\| 'info'\| 'text'(delte)` | — |
| plain | determine whether it's a plain button | ^[boolean] | false |
| text<VersionTag version="2.2.0" /> | determine whether it's a text button | ^[boolean] | false |
| bg<VersionTag version="2.2.0" /> | determine whether the text button background color is always on | ^[boolean] | false |
| link<VersionTag version="2.2.1" /> | determine whether it's a link button | ^[boolean] | false |
| round | determine whether it's a round button | ^[boolean] | false |
| circle | determine whether it's a circle button | ^[boolean] | false |
| loading | determine whether it's loading | ^[boolean] | false |
| loading-icon | customize loading icon component | ^[string] / ^[Component] | Loading |
| disabled | disable the button | ^[boolean] | false |
| icon | icon component | ^[string] / ^[Component] | — |
| autofocus | same as native button's `autofocus` | ^[boolean] | false |
| native-type | same as native button's `type` | ^[string]`'button'\| 'submit'\| 'reset'` | button |
| auto-insert-space | automatically insert a space between two chinese characters | ^[boolean] | — |
| color | custom button color, automatically calculate `hover` and `active` color | ^[string] | — |
| dark | dark mode, which automatically converts `color` to dark mode colors | ^[boolean] | false |
| Name | Description | Type | Default |
| ---------------------------------- | ----------------------------------------------------------------------- | --------------------------------------------------------------------------------- | ------- |
| size | button size | ^[string]`'large'\| 'default'\| 'small'` | — |
| type | button type | ^[string]`'primary'\| 'success'\| 'warning'\| 'danger'\| 'info'\| 'text'(delete)` | — |
| plain | determine whether it's a plain button | ^[boolean] | false |
| text<VersionTag version="2.2.0" /> | determine whether it's a text button | ^[boolean] | false |
| bg<VersionTag version="2.2.0" /> | determine whether the text button background color is always on | ^[boolean] | false |
| link<VersionTag version="2.2.1" /> | determine whether it's a link button | ^[boolean] | false |
| round | determine whether it's a round button | ^[boolean] | false |
| circle | determine whether it's a circle button | ^[boolean] | false |
| loading | determine whether it's loading | ^[boolean] | false |
| loading-icon | customize loading icon component | ^[string] / ^[Component] | Loading |
| disabled | disable the button | ^[boolean] | false |
| icon | icon component | ^[string] / ^[Component] | — |
| autofocus | same as native button's `autofocus` | ^[boolean] | false |
| native-type | same as native button's `type` | ^[string]`'button'\| 'submit'\| 'reset'` | button |
| auto-insert-space | automatically insert a space between two chinese characters | ^[boolean] | — |
| color | custom button color, automatically calculate `hover` and `active` color | ^[string] | — |
| dark | dark mode, which automatically converts `color` to dark mode colors | ^[boolean] | false |
### Slots
### Button Slots
| Name | Description |
| ------- | --------------------------- |
@ -155,7 +155,7 @@ button/custom
| loading | customize loading component |
| icon | customize icon component |
### Exposes
### Button Exposes
| Name | Description | Type |
| -------------- | -------------------- | -------------------------------------------------------------------------------------------------------------- |
@ -165,16 +165,16 @@ button/custom
| disabled | button disabled | ^[Object]`ComputedRef<boolean>` |
| shouldAddSpace | whether adding space | ^[Object]`ComputedRef<boolean>` |
## Button-Group API
## ButtonGroup API
### Attributes
### ButtonGroup Attributes
| Name | Description | Type | Default |
| ---- | ------------------------------------------------ | ---------------------------------------------------------------- | ------- |
| size | control the size of buttons in this button-group | ^[string]`'large'\| 'default'\| 'small'` | — |
| type | control the type of buttons in this button-group | ^[string]`'primary'\| 'success'\| 'warning'\| 'danger'\| 'info'` | — |
### Slots
### ButtonGroup Slots
| Name | Description | Subtags |
| ------- | ------------------------------ | ------- |