feat: element-plus app (#32)
* chore: init project * chore: install element-plus * chore: locale config * fix: eslint error * chore: merge from main * fix: lint * chore: finish todo * chore: update comments * chore: update * fix: lint error * chore: add unplugin-element-plus * chore: add useElementPlusDesignTokens * chore: configure some color
This commit is contained in:
31
apps/web-ele/src/bootstrap.ts
Normal file
31
apps/web-ele/src/bootstrap.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
import { createApp } from 'vue';
|
||||
|
||||
import { registerAccessDirective } from '@vben/access';
|
||||
import { initStores } from '@vben/stores';
|
||||
import '@vben/styles';
|
||||
import '@vben/styles/antd';
|
||||
|
||||
import { setupI18n } from '#/locales';
|
||||
|
||||
import App from './app.vue';
|
||||
import { router } from './router';
|
||||
|
||||
async function bootstrap(namespace: string) {
|
||||
const app = createApp(App);
|
||||
|
||||
// 国际化 i18n 配置
|
||||
await setupI18n(app);
|
||||
|
||||
// 配置 pinia-tore
|
||||
await initStores(app, { namespace });
|
||||
|
||||
// 安装权限指令
|
||||
registerAccessDirective(app);
|
||||
|
||||
// 配置路由及路由守卫
|
||||
app.use(router);
|
||||
|
||||
app.mount('#app');
|
||||
}
|
||||
|
||||
export { bootstrap };
|
Reference in New Issue
Block a user