33 lines
1.0 KiB
TypeScript
Raw Normal View History

2021-10-16 16:16:58 +08:00
import App from "./App.vue";
import router from "./router";
import { setupStore } from "/@/store";
import { getServerConfig } from "./config";
import { createApp, Directive } from "vue";
import { usI18n } from "../src/plugins/i18n";
2021-10-16 21:17:18 +08:00
import { useTable } from "../src/plugins/vxe-table";
2021-10-16 16:16:58 +08:00
import { useElementPlus } from "../src/plugins/element-plus";
import { injectResponsiveStorage } from "/@/utils/storage/responsive";
import "animate.css";
// 导入公共样式
import "./style/index.scss";
// 导入字体图标
import "./assets/iconfont/iconfont.js";
import "./assets/iconfont/iconfont.css";
const app = createApp(App);
// 自定义指令
import * as directives from "/@/directives";
Object.keys(directives).forEach(key => {
app.directive(key, (directives as { [key: string]: Directive })[key]);
});
getServerConfig(app).then(async config => {
injectResponsiveStorage(app, config);
setupStore(app);
2021-10-16 21:17:18 +08:00
app.use(router).use(useElementPlus).use(useTable).use(usI18n);
2021-10-16 16:16:58 +08:00
await router.isReady();
app.mount("#app");
});