prevent dispatch event

prevent dispatch event
This commit is contained in:
梁灏 2017-03-13 19:05:36 +08:00
parent 21dad188c1
commit 04e5e3cd29
3 changed files with 62 additions and 12 deletions

View file

@ -198,15 +198,6 @@
}
});
},
// todo input
// events: {
// 'on-form-blur' () {
// return false;
// },
// 'on-form-change' () {
// return false;
// }
// },
watch: {
visible (val) {
if (val) {

View file

@ -152,7 +152,7 @@
},
handleBlur () {
this.$emit('on-blur');
if (!findComponentUpward(this, ['DatePicker', 'TimePicker'])) {
if (!findComponentUpward(this, ['DatePicker', 'TimePicker', 'Cascader'])) {
this.dispatch('FormItem', 'on-form-blur', this.currentValue);
}
},
@ -171,7 +171,7 @@
this.resizeTextarea();
});
this.currentValue = value;
if (!findComponentUpward(this, ['DatePicker', 'TimePicker'])) {
if (!findComponentUpward(this, ['DatePicker', 'TimePicker', 'Cascader'])) {
this.dispatch('FormItem', 'on-form-change', value);
}
},