ruoyi-plus-soybean/build/plugins/soybeanjs.ts

19 lines
466 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import routerPage from '@soybeanjs/router-page';
export default function createSoybeanjsPlugin() {
return routerPage({
pagesFormatter: names => {
/** 系统的内置路由该文件夹名称不作为RouteKey */
const SYSTEM_VIEW = 'system-view';
const result = names
.filter(name => name !== SYSTEM_VIEW)
.map(name => {
return name.replace(`${SYSTEM_VIEW}_`, '');
});
return result;
}
});
}