Refactor code structure for improved readability and maintainability

This commit is contained in:
2026-02-18 03:37:45 +08:00
parent 63edd0fd84
commit f33d4c293d
12 changed files with 433 additions and 204 deletions

View File

@@ -54,15 +54,4 @@ export const simpleRouter = useContextKey('simpleRouter', () => {
return new SimpleRouter();
});
app.route({
path: 'router',
key: 'list',
description: '获取路由列表',
}).define(async (ctx) => {
const list = ctx.app.getList((item) => {
if (item?.path?.includes?.('auth') || item?.id?.includes?.('auth')) return false;
return true;
})
console.log('路由列表:', list.length);
ctx.body = { list }
}).addTo(app);
app.createRouteList()