增加Inspector清理功能

This commit is contained in:
xu_yanfeng
2025-01-25 18:24:37 +08:00
parent 915f144986
commit 7ae3b5466a
3 changed files with 15 additions and 0 deletions

View File

@@ -138,12 +138,21 @@ export default defineComponent({
};
});
ccui.menu.showMenuByMouseEvent(event, [
{
name: "Clear",
callback: (menu: IUiMenuItem) => {
const event = new CustomEvent(DocumentEvent.InspectorClear);
document.dispatchEvent(event);
ga(GA_EventName.InspectorClear);
},
},
{
name: "Pick Top",
selected: config.value.pickTop,
callback: (menu: IUiMenuItem) => {
config.value.pickTop = !config.value.pickTop;
appStore().save();
ga(GA_EventName.PickTop);
},
},
{