fix(GOV-009): 完成最终复审整改

This commit is contained in:
2026-08-13 18:51:14 +08:00
parent 3a8120a33a
commit cb550e3d5c
15 changed files with 197 additions and 8 deletions
+1
View File
@@ -3,6 +3,7 @@ import type { App } from 'vue';
import { createAppRouter } from './router';
/** 集中安装全局 Provider,防止页面自行创建重复的 Pinia 或 Router 实例。 */
export function installAppProviders(app: App) {
app.use(createPinia());
app.use(createAppRouter());
+1
View File
@@ -17,6 +17,7 @@ const routes: RouteRecordRaw[] = [
},
];
/** 创建可注入 history 的路由实例,使浏览器运行与单元测试共享同一路由表。 */
export function createAppRouter(history: RouterHistory = createWebHistory()) {
return createRouter({ history, routes });
}