mirror of
https://github.com/tidys/cc-inspector-chrome
synced 2025-04-16 07:01:03 +00:00
bugfix
This commit is contained in:
parent
bc2052e2b7
commit
8e67104ec6
@ -1,6 +1,7 @@
|
||||
declare const cc: any;
|
||||
|
||||
export const enumConfig: Array<{
|
||||
export function getEnumListConfig() {
|
||||
const enumConfig: Array<{
|
||||
type: any;
|
||||
list: Array<{
|
||||
key: string;
|
||||
@ -222,3 +223,5 @@ export const enumConfig: Array<{
|
||||
],
|
||||
},
|
||||
];
|
||||
return enumConfig;
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
import { uniq } from "lodash";
|
||||
import { Msg, PluginEvent, RequestLogData, RequestNodeInfoData, RequestSetPropertyData, ResponseGameInfoData, ResponseNodeInfoData, ResponseSetPropertyData, ResponseSupportData, ResponseTreeInfoData } from "../../core/types";
|
||||
import { ArrayData, BoolData, ColorData, DataType, EngineData, EnumData, Group, ImageData, Info, InvalidData, NodeInfoData, NumberData, ObjectCircleData, ObjectData, Property, StringData, TreeData, Vec2Data, Vec3Data, Vec4Data } from "../../views/devtools/data";
|
||||
import { enumConfig } from "./enumConfig";
|
||||
import { getEnumListConfig } from "./enumConfig";
|
||||
import { InjectEvent } from "./event";
|
||||
import { Hint } from "./hint";
|
||||
import { injectView } from "./inject-view";
|
||||
@ -517,8 +517,9 @@ export class Inspector extends InjectEvent {
|
||||
return false;
|
||||
}
|
||||
private getEnum(node: any, key: string): Array<{ name: string; value: number }> | null {
|
||||
for (let i = 0; i < enumConfig.length; i++) {
|
||||
const { type, list } = enumConfig[i];
|
||||
const cfgArray = getEnumListConfig();
|
||||
for (let i = 0; i < cfgArray.length; i++) {
|
||||
const { type, list } = cfgArray[i];
|
||||
if (type && node instanceof type) {
|
||||
const ret = list.find((item) => item.key === key);
|
||||
if (ret) {
|
||||
|
@ -94,6 +94,7 @@ export function getSimpleProperties(typeName: string): string[] {
|
||||
config[CompType.RichText] = [
|
||||
"string",
|
||||
"horizontalAlign",
|
||||
"verticalAlign",
|
||||
"fontSize",
|
||||
"font",
|
||||
"fontFamily",
|
||||
|
Loading…
x
Reference in New Issue
Block a user