2024-12-27 21:08:26 +08:00
|
|
|
<template>
|
|
|
|
<div class="left">
|
2024-12-28 14:25:23 +08:00
|
|
|
<CCDock name="Hierarchy">
|
2025-01-23 12:27:27 +08:00
|
|
|
<template v-slot:tab-name-before> </template>
|
2025-01-12 17:57:02 +08:00
|
|
|
<template v-slot:title>
|
2025-01-24 11:26:51 +08:00
|
|
|
<Refresh @click="onClickRefresh" :type="rotateType"></Refresh>
|
2025-01-12 17:57:02 +08:00
|
|
|
<div class="engine-version" v-if="engineVersion">Cocos Creator V{{ engineVersion }}</div>
|
|
|
|
</template>
|
2024-12-28 14:25:23 +08:00
|
|
|
<CCInput style="flex: none" placeholder="enter keywords to filter" :data="filterText" v-if="false">
|
|
|
|
<slot>
|
|
|
|
<i class="matchCase iconfont icon_font_size" @click.stop="onChangeCase" title="match case" :style="{ color: matchCase ? 'red' : '' }"></i>
|
|
|
|
</slot>
|
|
|
|
</CCInput>
|
2025-02-01 22:22:39 +08:00
|
|
|
<CCTree @do-search="doSearch" :search="true" @node-menu="onMenu" @contextmenu.prevent.stop="onMenu" style="flex: 1" ref="elTree" :expand-keys="expandedKeys" :default-expand-all="false" :value="treeData" @node-expand="onNodeExpand" @node-collapse="onNodeCollapse" @node-click="handleNodeClick" @node-unclick="handleNodeUnclick" @node-enter="handleNodeEnter" @node-leave="handleNodeLeave"></CCTree>
|
2024-12-28 14:25:23 +08:00
|
|
|
</CCDock>
|
2024-12-27 21:08:26 +08:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
|
|
import ccui from "@xuyanfeng/cc-ui";
|
2024-12-28 16:24:16 +08:00
|
|
|
import { IUiMenuItem } from "@xuyanfeng/cc-ui/types/cc-menu/const";
|
2025-01-24 11:26:51 +08:00
|
|
|
import { HandExpandOptions } from "@xuyanfeng/cc-ui/types/cc-tree/const";
|
2025-01-06 19:46:38 +08:00
|
|
|
import Mousetrap, { MousetrapInstance } from "mousetrap";
|
2024-12-27 21:08:26 +08:00
|
|
|
import { storeToRefs } from "pinia";
|
2024-12-28 14:25:23 +08:00
|
|
|
import { defineComponent, nextTick, onMounted, onUnmounted, ref, toRaw, watch } from "vue";
|
2025-01-12 17:57:02 +08:00
|
|
|
import { Msg, PluginEvent, RequestTreeInfoData, RequestUseFrameData, ResponseSetPropertyData, ResponseSupportData } from "../../core/types";
|
2025-01-10 15:22:32 +08:00
|
|
|
import { ga } from "../../ga";
|
|
|
|
import { GA_EventName } from "../../ga/type";
|
2024-12-27 21:08:26 +08:00
|
|
|
import { bridge } from "./bridge";
|
|
|
|
import { Bus, BusMsg } from "./bus";
|
2025-01-24 11:26:51 +08:00
|
|
|
import { RotateType } from "./const";
|
2024-12-27 21:08:26 +08:00
|
|
|
import { EngineData, TreeData } from "./data";
|
2025-01-14 17:44:26 +08:00
|
|
|
import GameInfo from "./game-info.vue";
|
2025-01-24 11:26:51 +08:00
|
|
|
import Refresh from "./refresh.vue";
|
2024-12-28 14:25:23 +08:00
|
|
|
import { appStore } from "./store";
|
|
|
|
import { Timer } from "./timer";
|
|
|
|
const { CCTree, CCFootBar, CCDock, CCDialog, CCInput, CCButton, CCInputNumber, CCSelect, CCButtonGroup, CCCheckBox, CCColor, CCDivider } = ccui.components;
|
2024-12-27 21:08:26 +08:00
|
|
|
export default defineComponent({
|
|
|
|
name: "hierarchy",
|
2025-01-24 11:26:51 +08:00
|
|
|
components: { Refresh, CCButtonGroup, CCInput, CCTree, CCDock },
|
2024-12-27 21:08:26 +08:00
|
|
|
setup() {
|
2024-12-28 15:05:05 +08:00
|
|
|
const funcShowPlace = (data: EngineData) => {
|
2025-01-07 17:52:21 +08:00
|
|
|
console.log(data);
|
|
|
|
_expand(data.engineNode);
|
2024-12-28 15:05:05 +08:00
|
|
|
};
|
|
|
|
const funcEnableSchedule = (b: boolean) => {
|
2024-12-28 14:25:23 +08:00
|
|
|
if (b) {
|
2025-01-15 14:38:53 +08:00
|
|
|
timer.create();
|
2024-12-28 14:25:23 +08:00
|
|
|
} else {
|
2025-01-15 14:38:53 +08:00
|
|
|
timer.clean();
|
2024-12-28 14:25:23 +08:00
|
|
|
}
|
2024-12-28 15:05:05 +08:00
|
|
|
};
|
2025-01-17 09:57:11 +08:00
|
|
|
const timer: Timer = new Timer();
|
|
|
|
timer.onWork = () => {
|
2025-01-24 11:26:51 +08:00
|
|
|
rotateType.value = RotateType.Loop;
|
2025-01-17 10:18:26 +08:00
|
|
|
config.value.refreshHirarchy = true;
|
|
|
|
appStore().save();
|
2024-12-28 14:25:23 +08:00
|
|
|
updateTree();
|
2025-01-17 09:57:11 +08:00
|
|
|
};
|
|
|
|
timer.onClean = () => {
|
2025-01-24 11:26:51 +08:00
|
|
|
rotateType.value = RotateType.None;
|
2025-01-17 10:18:26 +08:00
|
|
|
config.value.refreshHirarchy = false;
|
|
|
|
appStore().save();
|
2025-01-17 09:57:11 +08:00
|
|
|
};
|
2025-01-15 14:38:53 +08:00
|
|
|
timer.name = "hierarchy";
|
2025-01-06 19:46:38 +08:00
|
|
|
let ins: MousetrapInstance | null = null;
|
|
|
|
function onQuickVisible() {
|
2025-01-10 15:22:32 +08:00
|
|
|
ga.fireEvent(GA_EventName.SpaceVisible);
|
2025-01-06 19:46:38 +08:00
|
|
|
console.log("onQuickVisible");
|
|
|
|
if (selectedUUID) {
|
|
|
|
bridge.send(Msg.RequestVisible, selectedUUID);
|
|
|
|
}
|
|
|
|
}
|
2025-01-08 16:37:12 +08:00
|
|
|
function changeContent(data: RequestUseFrameData) {
|
|
|
|
treeData.value = [];
|
|
|
|
selectedUUID = null;
|
|
|
|
}
|
2025-01-23 17:56:02 +08:00
|
|
|
function onInspectNode(data: PluginEvent) {
|
|
|
|
const uuid = data.data as string;
|
|
|
|
if (!uuid) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
updateSelect(uuid);
|
|
|
|
nextTick(() => {
|
|
|
|
if (elTree.value) {
|
|
|
|
elTree.value.handExpand(uuid, { highlight: true, select: true, scroll: true } as HandExpandOptions);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
2024-12-28 14:25:23 +08:00
|
|
|
onMounted(() => {
|
2025-01-06 19:46:38 +08:00
|
|
|
if (elTree.value) {
|
|
|
|
const el = toRaw(elTree.value);
|
|
|
|
ins = new Mousetrap(el.treeElement);
|
|
|
|
ins.bind(["space"], onQuickVisible, "keydown");
|
|
|
|
}
|
2025-01-08 16:37:12 +08:00
|
|
|
Bus.on(BusMsg.ChangeContent, changeContent);
|
2024-12-28 15:05:05 +08:00
|
|
|
Bus.on(BusMsg.ShowPlace, funcShowPlace);
|
|
|
|
Bus.on(BusMsg.EnableSchedule, funcEnableSchedule);
|
2025-01-23 17:56:02 +08:00
|
|
|
bridge.on(Msg.InspectNode, onInspectNode);
|
2025-01-17 10:18:26 +08:00
|
|
|
if (config.value.refreshHirarchy) {
|
|
|
|
timer.create(true);
|
|
|
|
} else {
|
|
|
|
updateTree();
|
|
|
|
}
|
2024-12-28 14:25:23 +08:00
|
|
|
});
|
|
|
|
onUnmounted(() => {
|
2025-01-06 19:46:38 +08:00
|
|
|
if (ins) {
|
|
|
|
ins.unbind(["space"], "keydown");
|
|
|
|
}
|
2025-01-08 16:37:12 +08:00
|
|
|
Bus.off(BusMsg.ChangeContent, changeContent);
|
2024-12-28 15:05:05 +08:00
|
|
|
Bus.off(BusMsg.ShowPlace, funcShowPlace);
|
|
|
|
Bus.off(BusMsg.EnableSchedule, funcEnableSchedule);
|
2025-01-23 17:56:02 +08:00
|
|
|
bridge.off(Msg.InspectNode, onInspectNode);
|
2025-01-15 14:38:53 +08:00
|
|
|
timer.clean();
|
2024-12-27 21:08:26 +08:00
|
|
|
});
|
|
|
|
function _expand(uuid: string) {
|
2025-01-07 17:52:21 +08:00
|
|
|
if (elTree.value) {
|
|
|
|
elTree.value.handExpand(uuid, { highlight: true });
|
2024-12-27 21:08:26 +08:00
|
|
|
}
|
|
|
|
}
|
2024-12-28 14:25:23 +08:00
|
|
|
function updateTree() {
|
|
|
|
console.log("update tree info");
|
2024-12-27 21:08:26 +08:00
|
|
|
const id = toRaw(frameID.value);
|
|
|
|
bridge.send(Msg.RequstTreeInfo, { frameID: id } as RequestTreeInfoData);
|
|
|
|
}
|
2024-12-28 14:25:23 +08:00
|
|
|
|
2024-12-27 21:08:26 +08:00
|
|
|
function updateFilterText(val: any) {
|
|
|
|
(elTree.value as any)?.filter(val);
|
|
|
|
}
|
|
|
|
const filterText = ref<string>("");
|
|
|
|
watch(filterText, (val) => {
|
|
|
|
// TODO: 过滤树
|
|
|
|
updateFilterText(val);
|
|
|
|
});
|
|
|
|
const { config, frameID } = storeToRefs(appStore());
|
|
|
|
const matchCase = ref<boolean>(false);
|
2025-01-06 19:46:38 +08:00
|
|
|
const elTree = ref<typeof CCTree>(null);
|
2024-12-27 21:08:26 +08:00
|
|
|
const treeData = ref<TreeData[]>([]);
|
|
|
|
let selectedUUID: string | null = null;
|
2025-01-12 17:57:02 +08:00
|
|
|
const engineVersion = ref("");
|
|
|
|
bridge.on(Msg.ResponseSupport, (event: PluginEvent) => {
|
|
|
|
let data: ResponseSupportData = event.data;
|
|
|
|
const isCocosGame: boolean = data.support;
|
|
|
|
if (isCocosGame) {
|
|
|
|
engineVersion.value = data.version;
|
|
|
|
} else {
|
|
|
|
engineVersion.value = "";
|
|
|
|
}
|
|
|
|
});
|
2024-12-28 14:25:23 +08:00
|
|
|
bridge.on(Msg.ResponseTreeInfo, (event: PluginEvent) => {
|
|
|
|
let data: Array<TreeData> = event.data;
|
2024-12-27 21:08:26 +08:00
|
|
|
if (!Array.isArray(data)) {
|
|
|
|
data = [data];
|
|
|
|
}
|
|
|
|
treeData.value = data;
|
2024-12-28 14:25:23 +08:00
|
|
|
nextTick(() => {
|
|
|
|
if (elTree.value) {
|
|
|
|
elTree.value.handChoose(selectedUUID);
|
|
|
|
}
|
|
|
|
});
|
2024-12-27 21:08:26 +08:00
|
|
|
});
|
|
|
|
|
2024-12-28 14:25:23 +08:00
|
|
|
bridge.on(Msg.ResponseSetProperty, (event: PluginEvent) => {
|
|
|
|
let data: ResponseSetPropertyData = event.data;
|
2024-12-27 21:08:26 +08:00
|
|
|
const uuid = data.path[0];
|
|
|
|
const key = data.path[1];
|
|
|
|
const value = data.data;
|
|
|
|
let treeArray: Array<TreeData> = [];
|
|
|
|
|
|
|
|
function circle(array: Array<TreeData>) {
|
|
|
|
array.forEach((item) => {
|
|
|
|
treeArray.push(item);
|
|
|
|
circle(item.children);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
// 更新指定uuid节点的tree的name
|
|
|
|
circle(treeData.value);
|
|
|
|
let ret = treeArray.find((el) => el.id === uuid);
|
|
|
|
if (ret) {
|
|
|
|
if (key === "name") {
|
|
|
|
ret.text = value;
|
|
|
|
}
|
|
|
|
if (key === "active") {
|
|
|
|
ret.active = !!value;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
const expandedKeys = ref<Array<string>>([]);
|
2024-12-28 15:05:05 +08:00
|
|
|
function updateSelect(uuid: string | null) {
|
|
|
|
selectedUUID = uuid;
|
|
|
|
Bus.emit(BusMsg.SelectNode, uuid);
|
2025-01-27 21:25:44 +08:00
|
|
|
if (config.value.clickInspect) {
|
|
|
|
bridge.send(Msg.SelectNode, uuid);
|
|
|
|
}
|
2024-12-28 15:05:05 +08:00
|
|
|
}
|
2025-01-24 11:26:51 +08:00
|
|
|
const rotateType = ref<RotateType>(RotateType.None);
|
|
|
|
if (config.value.refreshHirarchy) {
|
|
|
|
rotateType.value = RotateType.Loop;
|
|
|
|
}
|
2025-02-01 22:22:39 +08:00
|
|
|
let preSearch = "";
|
2024-12-27 21:08:26 +08:00
|
|
|
return {
|
2025-02-01 22:22:39 +08:00
|
|
|
doSearch(v: string) {
|
|
|
|
if (v && preSearch !== v) {
|
|
|
|
ga.fireEventWithParam(GA_EventName.TreeSearch, v);
|
|
|
|
preSearch = v;
|
|
|
|
}
|
|
|
|
},
|
2025-01-17 09:57:11 +08:00
|
|
|
onClickRefresh() {
|
|
|
|
updateTree();
|
|
|
|
},
|
2025-01-24 11:26:51 +08:00
|
|
|
rotateType,
|
2025-01-12 17:57:02 +08:00
|
|
|
engineVersion,
|
2024-12-27 21:08:26 +08:00
|
|
|
expandedKeys,
|
|
|
|
elTree,
|
|
|
|
filterText,
|
|
|
|
treeData,
|
|
|
|
matchCase,
|
|
|
|
frameID,
|
2024-12-28 14:25:23 +08:00
|
|
|
handleNodeUnclick() {
|
2024-12-28 15:05:05 +08:00
|
|
|
updateSelect(null);
|
2024-12-28 14:25:23 +08:00
|
|
|
},
|
2025-01-22 17:26:41 +08:00
|
|
|
handleNodeEnter(data: TreeData | null) {
|
2025-01-27 21:25:44 +08:00
|
|
|
if (!config.value.hoverInspect) {
|
|
|
|
return;
|
|
|
|
}
|
2025-01-22 17:26:41 +08:00
|
|
|
if (data) {
|
|
|
|
bridge.send(Msg.HoverNode, data.id);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
handleNodeLeave(data: TreeData | null) {
|
|
|
|
if (data) {
|
|
|
|
bridge.send(Msg.HoverNode, null);
|
|
|
|
}
|
|
|
|
},
|
2024-12-27 21:08:26 +08:00
|
|
|
handleNodeClick(data: TreeData | null) {
|
|
|
|
if (data) {
|
2024-12-28 15:05:05 +08:00
|
|
|
updateSelect(data.id);
|
2024-12-27 21:08:26 +08:00
|
|
|
} else {
|
2024-12-28 15:05:05 +08:00
|
|
|
updateSelect(null);
|
2024-12-27 21:08:26 +08:00
|
|
|
}
|
|
|
|
},
|
2025-02-01 22:22:39 +08:00
|
|
|
|
2024-12-27 21:08:26 +08:00
|
|
|
onNodeExpand(data: TreeData) {
|
|
|
|
if (data.id) {
|
|
|
|
expandedKeys.value.push(data.id);
|
2025-01-10 15:22:32 +08:00
|
|
|
ga.fireEventWithParam(GA_EventName.Hierarchy, "node expand");
|
2024-12-27 21:08:26 +08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
onNodeCollapse(data: TreeData) {
|
|
|
|
if (data.id) {
|
2025-01-10 15:22:32 +08:00
|
|
|
ga.fireEventWithParam(GA_EventName.Hierarchy, "node collapse");
|
2024-12-27 21:08:26 +08:00
|
|
|
const keys = toRaw(expandedKeys.value);
|
|
|
|
const index = keys.findIndex((el) => el === data.id);
|
|
|
|
if (index !== -1) {
|
|
|
|
keys.splice(index, 1);
|
|
|
|
}
|
|
|
|
expandedKeys.value = keys;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
// TODO: 暂时这个版本先不实现
|
|
|
|
filterNode(value: any, data: any) {
|
|
|
|
if (!value) {
|
|
|
|
return true;
|
|
|
|
} else {
|
|
|
|
if (matchCase) {
|
|
|
|
// 严格匹配大写
|
|
|
|
return data?.name?.indexOf(value) !== -1;
|
|
|
|
} else {
|
|
|
|
return data?.name?.toLowerCase().indexOf(value.toLowerCase()) !== -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2025-01-25 19:36:11 +08:00
|
|
|
onMenu(event: MouseEvent, data: TreeData) {
|
2024-12-28 16:24:16 +08:00
|
|
|
const menus: IUiMenuItem[] = [];
|
|
|
|
menus.push({
|
|
|
|
name: "update hierarchy",
|
|
|
|
enabled: true,
|
2025-01-27 21:25:44 +08:00
|
|
|
callback: (item) => {
|
|
|
|
ga.fireEventWithParam(GA_EventName.MouseMenu, item.name);
|
2024-12-28 16:24:16 +08:00
|
|
|
updateTree();
|
|
|
|
},
|
|
|
|
});
|
2025-01-27 21:25:44 +08:00
|
|
|
menus.push({ type: ccui.menu.MenuType.Separator });
|
2025-01-14 18:33:28 +08:00
|
|
|
menus.push({
|
|
|
|
name: "fresh auto",
|
2025-01-27 21:25:44 +08:00
|
|
|
callback: (item) => {
|
|
|
|
ga.fireEventWithParam(GA_EventName.MouseMenu, item.name);
|
2025-01-24 17:42:26 +08:00
|
|
|
timer.create(true);
|
2025-01-14 18:33:28 +08:00
|
|
|
},
|
|
|
|
});
|
|
|
|
menus.push({
|
|
|
|
name: "fresh manual",
|
2025-01-27 21:25:44 +08:00
|
|
|
callback: (item) => {
|
|
|
|
ga.fireEventWithParam(GA_EventName.MouseMenu, item.name);
|
2025-01-15 14:38:53 +08:00
|
|
|
timer.clean();
|
2025-01-14 18:33:28 +08:00
|
|
|
},
|
|
|
|
});
|
2025-01-27 21:25:44 +08:00
|
|
|
menus.push({ type: ccui.menu.MenuType.Separator });
|
2025-01-14 18:33:28 +08:00
|
|
|
menus.push({
|
|
|
|
name: "fps show",
|
2025-01-27 21:25:44 +08:00
|
|
|
callback: (item) => {
|
|
|
|
ga.fireEventWithParam(GA_EventName.MouseMenu, item.name);
|
2025-01-14 18:33:28 +08:00
|
|
|
bridge.send(Msg.VisibleFPS, true);
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
menus.push({
|
|
|
|
name: "fps hide",
|
2025-01-27 21:25:44 +08:00
|
|
|
callback: (item) => {
|
|
|
|
ga.fireEventWithParam(GA_EventName.MouseMenu, item.name);
|
2025-01-14 18:33:28 +08:00
|
|
|
bridge.send(Msg.VisibleFPS, false);
|
|
|
|
},
|
|
|
|
});
|
2025-01-27 21:25:44 +08:00
|
|
|
menus.push({ type: ccui.menu.MenuType.Separator });
|
2025-01-14 17:44:26 +08:00
|
|
|
menus.push({
|
|
|
|
name: "game info",
|
2025-01-27 21:25:44 +08:00
|
|
|
callback(item) {
|
|
|
|
ga.fireEventWithParam(GA_EventName.MouseMenu, item.name);
|
2025-01-14 17:44:26 +08:00
|
|
|
ccui.dialog.showDialog({
|
|
|
|
comp: GameInfo,
|
|
|
|
title: "Game Info",
|
|
|
|
});
|
|
|
|
},
|
|
|
|
});
|
2025-01-27 21:25:44 +08:00
|
|
|
menus.push({ type: ccui.menu.MenuType.Separator });
|
|
|
|
menus.push({
|
|
|
|
name: "hover inspect",
|
|
|
|
selected: config.value.hoverInspect,
|
|
|
|
callback: (item) => {
|
|
|
|
ga.fireEventWithParam(GA_EventName.MouseMenu, item.name);
|
|
|
|
config.value.hoverInspect = !config.value.hoverInspect;
|
|
|
|
appStore().save();
|
|
|
|
},
|
|
|
|
});
|
|
|
|
menus.push({
|
|
|
|
name: "click inspect",
|
|
|
|
selected: config.value.clickInspect,
|
|
|
|
callback: (item) => {
|
|
|
|
ga.fireEventWithParam(GA_EventName.MouseMenu, item.name);
|
|
|
|
config.value.clickInspect = !config.value.clickInspect;
|
|
|
|
appStore().save();
|
|
|
|
},
|
|
|
|
});
|
2025-01-25 19:36:11 +08:00
|
|
|
if (data) {
|
2025-01-27 21:25:44 +08:00
|
|
|
menus.push({ type: ccui.menu.MenuType.Separator });
|
2025-01-25 19:36:11 +08:00
|
|
|
menus.push({
|
|
|
|
name: "copy name",
|
|
|
|
enabled: true,
|
2025-01-27 21:25:44 +08:00
|
|
|
callback(item) {
|
|
|
|
ga.fireEventWithParam(GA_EventName.MouseMenu, item.name);
|
2025-01-25 19:36:11 +08:00
|
|
|
console.log(data.text);
|
|
|
|
|
|
|
|
if (!data.text) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
navigator.clipboard
|
|
|
|
.writeText(data.text)
|
|
|
|
.then(() => {
|
|
|
|
ccui.footbar.showTips("copy success");
|
|
|
|
})
|
|
|
|
.catch((e) => {
|
|
|
|
console.log(e);
|
|
|
|
bridge.send(Msg.RequestLogCustom, data.text);
|
|
|
|
// bridge.send(Msg.ReqWriteClipboard, data.text);
|
|
|
|
});
|
|
|
|
},
|
|
|
|
});
|
2024-12-28 16:24:16 +08:00
|
|
|
menus.push({
|
2025-01-18 21:57:51 +08:00
|
|
|
name: "visible",
|
|
|
|
shortKey: "space",
|
2024-12-28 16:24:16 +08:00
|
|
|
enabled: true,
|
2025-01-27 21:25:44 +08:00
|
|
|
callback: (item) => {
|
|
|
|
ga.fireEventWithParam(GA_EventName.MouseMenu, item.name);
|
2025-01-06 19:46:38 +08:00
|
|
|
onQuickVisible();
|
2024-12-28 16:24:16 +08:00
|
|
|
},
|
|
|
|
});
|
|
|
|
menus.push({
|
|
|
|
name: "destroy",
|
2025-01-06 19:46:38 +08:00
|
|
|
enabled: true,
|
2025-01-27 21:25:44 +08:00
|
|
|
callback: (item) => {
|
|
|
|
ga.fireEventWithParam(GA_EventName.MouseMenu, item.name);
|
2025-01-25 19:36:11 +08:00
|
|
|
bridge.send(Msg.RequestDestroy, data.id);
|
2024-12-28 16:24:16 +08:00
|
|
|
},
|
|
|
|
});
|
|
|
|
}
|
|
|
|
ccui.menu.showMenuByMouseEvent(event, menus);
|
|
|
|
},
|
2024-12-27 21:08:26 +08:00
|
|
|
onChangeCase() {
|
|
|
|
matchCase.value = !matchCase.value;
|
|
|
|
updateFilterText(filterText);
|
|
|
|
},
|
|
|
|
};
|
|
|
|
},
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
<style lang="less" scoped>
|
|
|
|
.left {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
min-width: 200px;
|
|
|
|
width: 300px;
|
2025-01-12 17:57:02 +08:00
|
|
|
.engine-version {
|
|
|
|
flex: 1;
|
|
|
|
text-align: right;
|
|
|
|
padding-right: 5px;
|
|
|
|
font-size: 10px;
|
|
|
|
user-select: none;
|
2025-01-23 12:27:27 +08:00
|
|
|
text-overflow: ellipsis;
|
|
|
|
overflow: hidden;
|
|
|
|
white-space: nowrap;
|
2025-01-12 17:57:02 +08:00
|
|
|
}
|
2024-12-27 21:08:26 +08:00
|
|
|
.matchCase {
|
|
|
|
width: 30px;
|
|
|
|
height: 26px;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: row;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|