feat(DropdownMenu): duration can be string

This commit is contained in:
陈嘉涵 2020-01-29 12:00:36 +08:00
parent 6d0714de3e
commit 4d1db0fa0f
3 changed files with 5 additions and 5 deletions

View File

@ -113,9 +113,9 @@ Use `active-color` prop to custom active color of the title and options
| Attribute | Description | Type | Default |
|------|------|------|------|
| active-color | Active color of title and option | *string* | `#1989fa` |
| z-index | z-index of menu item | *number \| string* | `10` |
| duration | Transition duration, unit second | *number* | `0.2` |
| direction `v2.0.1` | Expand direction, can be set to `up` | *string* | `down` |
| z-index | z-index of menu item | *number \| string* | `10` |
| duration | Transition duration, unit second | *number \| string* | `0.2` |
| overlay | Whether to show overlay | *boolean* | `true` |
| close-on-click-overlay | Whether to close when click overlay | *boolean* | `true` |
| close-on-click-outside `v2.0.7` | Whether to close when click outside | *boolean* | `true` |

View File

@ -117,9 +117,9 @@ export default {
| 参数 | 说明 | 类型 | 默认值 |
|------|------|------|------|
| active-color | 菜单标题和选项的选中态颜色 | *string* | `#1989fa` |
| z-index | 菜单栏 z-index 层级 | *number \| string* | `10` |
| duration | 动画时长,单位秒 | *number* | `0.2` |
| direction `v2.0.1` | 菜单展开方向,可选值为`up` | *string* | `down` |
| z-index | 菜单栏 z-index 层级 | *number \| string* | `10` |
| duration | 动画时长,单位秒 | *number \| string* | `0.2` |
| overlay | 是否显示遮罩层 | *boolean* | `true` |
| close-on-click-overlay | 是否在点击遮罩层后关闭菜单 | *boolean* | `true` |
| close-on-click-outside `v2.0.7` | 是否在点击外部元素后关闭菜单 | *boolean* | `true` |

View File

@ -26,7 +26,7 @@ export default createComponent({
default: true,
},
duration: {
type: Number,
type: [Number, String],
default: 0.2,
},
direction: {