mirror of
https://github.com/tidys/cc-inspector-chrome
synced 2025-04-20 00:48:43 +00:00
增加Inspector清理功能
This commit is contained in:
parent
915f144986
commit
7ae3b5466a
@ -82,6 +82,8 @@ export enum GA_EventName {
|
|||||||
GamePlayer = "game_player",
|
GamePlayer = "game_player",
|
||||||
GamePause = "game_pause",
|
GamePause = "game_pause",
|
||||||
GameStep = "game_step",
|
GameStep = "game_step",
|
||||||
|
PickTop = "pick_top",
|
||||||
|
InspectorClear = "inspector_clear",
|
||||||
GameInspectorFilter = "game_inspector_filter",
|
GameInspectorFilter = "game_inspector_filter",
|
||||||
/**
|
/**
|
||||||
* 用户点击store广告链接
|
* 用户点击store广告链接
|
||||||
|
@ -138,12 +138,21 @@ export default defineComponent({
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
ccui.menu.showMenuByMouseEvent(event, [
|
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",
|
name: "Pick Top",
|
||||||
selected: config.value.pickTop,
|
selected: config.value.pickTop,
|
||||||
callback: (menu: IUiMenuItem) => {
|
callback: (menu: IUiMenuItem) => {
|
||||||
config.value.pickTop = !config.value.pickTop;
|
config.value.pickTop = !config.value.pickTop;
|
||||||
appStore().save();
|
appStore().save();
|
||||||
|
ga(GA_EventName.PickTop);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -28,6 +28,10 @@ export class Hint {
|
|||||||
private inspector: Inspector = null;
|
private inspector: Inspector = null;
|
||||||
constructor(inspector: Inspector) {
|
constructor(inspector: Inspector) {
|
||||||
this.inspector = inspector;
|
this.inspector = inspector;
|
||||||
|
document.addEventListener(DocumentEvent.InspectorClear, () => {
|
||||||
|
this.cleanHover();
|
||||||
|
this.cleanSelected();
|
||||||
|
});
|
||||||
document.addEventListener(DocumentEvent.GameInspectorBegan, (event: CustomEvent) => {
|
document.addEventListener(DocumentEvent.GameInspectorBegan, (event: CustomEvent) => {
|
||||||
const el = this.getTargetElement();
|
const el = this.getTargetElement();
|
||||||
if (!el) {
|
if (!el) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user