123456789101112131415161718192021222324252627282930313233343536373839 |
- import { createApp } from 'vue'
- import { createPinia } from 'pinia'
- import ElementPlus from 'element-plus'
- import "./TailWindCss/index.css";
- import 'element-plus/dist/index.css'
- // import './styles/element-plus.scss'
- import 'animate.css/animate.min.css' //引入动画
- import * as ElementPlusIconsVue from '@element-plus/icons-vue'
- import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
- import App from './App.vue'
- import router from './router/index'
- import * as echarts from 'echarts';
- import zhCn from "element-plus/dist/locale/zh-cn.mjs";
- import customize from '@/utils/customInstructions'
- const app = createApp(App)
- const pinia = createPinia()
- pinia.use(piniaPluginPersistedstate)
- // element-ui
- for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
- app.component(key, component)
- }
- // 注册自定义指令
- for (const [key, value] of Object.entries(customize)) {
- app.directive(value.key, value.directive)
- }
- app.config.globalProperties.$echarts = echarts;
- app
- .use(ElementPlus, {
- locale: zhCn,
- zIndex: 1800,
- })
- .use(createPinia())
- .use(router)
- .use(pinia)
- .mount("#app");
|