prevent dispatch event
prevent dispatch event
This commit is contained in:
parent
21dad188c1
commit
04e5e3cd29
3 changed files with 62 additions and 12 deletions
|
@ -198,15 +198,6 @@
|
|||
}
|
||||
});
|
||||
},
|
||||
// todo 事件 这是因为内部的input会触发,应该组织
|
||||
// events: {
|
||||
// 'on-form-blur' () {
|
||||
// return false;
|
||||
// },
|
||||
// 'on-form-change' () {
|
||||
// return false;
|
||||
// }
|
||||
// },
|
||||
watch: {
|
||||
visible (val) {
|
||||
if (val) {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue