diff --git a/source/src/devtools/data.ts b/source/src/devtools/data.ts
index 72771aa..7790ddc 100644
--- a/source/src/devtools/data.ts
+++ b/source/src/devtools/data.ts
@@ -222,3 +222,8 @@ export class Group {
this.data = orderKeys.concat(otherKeys);
}
}
+
+export interface NodeInfoData {
+ uuid: string;// 节点的uuid
+ group: Group[];
+}
diff --git a/source/src/devtools/ui/index.vue b/source/src/devtools/ui/index.vue
index e7756e4..95d57d7 100644
--- a/source/src/devtools/ui/index.vue
+++ b/source/src/devtools/ui/index.vue
@@ -11,7 +11,7 @@
inspect target:
-
+
@@ -31,13 +31,13 @@
- set
+
-
+
@@ -67,11 +67,11 @@
- 未发现cocos creator的游戏!
+ No games created by cocos creator found!
刷新
@@ -83,7 +83,16 @@ import {Component, Watch} from "vue-property-decorator";
import properties from "./propertys.vue";
import {Msg, Page, PluginEvent} from "@/core/types"
import {connectBackground} from "@/devtools/connectBackground";
-import {EngineData, FrameDetails, Info, ObjectData, ObjectItemRequestData, TreeData} from "@/devtools/data";
+import {
+ EngineData,
+ FrameDetails,
+ Group,
+ Info,
+ NodeInfoData,
+ ObjectData,
+ ObjectItemRequestData,
+ TreeData
+} from "@/devtools/data";
import Bus, {BusMsg} from "@/devtools/bus";
import settingsVue from "./settings.vue"
import {RefreshAuto, RefreshManual, settings} from "@/devtools/settings";
@@ -96,7 +105,7 @@ import {RefreshAuto, RefreshManual, settings} from "@/devtools/settings";
})
export default class Index extends Vue {
private isShowDebug: boolean = false;
- treeItemData: Array> = [];
+ treeItemData: NodeInfoData | null = null;
treeData: Array = []
expandedKeys: Array = [];
selectedUUID: string | null = null;
@@ -248,11 +257,8 @@ export default class Index extends Vue {
}
}
- _onMsgNodeInfo(eventData: any) {
+ _onMsgNodeInfo(eventData: NodeInfoData) {
this.isShowDebug = true;
- if (!Array.isArray(eventData)) {
- eventData = [eventData]
- }
this.treeItemData = eventData;
}
@@ -274,7 +280,7 @@ export default class Index extends Vue {
_reset() {
this.treeData = [];
- this.treeItemData = [];
+ this.treeItemData = null;
}
mounted() {
diff --git a/source/src/devtools/ui/propertys.vue b/source/src/devtools/ui/propertys.vue
index f7b836d..a23d0f5 100644
--- a/source/src/devtools/ui/propertys.vue
+++ b/source/src/devtools/ui/propertys.vue
@@ -1,6 +1,6 @@