From ac9259251da01efe3c6079a475a5fa2eee0f0fab Mon Sep 17 00:00:00 2001 From: tangjinzhou <415800467@qq.com> Date: Fri, 27 Jul 2018 10:12:56 +0800 Subject: [PATCH] fix: calendar change event call twice #82 --- components/calendar/index.jsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/components/calendar/index.jsx b/components/calendar/index.jsx index c4cdfb32b..0411a8c8b 100644 --- a/components/calendar/index.jsx +++ b/components/calendar/index.jsx @@ -117,15 +117,14 @@ export default { }, setValue (value, way) { - if (!hasProp(this, 'value')) { - this.setState({ sValue: value }) - } if (way === 'select') { this.$emit('select', value) - this.$emit('change', value) } else if (way === 'changePanel') { this.onPanelChange(value, this.sMode) } + if (!hasProp(this, 'value')) { + this.setState({ sValue: value }) + } }, setType (type) {