mirror of
https://github.com/tidys/cc-inspector-chrome
synced 2025-04-20 08:58:41 +00:00
增加tree icon的开关
This commit is contained in:
parent
2563c9dd22
commit
cc3c93c56c
@ -11,7 +11,7 @@
|
|||||||
<i class="matchCase iconfont icon_font_size" @click.stop="onChangeCase" title="match case" :style="{ color: matchCase ? 'red' : '' }"></i>
|
<i class="matchCase iconfont icon_font_size" @click.stop="onChangeCase" title="match case" :style="{ color: matchCase ? 'red' : '' }"></i>
|
||||||
</slot>
|
</slot>
|
||||||
</CCInput>
|
</CCInput>
|
||||||
<CCTree :show-icon="true" @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>
|
<CCTree :show-icon="config.showTreeIcon" @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>
|
||||||
</CCDock>
|
</CCDock>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -199,6 +199,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
let preSearch = "";
|
let preSearch = "";
|
||||||
return {
|
return {
|
||||||
|
config,
|
||||||
doSearch(v: string) {
|
doSearch(v: string) {
|
||||||
if (v && preSearch !== v) {
|
if (v && preSearch !== v) {
|
||||||
ga.fireEventWithParam(GA_EventName.TreeSearch, v);
|
ga.fireEventWithParam(GA_EventName.TreeSearch, v);
|
||||||
@ -323,6 +324,16 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
menus.push({ type: ccui.menu.MenuType.Separator });
|
menus.push({ type: ccui.menu.MenuType.Separator });
|
||||||
|
menus.push({
|
||||||
|
name: "tree icon",
|
||||||
|
selected: config.value.showTreeIcon,
|
||||||
|
callback(item) {
|
||||||
|
ga.fireEventWithParam(GA_EventName.MouseMenu, item.name);
|
||||||
|
config.value.showTreeIcon = !config.value.showTreeIcon;
|
||||||
|
appStore().save();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
menus.push({ type: ccui.menu.MenuType.Separator });
|
||||||
menus.push({
|
menus.push({
|
||||||
name: "hover inspect",
|
name: "hover inspect",
|
||||||
selected: config.value.hoverInspect,
|
selected: config.value.hoverInspect,
|
||||||
|
@ -36,6 +36,10 @@ export class ConfigData {
|
|||||||
* 当节点树点击时,游戏是否同步Inspect
|
* 当节点树点击时,游戏是否同步Inspect
|
||||||
*/
|
*/
|
||||||
clickInspect: boolean = true;
|
clickInspect: boolean = true;
|
||||||
|
/**
|
||||||
|
* 显示节点树的icon
|
||||||
|
*/
|
||||||
|
showTreeIcon: boolean = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const appStore = defineStore("app", () => {
|
export const appStore = defineStore("app", () => {
|
||||||
@ -52,6 +56,7 @@ export const appStore = defineStore("app", () => {
|
|||||||
config.value.refreshInspector = !!data.refreshInspector;
|
config.value.refreshInspector = !!data.refreshInspector;
|
||||||
config.value.hoverInspect = !!data.hoverInspect;
|
config.value.hoverInspect = !!data.hoverInspect;
|
||||||
config.value.clickInspect = !!data.clickInspect;
|
config.value.clickInspect = !!data.clickInspect;
|
||||||
|
config.value.showTreeIcon = !!data.showTreeIcon;
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
frameID,
|
frameID,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user