You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
1020 B
JavaScript

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

import { createApp } from "vue";
import App from "./App.vue";
import router from "./router";
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
import { createPinia } from "pinia";
import piniaPluginPersistedstate from "pinia-plugin-persistedstate";
import i18n from "./i18n/index.js";
import "@/assets/style/reset.css";
import "@/assets/style/index.scss";
import "@/assets/style/common.scss";
import { vScrollProxy } from '@/directives/scrollProxy'
// SVG sprite 虚拟模块(必须引入才能注入 symbol
import "virtual:svg-icons-register";
import SvgIcon from "@/components/SvgIcon/index.vue";
const pinia = createPinia();
pinia.use(piniaPluginPersistedstate);
const app = createApp(App);
app.directive('scrollProxy', vScrollProxy)
// 注册全局 SVG 图标组件
app.component("SvgIcon", SvgIcon);
app.use(i18n);
app.use(pinia);
app.use(router);
app.use(ElementPlus);
app.mount("#app");
// 主题在 stores/theme setup 内已自动初始化,无须在 main.js 手动调用