mirror of
https://github.com/tidys/cc-inspector-chrome
synced 2025-04-19 16:38:41 +00:00
bugfix
This commit is contained in:
parent
a911869066
commit
4f84a33152
@ -224,10 +224,6 @@ export default class UiProp extends Vue {
|
|||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
this.watchValue();
|
this.watchValue();
|
||||||
if(this.isInvalid()){
|
|
||||||
this.value.data;
|
|
||||||
debugger
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
isShowTooltip() {
|
isShowTooltip() {
|
||||||
|
@ -258,6 +258,7 @@ class CCInspector {
|
|||||||
const data: ImageData = options.data;
|
const data: ImageData = options.data;
|
||||||
const path: Array<string> = options.path;
|
const path: Array<string> = options.path;
|
||||||
if (ctor && value instanceof ctor) {
|
if (ctor && value instanceof ctor) {
|
||||||
|
// 2.4.6 没有了这个属性
|
||||||
if (value.hasOwnProperty("_textureFilename")) {
|
if (value.hasOwnProperty("_textureFilename")) {
|
||||||
data.path = path;
|
data.path = path;
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
@ -327,13 +328,16 @@ class CCInspector {
|
|||||||
}))
|
}))
|
||||||
if (!info) {
|
if (!info) {
|
||||||
if (typeof propertyValue === "object") {
|
if (typeof propertyValue === "object") {
|
||||||
let ctorName = propertyValue.constructor.name;
|
let ctorName = propertyValue.constructor?.name;
|
||||||
if (ctorName.startsWith("cc_")) {
|
if (ctorName) {
|
||||||
info = new EngineData();
|
if (ctorName.startsWith("cc_")) {
|
||||||
info.engineType = ctorName;
|
info = new EngineData();
|
||||||
info.engineName = propertyValue.name;
|
info.engineType = ctorName;
|
||||||
info.engineUUID = propertyValue.uuid;
|
info.engineName = propertyValue.name;
|
||||||
|
info.engineUUID = propertyValue.uuid;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
|
// 空{}
|
||||||
info = this._buildObjectData({
|
info = this._buildObjectData({
|
||||||
data: new ObjectData(),
|
data: new ObjectData(),
|
||||||
path: path,
|
path: path,
|
||||||
@ -393,7 +397,7 @@ class CCInspector {
|
|||||||
|
|
||||||
_isInvalidValue(value: any) {
|
_isInvalidValue(value: any) {
|
||||||
// !!Infinity=true
|
// !!Infinity=true
|
||||||
if ((value && value !== Infinity) || value === 0 || value === false) {
|
if ((value && value !== Infinity) || value === 0 || value === false || value === "") {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -577,7 +581,7 @@ class CCInspector {
|
|||||||
let target = this.inspectorGameMemoryStorage;
|
let target = this.inspectorGameMemoryStorage;
|
||||||
for (let i = 0; i < path.length; i++) {
|
for (let i = 0; i < path.length; i++) {
|
||||||
let key = path[i];
|
let key = path[i];
|
||||||
if (target.hasOwnProperty(key)) {
|
if (target[key] !== undefined || target.hasOwnProperty(key)) {
|
||||||
target = target[key]
|
target = target[key]
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user