Commit d0c4741f authored by rockyl's avatar rockyl

修复过程props缺少的问题

parent 54b6ab20
......@@ -1880,6 +1880,9 @@
return exports;
}
function trimChar(str, char) {
if (!str || !char) {
return;
}
while (true) {
var len = str.length, from = 0, end = len;
if (str[0] === char) {
......@@ -2377,10 +2380,10 @@
case 'link':
var linkedValue = this.resolveLinkedProp(value, key);
if (linkedValue !== undefined) {
props[key] = undefined;
props[key] = linkedValue;
}
else {
props[key] = linkedValue;
props[key] = undefined;
}
break;
case 'static':
......@@ -2407,6 +2410,9 @@
props[key] = findNodeByUUID(this._vm.globalContext.gameStage, uuid);
}
}
else if (originProps[key] !== undefined) {
props[key] = originProps[key];
}
if (props[key] === undefined && propsConfig[key].hasOwnProperty('default')) {
props[key] = propsConfig[key]['default'];
}
......
This diff is collapsed.
......@@ -183,9 +183,9 @@ export class Process {
case 'link':
let linkedValue = this.resolveLinkedProp(value, key);
if (linkedValue !== undefined) {
props[key] = undefined;
}else{
props[key] = linkedValue;
}else{
props[key] = undefined;
}
break;
case 'static':
......@@ -210,6 +210,8 @@ export class Process {
if (uuid) {
props[key] = findNodeByUUID(this._vm.globalContext.gameStage, uuid);
}
}else if(originProps[key] !== undefined){
props[key] = originProps[key];
}
if (props[key] === undefined && propsConfig[key].hasOwnProperty('default')) {
......
......@@ -164,6 +164,9 @@ export function importUMDCode(code) {
}
export function trimChar(str: string, char: string) {
if (!str || !char) {
return;
}
while (true) {
let len = str.length, from = 0, end = len;
if (str[0] === char) {
......@@ -194,7 +197,7 @@ export function findVariable(name: string, ...contexts) {
for (let context of contexts) {
if (context) {
result = context[name];
if(result !== undefined){
if (result !== undefined) {
break;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment