ebike-plus-ui/src/main.ts

44 lines
1.2 KiB
TypeScript
Raw Normal View History

2024-04-14 16:51:11 +08:00
import { createApp } from "vue";
import "@/style.css";
import App from "@/App.vue";
2024-04-29 00:15:01 +08:00
// arco-design
2024-04-14 16:51:11 +08:00
import ArcoVue from "@arco-design/web-vue";
2024-04-29 00:15:01 +08:00
// vue-router
2024-04-14 16:51:11 +08:00
import router from "@/router/index";
2024-04-29 00:15:01 +08:00
// pinia
2024-04-14 16:51:11 +08:00
import pinia from "@/store/index";
2024-04-29 00:15:01 +08:00
// arco-css
2024-04-14 16:51:11 +08:00
import "@arco-design/web-vue/dist/arco.css";
2024-07-12 18:30:09 +08:00
// vchart-arco-theme 主题关联-黑暗模式
import { initVChartArcoTheme } from "@visactor/vchart-arco-theme";
2024-04-14 16:51:11 +08:00
// 额外引入图标库
import ArcoVueIcon from "@arco-design/web-vue/es/icon";
2024-04-29 00:15:01 +08:00
// 注册全局svg
import "virtual:svg-icons-register";
2024-04-28 14:28:26 +08:00
// 引入i18n
2024-04-27 19:18:49 +08:00
import i18n from "@/lang/index";
2024-05-18 14:32:15 +08:00
// 引入字体
import "@/assets/fonts/fonts.scss";
2024-07-12 18:30:09 +08:00
// 引入自定义指令
import directives from "@/directives/index";
2024-06-24 17:52:26 +08:00
2024-12-02 16:15:56 +08:00
// vchart黑暗模式
2024-07-26 18:06:00 +08:00
// https://arco.design/react/docs/vchart
2024-05-18 20:10:20 +08:00
initVChartArcoTheme();
2024-07-13 18:47:45 +08:00
2024-04-14 16:51:11 +08:00
const app = createApp(App);
2024-06-24 17:52:26 +08:00
2024-07-12 18:30:09 +08:00
// app.use(plugin, options)
// 其中 plugin 表示要传递的插件对象, options 参数是可选的,表示选项配置
2024-07-13 18:47:45 +08:00
// https://cn.vuejs.org/api/application.html#app-use
2024-07-12 18:30:09 +08:00
2024-04-14 16:51:11 +08:00
app.use(ArcoVue, {
componentPrefix: "arco"
});
app.use(pinia);
2024-04-29 00:15:01 +08:00
app.use(ArcoVueIcon);
2024-04-14 16:51:11 +08:00
app.use(router);
2024-04-29 00:15:01 +08:00
app.use(i18n);
2024-07-12 18:30:09 +08:00
app.use(directives);
2024-04-14 16:51:11 +08:00
app.mount("#app");