docs: 添加注释 (#1924)
This commit is contained in:
parent
c0edd7b70e
commit
cfbd52bbe7
|
|
@ -27,3 +27,4 @@ pnpm-debug.log*
|
||||||
*.njsproj
|
*.njsproj
|
||||||
*.sln
|
*.sln
|
||||||
*.sw?
|
*.sw?
|
||||||
|
/package-lock.json
|
||||||
|
|
|
||||||
|
|
@ -19,28 +19,37 @@ async function bootstrap() {
|
||||||
const app = createApp(App);
|
const app = createApp(App);
|
||||||
|
|
||||||
// Configure store
|
// Configure store
|
||||||
|
// 配置 store
|
||||||
setupStore(app);
|
setupStore(app);
|
||||||
|
|
||||||
// Initialize internal system configuration
|
// Initialize internal system configuration
|
||||||
|
// 初始化内部系统配置
|
||||||
initAppConfigStore();
|
initAppConfigStore();
|
||||||
|
|
||||||
// Register global components
|
// Register global components
|
||||||
|
// 注册全局组件
|
||||||
registerGlobComp(app);
|
registerGlobComp(app);
|
||||||
|
|
||||||
// Multilingual configuration
|
// Multilingual configuration
|
||||||
|
// 多语言配置
|
||||||
// Asynchronous case: language files may be obtained from the server side
|
// Asynchronous case: language files may be obtained from the server side
|
||||||
|
// 异步案例:语言文件可能从服务器端获取
|
||||||
await setupI18n(app);
|
await setupI18n(app);
|
||||||
|
|
||||||
// Configure routing
|
// Configure routing
|
||||||
|
// 配置路由
|
||||||
setupRouter(app);
|
setupRouter(app);
|
||||||
|
|
||||||
// router-guard
|
// router-guard
|
||||||
|
// 路由守卫
|
||||||
setupRouterGuard(router);
|
setupRouterGuard(router);
|
||||||
|
|
||||||
// Register global directive
|
// Register global directive
|
||||||
|
// 注册全局指令
|
||||||
setupGlobDirectives(app);
|
setupGlobDirectives(app);
|
||||||
|
|
||||||
// Configure global error handling
|
// Configure global error handling
|
||||||
|
// 配置全局错误处理
|
||||||
setupErrorHandle(app);
|
setupErrorHandle(app);
|
||||||
|
|
||||||
// https://next.router.vuejs.org/api/#isready
|
// https://next.router.vuejs.org/api/#isready
|
||||||
|
|
|
||||||
|
|
@ -14,9 +14,13 @@ const getRouteNames = (array: any[]) =>
|
||||||
getRouteNames(basicRoutes);
|
getRouteNames(basicRoutes);
|
||||||
|
|
||||||
// app router
|
// app router
|
||||||
|
// 创建一个可以被 Vue 应用程序使用的路由实例
|
||||||
export const router = createRouter({
|
export const router = createRouter({
|
||||||
|
// 创建一个 hash 历史记录。
|
||||||
history: createWebHashHistory(import.meta.env.VITE_PUBLIC_PATH),
|
history: createWebHashHistory(import.meta.env.VITE_PUBLIC_PATH),
|
||||||
|
// 应该添加到路由的初始路由列表。
|
||||||
routes: basicRoutes as unknown as RouteRecordRaw[],
|
routes: basicRoutes as unknown as RouteRecordRaw[],
|
||||||
|
// 是否应该禁止尾部斜杠。默认为假
|
||||||
strict: true,
|
strict: true,
|
||||||
scrollBehavior: () => ({ left: 0, top: 0 }),
|
scrollBehavior: () => ({ left: 0, top: 0 }),
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,7 @@ export const LoginRoute: AppRouteRecordRaw = {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Basic routing without permission
|
// Basic routing without permission
|
||||||
|
// 未经许可的基本路由
|
||||||
export const basicRoutes = [
|
export const basicRoutes = [
|
||||||
LoginRoute,
|
LoginRoute,
|
||||||
RootRoute,
|
RootRoute,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue