mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
feat(Popup): duration can be string type
This commit is contained in:
parent
086e910afd
commit
4fba295ea1
@ -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
|
||||
|
||||
|
@ -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` |
|
||||
|
@ -160,7 +160,7 @@ ActionSheet.props = {
|
||||
...popupMixinProps,
|
||||
title: String,
|
||||
actions: Array,
|
||||
duration: Number,
|
||||
duration: [Number, String],
|
||||
cancelText: String,
|
||||
description: String,
|
||||
getContainer: [String, Function],
|
||||
|
@ -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` |
|
||||
|
@ -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` |
|
||||
|
@ -9,7 +9,7 @@ export default createComponent({
|
||||
|
||||
props: {
|
||||
round: Boolean,
|
||||
duration: Number,
|
||||
duration: [Number, String],
|
||||
closeable: Boolean,
|
||||
transition: String,
|
||||
safeAreaInsetBottom: Boolean,
|
||||
|
Loading…
x
Reference in New Issue
Block a user