🔖 项目重命名.

This commit is contained in:
lijiahangmax
2024-05-16 00:03:30 +08:00
parent f7189e34cb
commit d3a045ec20
1511 changed files with 4199 additions and 4128 deletions

View File

@@ -0,0 +1,26 @@
const emitter = 'emitter';
export default function useEmitter(emits: any) {
// 事件向上冒泡
const bubblesEmitter = (event: string, ...args: any[]) => {
if (args) {
emits(emitter, event, ...args);
} else {
emits(emitter, event);
}
};
// 处理冒泡事件
const dispatchEmitter = (event: string, ...args: any[]) => {
if (args) {
emits(event, ...args);
} else {
emits(event);
}
};
return {
bubblesEmitter,
dispatchEmitter
};
}