Browse Source

fix: calendar change event call twice #82

pull/84/head
tangjinzhou 6 years ago
parent
commit
34f162b513
  1. 7
      components/calendar/index.jsx

7
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) {

Loading…
Cancel
Save