From 22c27b7962a5363cadcf14fda9b51965fb42cbdf Mon Sep 17 00:00:00 2001 From: 梁灏 Date: Wed, 8 Nov 2017 20:44:35 +0800 Subject: [PATCH] fixed #2215 --- examples/routers/date.vue | 99 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------------------- src/components/date-picker/picker.vue | 4 ++++ 2 files changed, 63 insertions(+), 40 deletions(-) diff --git a/examples/routers/date.vue b/examples/routers/date.vue index ff32c2c..e1c493f 100644 --- a/examples/routers/date.vue +++ b/examples/routers/date.vue @@ -1,43 +1,43 @@ - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -189,3 +189,22 @@ + + diff --git a/src/components/date-picker/picker.vue b/src/components/date-picker/picker.vue index f7b3e68..5211fcc 100644 --- a/src/components/date-picker/picker.vue +++ b/src/components/date-picker/picker.vue @@ -404,6 +404,10 @@ this.currentValue = ''; this.$emit('on-clear'); this.dispatch('FormItem', 'on-form-change', ''); + // #2215,当初始设置了 value,直接点 clear,这时 this.picker 还没有加载 + if (!this.picker) { + this.emitChange(''); + } }, showPicker () { if (!this.picker) { -- libgit2 0.21.4