Skip to content

Commit ac92592

Browse files
committed
fix: calendar change event call twice #82
1 parent aa074df commit ac92592

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

components/calendar/index.jsx

+3-4
Original file line numberDiff line numberDiff line change
@@ -117,15 +117,14 @@ export default {
117117
},
118118

119119
setValue (value, way) {
120-
if (!hasProp(this, 'value')) {
121-
this.setState({ sValue: value })
122-
}
123120
if (way === 'select') {
124121
this.$emit('select', value)
125-
this.$emit('change', value)
126122
} else if (way === 'changePanel') {
127123
this.onPanelChange(value, this.sMode)
128124
}
125+
if (!hasProp(this, 'value')) {
126+
this.setState({ sValue: value })
127+
}
129128
},
130129

131130
setType (type) {

0 commit comments

Comments
 (0)