feat: 添加tagOnClick标签切换全局公共事件

This commit is contained in:
xiaoxian521 2025-01-09 16:20:31 +08:00
parent e1cd14a946
commit a0246e31df
2 changed files with 4 additions and 2 deletions

View File

@ -511,6 +511,7 @@ function tagOnClick(item) {
} else {
router.push({ path });
}
emitter.emit("tagOnClick", item);
}
onClickOutside(contextmenuRef, closeMenu, {

View File

@ -4,10 +4,11 @@ import mitt from "mitt";
/** 全局公共事件需要在此处添加类型 */
type Events = {
openPanel: string;
tagViewsChange: string;
tagViewsShowModel: string;
tagOnClick: string;
logoChange: boolean;
tagViewsChange: string;
changLayoutRoute: string;
tagViewsShowModel: string;
imageInfo: {
img: HTMLImageElement;
height: number;