mirror of
https://github.com/tidys/cc-inspector-chrome
synced 2025-04-20 00:48:43 +00:00
fix icon
This commit is contained in:
parent
797d75bb2b
commit
47744fd87e
@ -31,20 +31,23 @@
|
|||||||
<CCButton
|
<CCButton
|
||||||
v-show="isShowRefreshBtn"
|
v-show="isShowRefreshBtn"
|
||||||
type="success"
|
type="success"
|
||||||
class="el-icon-refresh"
|
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="onBtnClickUpdateTree"
|
@click="onBtnClickUpdateTree"
|
||||||
></CCButton>
|
>
|
||||||
<CCButton @click="onClickSettings" class="el-icon-s-tools"></CCButton>
|
<i class="iconfont icon_refresh"></i>
|
||||||
|
</CCButton>
|
||||||
|
<CCButton @click="onClickSettings">
|
||||||
|
<i class="iconfont icon_settings"></i>
|
||||||
|
</CCButton>
|
||||||
</div>
|
</div>
|
||||||
<CCInput placeholder="enter keywords to filter" :data="filterText">
|
<CCInput placeholder="enter keywords to filter" :data="filterText">
|
||||||
<slot>
|
<slot>
|
||||||
<div
|
<i
|
||||||
class="matchCase iconfont el-icon-third-font-size"
|
class="matchCase iconfont icon_font_size"
|
||||||
@click.stop="onChangeCase"
|
@click.stop="onChangeCase"
|
||||||
title="match case"
|
title="match case"
|
||||||
:style="{ color: matchCase ? 'red' : '' }"
|
:style="{ color: matchCase ? 'red' : '' }"
|
||||||
></div>
|
></i>
|
||||||
</slot>
|
</slot>
|
||||||
</CCInput>
|
</CCInput>
|
||||||
<div class="treeList">
|
<div class="treeList">
|
||||||
@ -80,11 +83,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div v-show="!isShowDebug" class="no-find">
|
<div v-show="!isShowDebug" class="no-find">
|
||||||
<span>No games created by cocos creator found!</span>
|
<span>No games created by cocos creator found!</span>
|
||||||
<CCButton
|
<CCButton type="success" @click="onBtnClickUpdatePage">
|
||||||
type="success"
|
<i class="iconfont icon_refresh"></i>
|
||||||
class="el-icon-refresh"
|
|
||||||
@click="onBtnClickUpdatePage"
|
|
||||||
>刷新
|
|
||||||
</CCButton>
|
</CCButton>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -571,7 +571,6 @@ export default defineComponent({
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
|
|
||||||
#devtools {
|
#devtools {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
@ -1,16 +1,21 @@
|
|||||||
import { ChromeConst } from "cc-plugin/src/chrome/const";
|
import { ChromeConst } from "cc-plugin/src/chrome/const";
|
||||||
import { connectBackground } from "./connectBackground";
|
import { connectBackground } from "./connectBackground";
|
||||||
import { PluginEvent, Msg, Page } from "../../core/types";
|
import { PluginEvent, Msg, Page } from "../../core/types";
|
||||||
|
import CCP from "cc-plugin/src/ccp/entry-render";
|
||||||
export function init() {
|
export function init() {
|
||||||
if (chrome && chrome.devtools) {
|
if (chrome && chrome.devtools) {
|
||||||
// 对应的是Elements面板的边栏
|
// 对应的是Elements面板的边栏
|
||||||
chrome.devtools.panels.elements.createSidebarPane('Cocos', function (sidebar) {
|
chrome.devtools.panels.elements.createSidebarPane(CCP.manifest.name, function (sidebar) {
|
||||||
sidebar.setObject({ some_data: "some data to show!" });
|
sidebar.setObject({ some_data: "some data to show!" });
|
||||||
});
|
});
|
||||||
|
|
||||||
// 创建devtools-panel
|
// 创建devtools-panel
|
||||||
chrome.devtools.panels.create("Cocos", "icons/48.png", ChromeConst.html.devtools, (panel: chrome.devtools.panels.ExtensionPanel) => {
|
let iconPath = "";
|
||||||
|
const { icon } = CCP.manifest;
|
||||||
|
if (icon && icon['48']) {
|
||||||
|
iconPath = icon['48'];
|
||||||
|
}
|
||||||
|
chrome.devtools.panels.create(CCP.manifest.name, iconPath, ChromeConst.html.devtools, (panel: chrome.devtools.panels.ExtensionPanel) => {
|
||||||
console.log("[CC-Inspector] Dev Panel Created!");
|
console.log("[CC-Inspector] Dev Panel Created!");
|
||||||
panel.onShown.addListener((window) => {
|
panel.onShown.addListener((window) => {
|
||||||
// 面板显示,查询是否是cocos游戏
|
// 面板显示,查询是否是cocos游戏
|
||||||
|
@ -7,8 +7,8 @@
|
|||||||
@mouseleave="showLogBtn = false"
|
@mouseleave="showLogBtn = false"
|
||||||
>
|
>
|
||||||
<div style="margin: 0 5px">
|
<div style="margin: 0 5px">
|
||||||
<i v-if="fold" class="el-icon-caret-right"></i>
|
<i v-if="fold" class="iconfont icon_arrow_right"></i>
|
||||||
<i v-if="!fold" class="el-icon-caret-bottom"></i>
|
<i v-if="!fold" class="iconfont icon_arrow_down"></i>
|
||||||
</div>
|
</div>
|
||||||
<div style="flex: 1">
|
<div style="flex: 1">
|
||||||
{{ group.name }}
|
{{ group.name }}
|
||||||
@ -17,9 +17,9 @@
|
|||||||
style="margin-right: 10px"
|
style="margin-right: 10px"
|
||||||
v-show="showLogBtn"
|
v-show="showLogBtn"
|
||||||
type="success"
|
type="success"
|
||||||
icon="el-icon-chat-dot-round"
|
|
||||||
@click.stop="onLog"
|
@click.stop="onLog"
|
||||||
>
|
>
|
||||||
|
<i class="iconfont icon_print"></i>
|
||||||
</CCButton>
|
</CCButton>
|
||||||
</div>
|
</div>
|
||||||
<div class="content" v-show="!fold">
|
<div class="content" v-show="!fold">
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
<i
|
<i
|
||||||
class="data-arrow"
|
class="data-arrow"
|
||||||
v-if="arrow"
|
v-if="arrow"
|
||||||
:class="fold ? 'el-icon-caret-right' : 'el-icon-caret-bottom'"
|
:class="fold ? 'iconfont icon_arrow_right' : 'iconfont icon_arrow_down'"
|
||||||
:style="{
|
:style="{
|
||||||
visibility: isArrayOrObject() ? 'visible' : 'hidden',
|
visibility: isArrayOrObject() ? 'visible' : 'hidden',
|
||||||
'margin-left': indent * 10 + 'px',
|
'margin-left': indent * 10 + 'px',
|
||||||
@ -138,11 +138,9 @@
|
|||||||
<div class="type">{{ value["engineType"] }}</div>
|
<div class="type">{{ value["engineType"] }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="name">{{ value["engineName"] }}</div>
|
<div class="name">{{ value["engineName"] }}</div>
|
||||||
<CCButton
|
<CCButton @click="onPlaceInTree" type="primary">
|
||||||
@click="onPlaceInTree"
|
<i class="iconfont icon_place"></i>
|
||||||
type="primary"
|
</CCButton>
|
||||||
icon="el-icon-place"
|
|
||||||
></CCButton>
|
|
||||||
</div>
|
</div>
|
||||||
<div v-if="value.isObject() && fold" class="objectDesc">
|
<div v-if="value.isObject() && fold" class="objectDesc">
|
||||||
{{ value.data }}
|
{{ value.data }}
|
||||||
@ -290,16 +288,16 @@ export default defineComponent({
|
|||||||
getEngineTypeIcon() {
|
getEngineTypeIcon() {
|
||||||
switch ((value as EngineData).engineType) {
|
switch ((value as EngineData).engineType) {
|
||||||
case "cc_Sprite": {
|
case "cc_Sprite": {
|
||||||
return "el-icon-picture-outline";
|
return "icon_picture";
|
||||||
}
|
}
|
||||||
case "cc_Label": {
|
case "cc_Label": {
|
||||||
return "el-icon-third-text";
|
return "icon_text";
|
||||||
}
|
}
|
||||||
case "cc_Node": {
|
case "cc_Node": {
|
||||||
return "el-icon-third-node";
|
return "icon_node";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return "el-icon-third-unknow";
|
return "icon_unknown";
|
||||||
},
|
},
|
||||||
getName(isArray: boolean, arr: Property) {
|
getName(isArray: boolean, arr: Property) {
|
||||||
const type = arr.value.type;
|
const type = arr.value.type;
|
||||||
|
@ -3,10 +3,9 @@
|
|||||||
<div class="head">
|
<div class="head">
|
||||||
<div class="name">{{ title }}</div>
|
<div class="name">{{ title }}</div>
|
||||||
<div style="flex: 1"></div>
|
<div style="flex: 1"></div>
|
||||||
<CCButton
|
<CCButton @click="onClickOptions">
|
||||||
class="el-icon-setting btn"
|
<i class="iconfont icon_setting"></i>
|
||||||
@click="onClickOptions"
|
</CCButton>
|
||||||
></CCButton>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="wechat">
|
<div class="wechat">
|
||||||
@ -48,7 +47,14 @@ const { CCInput, CCButton, CCInputNumber, CCSelect, CCCheckBox, CCColor } =
|
|||||||
ccui.components;
|
ccui.components;
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "popup",
|
name: "popup",
|
||||||
components: {CCInput, CCButton, CCInputNumber, CCSelect, CCCheckBox, CCColor},
|
components: {
|
||||||
|
CCInput,
|
||||||
|
CCButton,
|
||||||
|
CCInputNumber,
|
||||||
|
CCSelect,
|
||||||
|
CCCheckBox,
|
||||||
|
CCColor,
|
||||||
|
},
|
||||||
setup(props, ctx) {
|
setup(props, ctx) {
|
||||||
const title = ref(CCP.manifest.name);
|
const title = ref(CCP.manifest.name);
|
||||||
const version = ref(CCP.manifest.version);
|
const version = ref(CCP.manifest.version);
|
||||||
@ -106,9 +112,6 @@ export default defineComponent({
|
|||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn {
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.wechat {
|
.wechat {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user