mirror of
https://github.com/tidys/cc-inspector-chrome
synced 2025-04-20 00:48:43 +00:00
支持我
This commit is contained in:
parent
14a8fea876
commit
93be854469
@ -82,6 +82,7 @@ export enum GA_EventName {
|
|||||||
GamePlayer = "game_player",
|
GamePlayer = "game_player",
|
||||||
GamePause = "game_pause",
|
GamePause = "game_pause",
|
||||||
GameStep = "game_step",
|
GameStep = "game_step",
|
||||||
|
TreeSearch = "tree-search",
|
||||||
/**
|
/**
|
||||||
* 用户点击store广告链接
|
* 用户点击store广告链接
|
||||||
*/
|
*/
|
||||||
|
@ -42,13 +42,24 @@ export default defineComponent({
|
|||||||
name: "ad",
|
name: "ad",
|
||||||
components: { CCDialog, Banner, Memory, CCMenu },
|
components: { CCDialog, Banner, Memory, CCMenu },
|
||||||
setup() {
|
setup() {
|
||||||
|
function randomSupport(): { icon: string; title: string } {
|
||||||
|
const arr = [
|
||||||
|
{ icon: "icon_shop_cart", title: "冲冲冲" },
|
||||||
|
{ icon: "icon_good", title: "赞一个" },
|
||||||
|
{ icon: "icon_coffe", title: "请我喝杯咖啡" },
|
||||||
|
];
|
||||||
|
const idx = Math.floor(Math.random() * arr.length);
|
||||||
|
return arr[idx];
|
||||||
|
}
|
||||||
|
|
||||||
const store = appStore();
|
const store = appStore();
|
||||||
store.init();
|
store.init();
|
||||||
|
const rnd = randomSupport();
|
||||||
const { config } = storeToRefs(appStore());
|
const { config } = storeToRefs(appStore());
|
||||||
const listArray = ref<ListItem[]>([
|
const listArray = ref<ListItem[]>([
|
||||||
{
|
{
|
||||||
icon: "icon_shop_cart ani_shop_cart",
|
icon: `${rnd.icon} ani_shop_cart`,
|
||||||
txt: "Recommended Plugins",
|
txt: rnd.title,
|
||||||
contextmenu: () => {},
|
contextmenu: () => {},
|
||||||
visible: true,
|
visible: true,
|
||||||
click: () => {
|
click: () => {
|
||||||
|
@ -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 :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 @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>
|
||||||
@ -197,7 +197,14 @@ export default defineComponent({
|
|||||||
if (config.value.refreshHirarchy) {
|
if (config.value.refreshHirarchy) {
|
||||||
rotateType.value = RotateType.Loop;
|
rotateType.value = RotateType.Loop;
|
||||||
}
|
}
|
||||||
|
let preSearch = "";
|
||||||
return {
|
return {
|
||||||
|
doSearch(v: string) {
|
||||||
|
if (v && preSearch !== v) {
|
||||||
|
ga.fireEventWithParam(GA_EventName.TreeSearch, v);
|
||||||
|
preSearch = v;
|
||||||
|
}
|
||||||
|
},
|
||||||
onClickRefresh() {
|
onClickRefresh() {
|
||||||
updateTree();
|
updateTree();
|
||||||
},
|
},
|
||||||
@ -232,6 +239,7 @@ export default defineComponent({
|
|||||||
updateSelect(null);
|
updateSelect(null);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onNodeExpand(data: TreeData) {
|
onNodeExpand(data: TreeData) {
|
||||||
if (data.id) {
|
if (data.id) {
|
||||||
expandedKeys.value.push(data.id);
|
expandedKeys.value.push(data.id);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user