Skip to content

Commit

Permalink
fix: calendar change event call twice #82
Browse files Browse the repository at this point in the history
  • Loading branch information
tangjinzhou committed Jul 27, 2018
1 parent 4a51544 commit 34f162b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions components/calendar/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 34f162b

Please sign in to comment.