优化drawer组件的动画逻辑
parent
c3cf60e656
commit
9cacff73d2
|
@ -6,6 +6,8 @@
|
|||
|
||||
import { css, html, Component, nextTick, styleMap } from 'wkit'
|
||||
|
||||
import '../icon/index.js'
|
||||
|
||||
const ANIMATION = {
|
||||
left: {
|
||||
custom: [
|
||||
|
@ -36,7 +38,7 @@ const ANIMATION = {
|
|||
class Drawer extends Component {
|
||||
static animation = {}
|
||||
static props = {
|
||||
title: '',
|
||||
title: 'str!',
|
||||
from: 'right',
|
||||
visible: {
|
||||
type: Boolean,
|
||||
|
@ -46,8 +48,8 @@ class Drawer extends Component {
|
|||
this.$refs.drawer.$animate(!v)
|
||||
}
|
||||
},
|
||||
width: '',
|
||||
height: '',
|
||||
width: 'str!',
|
||||
height: 'str!',
|
||||
maskClose: false
|
||||
}
|
||||
|
||||
|
@ -129,7 +131,9 @@ class Drawer extends Component {
|
|||
]
|
||||
|
||||
closeDrawer() {
|
||||
this.$emit('close')
|
||||
this.visible = false
|
||||
this.$emit('input', { value: false })
|
||||
this.$emit('close', { value: false })
|
||||
}
|
||||
|
||||
mounted() {
|
||||
|
|
Loading…
Reference in New Issue