diff --git a/src/action-sheet/README.md b/src/action-sheet/README.md index ccff8bdc3..f6495c61a 100644 --- a/src/action-sheet/README.md +++ b/src/action-sheet/README.md @@ -123,31 +123,31 @@ export default { | Attribute | Description | Type | Default | |------|------|------|------| -| actions | Options | _Action[]_ | `[]` | -| title | Title | _string_ | - | -| cancel-text | Text of cancel button | _string_ | - | -| description `v2.2.8` | Description above the options | _string_ | - | -| close-icon `v2.2.13` | Close icon name | _string_ | `cross` | -| duration `v2.0.3` | Transition duration, unit second | _number_ | `0.3` | -| round `v2.0.9` | Whether to show round corner | _boolean_ | `true` | -| overlay | Whether to show overlay | _boolean_ | `true` | -| lock-scroll | Whether to lock background scroll | _boolean_ | `true` | -| lazy-render | Whether to lazy render util appeared | _boolean_ | `true` | -| close-on-click-action | Whether to close when click action | _boolean_ | `false` | -| close-on-click-overlay | Whether to close when click overlay | _boolean_ | `true` | -| safe-area-inset-bottom | Whether to enable bottom safe area adaptation | _boolean_ | `true` | -| get-container | Return the mount node for ActionSheet | _string \| () => Element_ | - | +| actions | Options | *Action[]* | `[]` | +| title | Title | *string* | - | +| cancel-text | Text of cancel button | *string* | - | +| description `v2.2.8` | Description above the options | *string* | - | +| close-icon `v2.2.13` | Close icon name | *string* | `cross` | +| duration `v2.0.3` | Transition duration, unit second | *string \| number* | `0.3` | +| round `v2.0.9` | Whether to show round corner | *boolean* | `true` | +| overlay | Whether to show overlay | *boolean* | `true` | +| lock-scroll | Whether to lock background scroll | *boolean* | `true` | +| lazy-render | Whether to lazy render util appeared | *boolean* | `true` | +| close-on-click-action | Whether to close when click action | *boolean* | `false` | +| close-on-click-overlay | Whether to close when click overlay | *boolean* | `true` | +| safe-area-inset-bottom | Whether to enable bottom safe area adaptation | *boolean* | `true` | +| get-container | Return the mount node for ActionSheet | *string \| () => Element* | - | ### Data Structure of Action | Key | Description | Type | |------|------|------| -| name | Title | _string_ | -| subname | Subtitle | _string_ | -| color | Text color | _string_ | -| className | className for the option | _any_ | -| loading | Whether to be loading status | _boolean_ | -| disabled | Whether to be disabled | _boolean_ | +| name | Title | *string* | +| subname | Subtitle | *string* | +| color | Text color | *string* | +| className | className for the option | *any* | +| loading | Whether to be loading status | *boolean* | +| disabled | Whether to be disabled | *boolean* | ### Events diff --git a/src/action-sheet/README.zh-CN.md b/src/action-sheet/README.zh-CN.md index 945eaa7f6..05ff3722c 100644 --- a/src/action-sheet/README.zh-CN.md +++ b/src/action-sheet/README.zh-CN.md @@ -142,7 +142,7 @@ export default { | cancel-text | 取消按钮文字 | *string* | - | | description `v2.2.8` | 选项上方的描述信息 | *string* | - | | close-icon `v2.2.13` | 关闭 [图标名称](#/zh-CN/icon) 或图片链接 | *string* | `cross` | -| duration `v2.0.3` | 动画时长,单位秒 | *number* | `0.3` | +| duration `v2.0.3` | 动画时长,单位秒 | *string \| number* | `0.3` | | round `v2.0.9` | 是否显示圆角 | *boolean* | `true` | | overlay | 是否显示遮罩层 | *boolean* | `true` | | lock-scroll | 是否锁定背景滚动 | *boolean* | `true` | diff --git a/src/action-sheet/index.tsx b/src/action-sheet/index.tsx index f6d2c7ba5..d8d91dab9 100644 --- a/src/action-sheet/index.tsx +++ b/src/action-sheet/index.tsx @@ -160,7 +160,7 @@ ActionSheet.props = { ...popupMixinProps, title: String, actions: Array, - duration: Number, + duration: [Number, String], cancelText: String, description: String, getContainer: [String, Function], diff --git a/src/popup/README.md b/src/popup/README.md index ada70de7a..781540537 100644 --- a/src/popup/README.md +++ b/src/popup/README.md @@ -122,7 +122,7 @@ export default { | position | Can be set to `top` `bottom` `right` `left` | *string* | `center` | | overlay-class | Custom overlay class | *string* | - | | overlay-style | Custom overlay style | *object* | - | -| duration | Transition duration, unit second | *number* | `0.3` | +| duration | Transition duration, unit second | *string \| number* | `0.3` | | round `v2.0.7` | Whether to show round corner | *boolean* | `false` | | lock-scroll | Whether to lock background scroll | *boolean* | `true` | | lazy-render | Whether to lazy render util appeared | *boolean* | `true` | diff --git a/src/popup/README.zh-CN.md b/src/popup/README.zh-CN.md index f9897a813..93b96c64f 100644 --- a/src/popup/README.zh-CN.md +++ b/src/popup/README.zh-CN.md @@ -133,7 +133,7 @@ export default { | position | 弹出位置,可选值为 `top` `bottom` `right` `left` | *string* | `center` | | overlay-class | 自定义遮罩层类名 | *string* | - | | overlay-style | 自定义遮罩层样式 | *object* | - | -| duration | 动画时长,单位秒 | *number* | `0.3` | +| duration | 动画时长,单位秒 | *string \| number* | `0.3` | | round `v2.0.7` | 是否显示圆角 | *boolean* | `false` | | lock-scroll | 是否锁定背景滚动 | *boolean* | `true` | | lazy-render | 是否在显示弹层时才渲染节点 | *boolean* | `true` | diff --git a/src/popup/index.js b/src/popup/index.js index 1354923ac..f9db81a2a 100644 --- a/src/popup/index.js +++ b/src/popup/index.js @@ -9,7 +9,7 @@ export default createComponent({ props: { round: Boolean, - duration: Number, + duration: [Number, String], closeable: Boolean, transition: String, safeAreaInsetBottom: Boolean,