修正监听oakpath时 判断错误
This commit is contained in:
parent
054352b411
commit
21061896f4
|
|
@ -451,7 +451,7 @@ const oakBehavior = Behavior({
|
|||
return;
|
||||
}
|
||||
this.setState(pathState, () => {
|
||||
if (data.oakPath === undefined) {
|
||||
if (data === undefined) {
|
||||
// 如果每个页面都在oakFullpath形成后再渲染子结点,这个if感觉是不应该命中的
|
||||
console.warn('发生了结点先形成再配置oakPath的情况,请检查代码修正');
|
||||
this.oakOption.lifetimes?.ready &&
|
||||
|
|
@ -539,7 +539,8 @@ function translatePropertiesToPropertyDefinitions(properties) {
|
|||
type: String,
|
||||
value: properties[prop],
|
||||
};
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
definitions[prop] = String;
|
||||
}
|
||||
break;
|
||||
|
|
@ -565,16 +566,19 @@ function translatePropertiesToPropertyDefinitions(properties) {
|
|||
type: Array,
|
||||
value: properties[prop],
|
||||
};
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
definitions[prop] = Array;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
if (Object.keys(properties[prop]).length > 0) {
|
||||
definitions[prop] = {
|
||||
type: Object,
|
||||
value: properties[prop],
|
||||
};
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
definitions[prop] = Object;
|
||||
}
|
||||
}
|
||||
|
|
@ -584,7 +588,6 @@ function translatePropertiesToPropertyDefinitions(properties) {
|
|||
Object.assign(definitions, {
|
||||
[prop]: Object,
|
||||
});
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
// 小程序也支持传函数 https://developers.weixin.qq.com/miniprogram/dev/framework/custom-component/wxml-wxss.html
|
||||
|
|
|
|||
|
|
@ -454,7 +454,7 @@ const oakBehavior = Behavior({
|
|||
return;
|
||||
}
|
||||
this.setState(pathState, () => {
|
||||
if (data.oakPath === undefined) {
|
||||
if (data === undefined) {
|
||||
// 如果每个页面都在oakFullpath形成后再渲染子结点,这个if感觉是不应该命中的
|
||||
console.warn('发生了结点先形成再配置oakPath的情况,请检查代码修正');
|
||||
this.oakOption.lifetimes?.ready &&
|
||||
|
|
|
|||
|
|
@ -670,7 +670,7 @@ const oakBehavior = Behavior<
|
|||
return;
|
||||
}
|
||||
this.setState(pathState as any, () => {
|
||||
if (data.oakPath === undefined) {
|
||||
if (data === undefined) {
|
||||
// 如果每个页面都在oakFullpath形成后再渲染子结点,这个if感觉是不应该命中的
|
||||
console.warn(
|
||||
'发生了结点先形成再配置oakPath的情况,请检查代码修正'
|
||||
|
|
|
|||
Loading…
Reference in New Issue