mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
[new feature] DropdownMenu: add duration prop
This commit is contained in:
parent
9bce0aa31b
commit
3e15719ff3
@ -10,6 +10,10 @@
|
|||||||
|
|
||||||
- 新增`filter`属性
|
- 新增`filter`属性
|
||||||
|
|
||||||
|
##### DropdownMenu
|
||||||
|
|
||||||
|
- 新增`duration`属性
|
||||||
|
|
||||||
##### DropdownItem
|
##### DropdownItem
|
||||||
|
|
||||||
- 新增`title-class`属性
|
- 新增`title-class`属性
|
||||||
|
@ -55,7 +55,7 @@ export default sfc({
|
|||||||
},
|
},
|
||||||
|
|
||||||
render(h) {
|
render(h) {
|
||||||
const { top, zIndex, overlay, activeColor, closeOnClickOverlay } = this.parent;
|
const { top, zIndex, overlay, duration, activeColor, closeOnClickOverlay } = this.parent;
|
||||||
|
|
||||||
const Options = this.options.map(option => {
|
const Options = this.options.map(option => {
|
||||||
const active = option.value === this.value;
|
const active = option.value === this.value;
|
||||||
@ -86,7 +86,7 @@ export default sfc({
|
|||||||
<Popup
|
<Popup
|
||||||
vModel={this.showPopup}
|
vModel={this.showPopup}
|
||||||
position="top"
|
position="top"
|
||||||
duration={this.transition ? 0.2 : 0}
|
duration={this.transition ? duration : 0}
|
||||||
class={bem('content')}
|
class={bem('content')}
|
||||||
overlay={overlay}
|
overlay={overlay}
|
||||||
closeOnClickOverlay={closeOnClickOverlay}
|
closeOnClickOverlay={closeOnClickOverlay}
|
||||||
|
@ -84,6 +84,7 @@ export default {
|
|||||||
|------|------|------|------|------|
|
|------|------|------|------|------|
|
||||||
| active-color | Active color of title and option | `String` | `#1989fa` |
|
| active-color | Active color of title and option | `String` | `#1989fa` |
|
||||||
| z-index | z-index of menu item | `Number` | `10` |
|
| z-index | z-index of menu item | `Number` | `10` |
|
||||||
|
| duration | Transition duration, unit second | `Number` | `0.2` |
|
||||||
| overlay | Whether to show overlay | `Boolean` | `true` |
|
| overlay | Whether to show overlay | `Boolean` | `true` |
|
||||||
| close-on-click-overlay | Whether to close when click overlay | `Boolean` | `true` |
|
| close-on-click-overlay | Whether to close when click overlay | `Boolean` | `true` |
|
||||||
|
|
||||||
|
@ -20,6 +20,10 @@ export default sfc({
|
|||||||
type: Number,
|
type: Number,
|
||||||
default: 10
|
default: 10
|
||||||
},
|
},
|
||||||
|
duration: {
|
||||||
|
type: Number,
|
||||||
|
default: 0.2
|
||||||
|
},
|
||||||
activeColor: {
|
activeColor: {
|
||||||
type: String,
|
type: String,
|
||||||
default: BLUE
|
default: BLUE
|
||||||
|
@ -95,6 +95,7 @@ export default {
|
|||||||
|------|------|------|------|------|
|
|------|------|------|------|------|
|
||||||
| active-color | 菜单标题和选项的选中态颜色 | `String` | `#1989fa` | - |
|
| active-color | 菜单标题和选项的选中态颜色 | `String` | `#1989fa` | - |
|
||||||
| z-index | 菜单栏 z-index 层级 | `Number` | `10` | - |
|
| z-index | 菜单栏 z-index 层级 | `Number` | `10` | - |
|
||||||
|
| duration | 动画时长,单位秒 | `Number` | `0.2` | 2.0.0 |
|
||||||
| overlay | 是否显示遮罩层 | `Boolean` | `true` | - |
|
| overlay | 是否显示遮罩层 | `Boolean` | `true` | - |
|
||||||
| close-on-click-overlay | 是否在点击遮罩层后关闭菜单 | `Boolean` | `true` | - |
|
| close-on-click-overlay | 是否在点击遮罩层后关闭菜单 | `Boolean` | `true` | - |
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user