mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-12-26 15:00:16 +08:00
refactor(projects): 精简版+动态路由权限初步
This commit is contained in:
10
src/utils/common/design-pattern.ts
Normal file
10
src/utils/common/design-pattern.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
/** 执行策略模式 */
|
||||
export function exeStrategyActions(actions: Common.StrategyAction[]) {
|
||||
actions.some(item => {
|
||||
const [flag, action] = item;
|
||||
if (flag) {
|
||||
action();
|
||||
}
|
||||
return flag;
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user