some comps support dispatch event to FormItem
some comps support dispatch event to FormItem
This commit is contained in:
parent
7778edfa02
commit
cd78c9c488
14 changed files with 57 additions and 48 deletions
|
@ -33,6 +33,7 @@
|
|||
import clickoutside from '../../directives/clickoutside';
|
||||
import { oneOf } from '../../utils/assist';
|
||||
import { formatDate, parseDate } from './util';
|
||||
import Emitter from '../../mixins/emitter';
|
||||
|
||||
const prefixCls = 'ivu-date-picker';
|
||||
|
||||
|
@ -138,6 +139,7 @@
|
|||
};
|
||||
|
||||
export default {
|
||||
mixins: [ Emitter ],
|
||||
components: { iInput, Drop },
|
||||
directives: { clickoutside },
|
||||
props: {
|
||||
|
@ -363,8 +365,7 @@
|
|||
this.internalValue = '';
|
||||
this.currentValue = '';
|
||||
this.$emit('on-clear');
|
||||
// todo 事件
|
||||
// this.$dispatch('on-form-change', '');
|
||||
this.dispatch('FormItem', 'on-form-change', '');
|
||||
},
|
||||
showPicker () {
|
||||
if (!this.picker) {
|
||||
|
@ -430,8 +431,7 @@
|
|||
}
|
||||
|
||||
this.$emit('on-change', newDate);
|
||||
// todo 事件
|
||||
// this.$dispatch('on-form-change', newDate);
|
||||
this.dispatch('FormItem', 'on-form-change', newDate);
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue