path/upsert页面没有处理sourceEntity是user的情况/mp环境下对hide/show的处理有问题
This commit is contained in:
parent
89514145e4
commit
fd0b3364c6
|
|
@ -118,7 +118,7 @@ export default OakComponent({
|
|||
return true;
|
||||
});
|
||||
const schema = this.features.cache.getSchema();
|
||||
const legalSourceEntity = !!schema[de].relation?.length;
|
||||
const legalSourceEntity = !!schema[de].relation?.length || de === 'user';
|
||||
this.update({
|
||||
destEntity: de,
|
||||
sourceEntity: de,
|
||||
|
|
@ -156,7 +156,7 @@ export default OakComponent({
|
|||
return false;
|
||||
});
|
||||
const schema = this.features.cache.getSchema();
|
||||
const legalSourceEntity = !!schema[choice.entity].relation?.length;
|
||||
const legalSourceEntity = !!schema[choice.entity].relation?.length || choice.entity === 'user';
|
||||
this.setState({
|
||||
pathChoice: pathChoice2,
|
||||
pathChosen: pathChosen2,
|
||||
|
|
|
|||
|
|
@ -679,12 +679,12 @@ export function createComponent(option, features) {
|
|||
const { show } = this.oakOption.lifetimes || {};
|
||||
show && show.call(this);
|
||||
this.reRender();
|
||||
this.subscribeAll();
|
||||
// this.subscribeAll();
|
||||
},
|
||||
hide() {
|
||||
const { hide } = this.oakOption.lifetimes || {};
|
||||
hide && hide.call(this);
|
||||
this.unsubscribeAll();
|
||||
// this.unsubscribeAll();
|
||||
},
|
||||
resize(resizeOption) {
|
||||
const { resize } = this.oakOption.lifetimes || {};
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ export default OakComponent({
|
|||
}
|
||||
);
|
||||
const schema = this.features.cache.getSchema();
|
||||
const legalSourceEntity = !!schema[de as keyof typeof schema].relation?.length;
|
||||
const legalSourceEntity = !!schema[de as keyof typeof schema].relation?.length || de === 'user';
|
||||
this.update({
|
||||
destEntity: de,
|
||||
sourceEntity: de,
|
||||
|
|
@ -185,7 +185,7 @@ export default OakComponent({
|
|||
}
|
||||
);
|
||||
const schema = this.features.cache.getSchema();
|
||||
const legalSourceEntity = !!schema[choice.entity as keyof typeof schema].relation?.length;
|
||||
const legalSourceEntity = !!schema[choice.entity as keyof typeof schema].relation?.length || choice.entity;
|
||||
this.setState({
|
||||
pathChoice: pathChoice2,
|
||||
pathChosen: pathChosen2,
|
||||
|
|
|
|||
|
|
@ -1000,12 +1000,16 @@ export function createComponent<
|
|||
const { show } = this.oakOption.lifetimes || {};
|
||||
show && show.call(this);
|
||||
this.reRender();
|
||||
this.subscribeAll();
|
||||
// this.subscribeAll();
|
||||
},
|
||||
hide() {
|
||||
const { hide } = this.oakOption.lifetimes || {};
|
||||
hide && hide.call(this);
|
||||
this.unsubscribeAll();
|
||||
/**
|
||||
* 不能unsubscribeAll,小程序的页面不会销毁,如果一个页面需要token才能取数据,这时候去了登录页再回来就得依靠feature上的subscribe来refresh
|
||||
* by Xc 20250913
|
||||
*/
|
||||
// this.unsubscribeAll();
|
||||
},
|
||||
resize(resizeOption: WechatMiniprogram.Page.IResizeOption) {
|
||||
const { resize } = this.oakOption.lifetimes || {};
|
||||
|
|
|
|||
Loading…
Reference in New Issue