init
This commit is contained in:
2025-06-27 17:42:38 +08:00
commit bd6402478b
5317 changed files with 785994 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
/**
* Used to monitor routing changes to change the status of menus and tabs. There is no need to monitor the route, because the route status change is affected by the page rendering time, which will be slow
*/
import mitt from '/@/utils/mitt';
import type { Menu } from '/@/router/types';
const emitter = mitt();
const key = Symbol();
export function setMixTopClick(menu: Menu) {
emitter.emit(key, menu);
}
export function listenerMixTopClick(callback: (menu: Menu) => void) {
emitter.on(key, callback);
}
export function removeMixTopClick() {
emitter.off(key);
}