fix: calendar change event call twice #82

pull/165/head
tangjinzhou 2018-07-27 10:12:56 +08:00
parent aa074df796
commit ac9259251d
1 changed files with 3 additions and 4 deletions

View File

@ -117,15 +117,14 @@ export default {
}, },
setValue (value, way) { setValue (value, way) {
if (!hasProp(this, 'value')) {
this.setState({ sValue: value })
}
if (way === 'select') { if (way === 'select') {
this.$emit('select', value) this.$emit('select', value)
this.$emit('change', value)
} else if (way === 'changePanel') { } else if (way === 'changePanel') {
this.onPanelChange(value, this.sMode) this.onPanelChange(value, this.sMode)
} }
if (!hasProp(this, 'value')) {
this.setState({ sValue: value })
}
}, },
setType (type) { setType (type) {