path/upsert页面没有处理sourceEntity是user的情况/mp环境下对hide/show的处理有问题

This commit is contained in:
Xu Chang 2025-09-13 20:06:30 +08:00
parent 89514145e4
commit fd0b3364c6
4 changed files with 12 additions and 8 deletions

View File

@ -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,

View File

@ -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 || {};

View File

@ -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,

View File

@ -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();
/**
* unsubscribeAlltoken才能取数据feature上的subscribe来refresh
* by Xc 20250913
*/
// this.unsubscribeAll();
},
resize(resizeOption: WechatMiniprogram.Page.IResizeOption) {
const { resize } = this.oakOption.lifetimes || {};