Skip to content

Commit

Permalink
fix(date-picker): change event
Browse files Browse the repository at this point in the history
  • Loading branch information
AmyFoxFN committed Oct 10, 2018
1 parent d14a772 commit cbd038a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion example/pages/date-picker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@
max: new Date(2020, 9, 20),
value: new Date(),
onSelect: this.selectHandle,
onCancel: this.cancelHandle
onCancel: this.cancelHandle,
onChange: () => {
console.log('change')
}
})
}
Expand Down
2 changes: 1 addition & 1 deletion src/modules/date-picker/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import createAPI from '../../common/helpers/create-api'
import { tip } from '../../common/helpers/debug'

export default function addDatePicker (Vue, DatePicker) {
const datePickerAPI = createAPI(Vue, DatePicker, ['select', 'cancel', 'value-change'])
const datePickerAPI = createAPI(Vue, DatePicker, ['select', 'cancel', 'change'])
datePickerAPI.before((data, renderFn, single) => {
if (single) {
tip('DatePicker component can not be a singleton.')
Expand Down

0 comments on commit cbd038a

Please sign in to comment.