feat:扩展eventsFn 事件

This commit is contained in:
Min 2023-03-08 15:04:47 +08:00 committed by 奔跑的面条
parent 419098f7f3
commit 316bca8032
3 changed files with 10 additions and 3 deletions

View File

@ -126,7 +126,12 @@ export interface PublicConfigType {
},
advancedEvents: {
[K in EventLife]?: string
}
},
eventsFn: {
on: 'change' | 'click' | undefined
components: string | undefined
fn: { [name: string]: string }
}[],
}
}

View File

@ -102,7 +102,8 @@ export class PublicConfigClass implements PublicConfigType {
advancedEvents: {
[EventLife.VNODE_MOUNTED]: undefined,
[EventLife.VNODE_BEFORE_MOUNT]: undefined
}
},
eventsFn: []
}
}

View File

@ -48,7 +48,8 @@ const componentVersionUpdatePolyfill = (newObject: any, sources: any) => {
advancedEvents: {
[EventLife.VNODE_MOUNTED]: undefined,
[EventLife.VNODE_BEFORE_MOUNT]: undefined
}
},
eventsFn: []
}
}
return newObject