mirror of
https://github.com/youzan/vant.git
synced 2025-10-22 03:44:48 +00:00
docs: type highlight (#4264)
This commit is contained in:
@@ -101,23 +101,23 @@ export default {
|
||||
|
||||
| Attribute | Description | Type | Default | Version |
|
||||
|------|------|------|------|------|
|
||||
| active-color | Active color of title and option | `string` | `#1989fa` | - |
|
||||
| z-index | z-index of menu item | `number` | `10` | - |
|
||||
| duration | Transition duration, unit second | `number` | `0.2` | - |
|
||||
| direction | Expand direction, can be set to `up` | `string` | `down` | 2.0.1 |
|
||||
| overlay | Whether to show overlay | `boolean` | `true` | - |
|
||||
| close-on-click-overlay | Whether to close when click overlay | `boolean` | `true` | - |
|
||||
| close-on-click-outside | Whether to close when click outside | `boolean` | `true` | 2.0.7 |
|
||||
| active-color | Active color of title and option | *string* | `#1989fa` | - |
|
||||
| z-index | z-index of menu item | *number* | `10` | - |
|
||||
| duration | Transition duration, unit second | *number* | `0.2` | - |
|
||||
| direction | Expand direction, can be set to `up` | *string* | `down` | 2.0.1 |
|
||||
| overlay | Whether to show overlay | *boolean* | `true` | - |
|
||||
| close-on-click-overlay | Whether to close when click overlay | *boolean* | `true` | - |
|
||||
| close-on-click-outside | Whether to close when click outside | *boolean* | `true` | 2.0.7 |
|
||||
|
||||
### DropdownItem Props
|
||||
|
||||
| Attribute | Description | Type | Default | Version |
|
||||
|------|------|------|------|------|
|
||||
| value | Value of current option,can use `v-model` | `string | number` | - | - |
|
||||
| title | Item title | `string` | Text of selected option | - |
|
||||
| options | Options | `Option[]` | `[]` | - |
|
||||
| disabled | Whether to disable dropdown item | `boolean` | `false` | - |
|
||||
| title-class | Title class | `string` | - | - |
|
||||
| value | Value of current option,can use `v-model` | *string \| number* | - | - |
|
||||
| title | Item title | *string* | Text of selected option | - |
|
||||
| options | Options | *Option[]* | `[]` | - |
|
||||
| disabled | Whether to disable dropdown item | *boolean* | `false` | - |
|
||||
| title-class | Title class | *string* | - | - |
|
||||
|
||||
### DropdownItem Events
|
||||
|
||||
@@ -140,6 +140,6 @@ Use ref to get DropdownItem instance and call instance methods
|
||||
|
||||
| Key | Description | Type |
|
||||
|------|------|------|
|
||||
| text | Text | `string` |
|
||||
| value | Value | `string | number` |
|
||||
| icon | Left icon | `string` |
|
||||
| text | Text | *string* |
|
||||
| value | Value | *string \| number* |
|
||||
| icon | Left icon | *string* |
|
||||
|
||||
@@ -105,23 +105,23 @@ export default {
|
||||
|
||||
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
||||
|------|------|------|------|------|
|
||||
| active-color | 菜单标题和选项的选中态颜色 | `string` | `#1989fa` | - |
|
||||
| z-index | 菜单栏 z-index 层级 | `number` | `10` | - |
|
||||
| duration | 动画时长,单位秒 | `number` | `0.2` | - |
|
||||
| direction | 菜单展开方向,可选值为`up` | `string` | `down` | 2.0.1 |
|
||||
| overlay | 是否显示遮罩层 | `boolean` | `true` | - |
|
||||
| close-on-click-overlay | 是否在点击遮罩层后关闭菜单 | `boolean` | `true` | - |
|
||||
| close-on-click-outside | 是否在点击外部元素后关闭菜单 | `boolean` | `true` | 2.0.7 |
|
||||
| active-color | 菜单标题和选项的选中态颜色 | *string* | `#1989fa` | - |
|
||||
| z-index | 菜单栏 z-index 层级 | *number* | `10` | - |
|
||||
| duration | 动画时长,单位秒 | *number* | `0.2` | - |
|
||||
| direction | 菜单展开方向,可选值为`up` | *string* | `down` | 2.0.1 |
|
||||
| overlay | 是否显示遮罩层 | *boolean* | `true` | - |
|
||||
| close-on-click-overlay | 是否在点击遮罩层后关闭菜单 | *boolean* | `true` | - |
|
||||
| close-on-click-outside | 是否在点击外部元素后关闭菜单 | *boolean* | `true` | 2.0.7 |
|
||||
|
||||
### DropdownItem Props
|
||||
|
||||
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
||||
|------|------|------|------|------|
|
||||
| value | 当前选中项对应的 value,可以通过`v-model`双向绑定 | `string | number` | - | - |
|
||||
| title | 菜单项标题 | `string` | 当前选中项文字 | - |
|
||||
| options | 选项数组 | `Option[]` | `[]` | - |
|
||||
| disabled | 是否禁用菜单 | `boolean` | `false` | - |
|
||||
| title-class | 标题额外类名 | `string` | - | - |
|
||||
| value | 当前选中项对应的 value,可以通过`v-model`双向绑定 | *string \| number* | - | - |
|
||||
| title | 菜单项标题 | *string* | 当前选中项文字 | - |
|
||||
| options | 选项数组 | *Option[]* | `[]` | - |
|
||||
| disabled | 是否禁用菜单 | *boolean* | `false` | - |
|
||||
| title-class | 标题额外类名 | *string* | - | - |
|
||||
|
||||
### DropdownItem Events
|
||||
|
||||
@@ -144,6 +144,6 @@ export default {
|
||||
|
||||
| 键名 | 说明 | 类型 |
|
||||
|------|------|------|
|
||||
| text | 文字 | `string` |
|
||||
| value | 标识符 | `string | number` |
|
||||
| icon | 左侧图标名称或图片链接,可选值见 Icon 组件 | `string` |
|
||||
| text | 文字 | *string* |
|
||||
| value | 标识符 | *string \| number* |
|
||||
| icon | 左侧图标名称或图片链接,可选值见 Icon 组件 | *string* |
|
||||
|
||||
Reference in New Issue
Block a user