mirror of
https://github.com/youzan/vant.git
synced 2025-10-22 11:54:02 +00:00
docs: type highlight (#4264)
This commit is contained in:
@@ -94,25 +94,25 @@ Vue.use(Button);
|
||||
|
||||
| Attribute | Description | Type | Default | Version |
|
||||
|------|------|------|------|------|
|
||||
| type | Can be set to `primary` `info` `warning` `danger` | `string` | `default` | - |
|
||||
| size | Can be set to `large` `small` `mini` | `string` | `normal` | - |
|
||||
| text | Text | `string` | - | - |
|
||||
| color | Color, support linear-gradient | `string` | - | 2.1.3 |
|
||||
| icon | Left Icon | `string` | - | - |
|
||||
| tag | HTML Tag | `string` | `button` | - |
|
||||
| native-type | Native Type Attribute | `string` | `''` | - |
|
||||
| plain | Whether to be plain button | `boolean` | `false` | - |
|
||||
| block | Whether to set display block | `boolean` | `false` | - |
|
||||
| round | Whether to be round button | `boolean` | `false` | - |
|
||||
| square | Whether to be square button | `boolean` | `false` | - |
|
||||
| disabled | Whether to disable button | `boolean` | `false` | - |
|
||||
| loading | Whether show loading status | `boolean` | `false` | - |
|
||||
| loading-text | Loading text | `string` | - | - |
|
||||
| loading-type | Loading type, can be set to `spinner` | `string` | `circular` | - |
|
||||
| loading-size | Loading icon size | `string` | `20px` | - |
|
||||
| url | Link URL | `string` | - | - |
|
||||
| to | Target route of the link, same as to of vue-router | `string | object` | - | - |
|
||||
| replace | If true, the navigation will not leave a history record | `boolean` | `false` | - |
|
||||
| type | Can be set to `primary` `info` `warning` `danger` | *string* | `default` | - |
|
||||
| size | Can be set to `large` `small` `mini` | *string* | `normal` | - |
|
||||
| text | Text | *string* | - | - |
|
||||
| color | Color, support linear-gradient | *string* | - | 2.1.3 |
|
||||
| icon | Left Icon | *string* | - | - |
|
||||
| tag | HTML Tag | *string* | `button` | - |
|
||||
| native-type | Native Type Attribute | *string* | `''` | - |
|
||||
| plain | Whether to be plain button | *boolean* | `false` | - |
|
||||
| block | Whether to set display block | *boolean* | `false` | - |
|
||||
| round | Whether to be round button | *boolean* | `false` | - |
|
||||
| square | Whether to be square button | *boolean* | `false` | - |
|
||||
| disabled | Whether to disable button | *boolean* | `false` | - |
|
||||
| loading | Whether show loading status | *boolean* | `false` | - |
|
||||
| loading-text | Loading text | *string* | - | - |
|
||||
| loading-type | Loading type, can be set to `spinner` | *string* | `circular` | - |
|
||||
| loading-size | Loading icon size | *string* | `20px` | - |
|
||||
| url | Link URL | *string* | - | - |
|
||||
| to | Target route of the link, same as to of vue-router | *string \| object* | - | - |
|
||||
| replace | If true, the navigation will not leave a history record | *boolean* | `false` | - |
|
||||
|
||||
### Events
|
||||
|
||||
|
@@ -114,26 +114,26 @@ Vue.use(Button);
|
||||
|
||||
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
||||
|------|------|------|------|------|
|
||||
| type | 类型,可选值为 `primary` `info` `warning` `danger` | `string` | `default` | - |
|
||||
| size | 尺寸,可选值为 `large` `small` `mini` | `string` | `normal` | - |
|
||||
| text | 按钮文字 | `string` | - | - |
|
||||
| color | 按钮颜色,支持传入`linear-gradient`渐变色 | `string` | - | 2.1.3 |
|
||||
| icon | 左侧图标名称或图片链接,可选值见 Icon 组件 | `string` | - | - |
|
||||
| tag | HTML 标签 | `string` | `button` | - |
|
||||
| native-type | 原生 button 标签 type 属性 | `string` | - | - |
|
||||
| block | 是否为块级元素 | `boolean` | `false` | - |
|
||||
| plain | 是否为朴素按钮 | `boolean` | `false` | - |
|
||||
| square | 是否为方形按钮 | `boolean` | `false` | - |
|
||||
| round | 是否为圆形按钮 | `boolean` | `false` | - |
|
||||
| disabled | 是否禁用按钮 | `boolean` | `false` | - |
|
||||
| hairline | 是否使用 0.5px 边框 | `boolean` | `false` | - |
|
||||
| loading | 是否显示为加载状态 | `boolean` | `false` | - |
|
||||
| loading-text | 加载状态提示文字 | `string` | - | - |
|
||||
| loading-type | 加载图标类型,可选值为`spinner` | `string` | `circular` | - |
|
||||
| loading-size | 加载图标大小 | `string` | `20px` | - |
|
||||
| url | 跳转链接 | `string` | - | - |
|
||||
| to | 路由跳转对象,同 vue-router 的 to 属性 | `string | object` | - | - |
|
||||
| replace | 跳转时是否替换当前页面历史 | `boolean` | `false` | - |
|
||||
| type | 类型,可选值为 `primary` `info` `warning` `danger` | *string* | `default` | - |
|
||||
| size | 尺寸,可选值为 `large` `small` `mini` | *string* | `normal` | - |
|
||||
| text | 按钮文字 | *string* | - | - |
|
||||
| color | 按钮颜色,支持传入`linear-gradient`渐变色 | *string* | - | 2.1.3 |
|
||||
| icon | 左侧图标名称或图片链接,可选值见 Icon 组件 | *string* | - | - |
|
||||
| tag | HTML 标签 | *string* | `button` | - |
|
||||
| native-type | 原生 button 标签 type 属性 | *string* | - | - |
|
||||
| block | 是否为块级元素 | *boolean* | `false` | - |
|
||||
| plain | 是否为朴素按钮 | *boolean* | `false` | - |
|
||||
| square | 是否为方形按钮 | *boolean* | `false` | - |
|
||||
| round | 是否为圆形按钮 | *boolean* | `false` | - |
|
||||
| disabled | 是否禁用按钮 | *boolean* | `false` | - |
|
||||
| hairline | 是否使用 0.5px 边框 | *boolean* | `false` | - |
|
||||
| loading | 是否显示为加载状态 | *boolean* | `false` | - |
|
||||
| loading-text | 加载状态提示文字 | *string* | - | - |
|
||||
| loading-type | 加载图标类型,可选值为`spinner` | *string* | `circular` | - |
|
||||
| loading-size | 加载图标大小 | *string* | `20px` | - |
|
||||
| url | 跳转链接 | *string* | - | - |
|
||||
| to | 路由跳转对象,同 vue-router 的 to 属性 | *string \| object* | - | - |
|
||||
| replace | 跳转时是否替换当前页面历史 | *boolean* | `false` | - |
|
||||
|
||||
### Events
|
||||
|
||||
|
Reference in New Issue
Block a user