From 4d1db0fa0fcb8d43e4fd03af24ddba91410da642 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=98=89=E6=B6=B5?= Date: Wed, 29 Jan 2020 12:00:36 +0800 Subject: [PATCH] feat(DropdownMenu): duration can be string --- src/dropdown-menu/README.md | 4 ++-- src/dropdown-menu/README.zh-CN.md | 4 ++-- src/dropdown-menu/index.js | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/dropdown-menu/README.md b/src/dropdown-menu/README.md index 01ff4bf3b..af336912f 100644 --- a/src/dropdown-menu/README.md +++ b/src/dropdown-menu/README.md @@ -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` | diff --git a/src/dropdown-menu/README.zh-CN.md b/src/dropdown-menu/README.zh-CN.md index 64ba87d6a..bcf2fdd1b 100644 --- a/src/dropdown-menu/README.zh-CN.md +++ b/src/dropdown-menu/README.zh-CN.md @@ -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` | diff --git a/src/dropdown-menu/index.js b/src/dropdown-menu/index.js index 17bcc01cc..2eee55774 100644 --- a/src/dropdown-menu/index.js +++ b/src/dropdown-menu/index.js @@ -26,7 +26,7 @@ export default createComponent({ default: true, }, duration: { - type: Number, + type: [Number, String], default: 0.2, }, direction: {