-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
Labels
Description
- I have searched the issues of this repository and believe that this is not a duplicate.
What problem does this feature solve?
是否支持 this.dispatch('ElFormItem', 'el.form.change') ,ant中如何触发表单的change事件
What does the proposed API look like?
dispatch(componentName, eventName, params) {
let parent = this.$parent || this.$root
let name = parent.$options.name
while (parent && (!name || name !== componentName)) {
parent = parent.$parent
if (parent) {
name = parent.$options.name
}
}
console.log(parent.$options.name)
console.log(parent)
if (parent) {
parent.$emit.apply(parent, [eventName].concat(params))
}
}