mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 13:39:24 +08:00
fix: condition
This commit is contained in:
parent
add06ecbdb
commit
a2da2edcb5
@ -112,9 +112,7 @@ export class PluginMobileServer extends Plugin {
|
|||||||
parentId: ctx.action.params.values,
|
parentId: ctx.action.params.values,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
if (tabs.length > 1 || !tabs[0].hidden) {
|
if (tabs.length === 1 && tabs[0].hidden) {
|
||||||
return;
|
|
||||||
}
|
|
||||||
const repository = this.app.db.getRepository('rolesMobileRoutes');
|
const repository = this.app.db.getRepository('rolesMobileRoutes');
|
||||||
const whereOrValues = {
|
const whereOrValues = {
|
||||||
roleName: ctx.action.params.associatedIndex,
|
roleName: ctx.action.params.associatedIndex,
|
||||||
@ -128,6 +126,7 @@ export class PluginMobileServer extends Plugin {
|
|||||||
if (actionName === 'remove') {
|
if (actionName === 'remove') {
|
||||||
rolesMobileRoute && (await repository.destroy({ filter: whereOrValues }));
|
rolesMobileRoute && (await repository.destroy({ filter: whereOrValues }));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.app.resourceManager.registerActionHandlers({
|
this.app.resourceManager.registerActionHandlers({
|
||||||
'roles.mobileRoutes:add': processRoleMobileRoutes,
|
'roles.mobileRoutes:add': processRoleMobileRoutes,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user