Files
finance-master/apps/finance/src/main.ts
chenghuan 4163a322d7 feat: 初始化财务系统基础架构
新增财务系统基础架构,包括:
- 核心API接口(用户、菜单、权限)
- 状态管理模块(系统字典)
- 路由配置(仪表盘、系统管理)
- 基础页面布局(登录、个人中心、错误页)
- 国际化配置
- 环境变量配置
- 组件库集成(表格、表单、图表)
- 构建工具配置(vite、tailwind)
- 权限控制模块
2026-01-06 18:01:42 +08:00

32 lines
945 B
TypeScript

import { initPreferences } from '@vben/preferences';
import { unmountGlobalLoading } from '@vben/utils';
import { overridesPreferences } from './preferences';
/**
* 应用初始化完成之后再进行页面加载渲染
*/
async function initApplication() {
// name用于指定项目唯一标识
// 用于区分不同项目的偏好设置以及存储数据的key前缀以及其他一些需要隔离的数据
const env = import.meta.env.PROD ? 'prod' : 'dev';
const appVersion = import.meta.env.VITE_APP_VERSION;
const namespace = `${import.meta.env.VITE_APP_NAMESPACE}-${appVersion}-${env}`;
// app偏好设置初始化
await initPreferences({
namespace,
overrides: overridesPreferences,
});
// 启动应用并挂载
// vue应用主要逻辑及视图
const { bootstrap } = await import('./bootstrap');
await bootstrap(namespace);
// 移除并销毁loading
unmountGlobalLoading();
}
initApplication();