From 9cacff73d28feeae1ab10033bae3dd12fa88d0c5 Mon Sep 17 00:00:00 2001 From: yutent Date: Fri, 11 Aug 2023 13:48:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96drawer=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E7=9A=84=E5=8A=A8=E7=94=BB=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/drawer/index.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/drawer/index.js b/src/drawer/index.js index 2ffafaa..d6a0a28 100644 --- a/src/drawer/index.js +++ b/src/drawer/index.js @@ -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() {