mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2025-12-17 00:52:51 +00:00
46 lines
850 B
TypeScript
46 lines
850 B
TypeScript
import { createApp } from "vue";
|
|
import App from "./App.vue";
|
|
|
|
// cool
|
|
import { bootstrap } from "./core";
|
|
|
|
// router
|
|
import router from "./router";
|
|
|
|
// store
|
|
import store from "./store";
|
|
|
|
import "./mock";
|
|
|
|
// element-plus
|
|
import ElementPlus from "element-plus";
|
|
import "./assets/css/element-variables.scss";
|
|
import locale from "element-plus/lib/locale/lang/zh-cn";
|
|
|
|
// mitt
|
|
import mitt from "mitt";
|
|
|
|
// echarts
|
|
import VueECharts from "vue-echarts";
|
|
|
|
const app = createApp(App);
|
|
|
|
bootstrap(app)
|
|
.then(() => {
|
|
// echarts 可视图表
|
|
app.component("v-chart", VueECharts);
|
|
|
|
// 事件通讯
|
|
app.provide("mitt", mitt());
|
|
|
|
app.use(store).use(router).use(ElementPlus, { locale }).mount("#app");
|
|
})
|
|
.catch((err: string) => {
|
|
console.error(`COOL-ADMIN 启动失败`, err);
|
|
});
|
|
|
|
store.dispatch("appLoad");
|
|
|
|
// @ts-ignore
|
|
window.__app__ = app;
|