mirror of
https://github.com/tidys/cc-inspector-chrome
synced 2025-04-19 16:38:41 +00:00
支持我
This commit is contained in:
parent
14a8fea876
commit
93be854469
@ -82,6 +82,7 @@ export enum GA_EventName {
|
||||
GamePlayer = "game_player",
|
||||
GamePause = "game_pause",
|
||||
GameStep = "game_step",
|
||||
TreeSearch = "tree-search",
|
||||
/**
|
||||
* 用户点击store广告链接
|
||||
*/
|
||||
|
@ -42,13 +42,24 @@ export default defineComponent({
|
||||
name: "ad",
|
||||
components: { CCDialog, Banner, Memory, CCMenu },
|
||||
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();
|
||||
store.init();
|
||||
const rnd = randomSupport();
|
||||
const { config } = storeToRefs(appStore());
|
||||
const listArray = ref<ListItem[]>([
|
||||
{
|
||||
icon: "icon_shop_cart ani_shop_cart",
|
||||
txt: "Recommended Plugins",
|
||||
icon: `${rnd.icon} ani_shop_cart`,
|
||||
txt: rnd.title,
|
||||
contextmenu: () => {},
|
||||
visible: true,
|
||||
click: () => {
|
||||
|
@ -11,7 +11,7 @@
|
||||
<i class="matchCase iconfont icon_font_size" @click.stop="onChangeCase" title="match case" :style="{ color: matchCase ? 'red' : '' }"></i>
|
||||
</slot>
|
||||
</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>
|
||||
</div>
|
||||
</template>
|
||||
@ -197,7 +197,14 @@ export default defineComponent({
|
||||
if (config.value.refreshHirarchy) {
|
||||
rotateType.value = RotateType.Loop;
|
||||
}
|
||||
let preSearch = "";
|
||||
return {
|
||||
doSearch(v: string) {
|
||||
if (v && preSearch !== v) {
|
||||
ga.fireEventWithParam(GA_EventName.TreeSearch, v);
|
||||
preSearch = v;
|
||||
}
|
||||
},
|
||||
onClickRefresh() {
|
||||
updateTree();
|
||||
},
|
||||
@ -232,6 +239,7 @@ export default defineComponent({
|
||||
updateSelect(null);
|
||||
}
|
||||
},
|
||||
|
||||
onNodeExpand(data: TreeData) {
|
||||
if (data.id) {
|
||||
expandedKeys.value.push(data.id);
|
||||
|
Loading…
x
Reference in New Issue
Block a user