You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
import {createApp} from 'vue'import App from './App.vue'import router from './router'import ElementPlus from 'element-plus'import zhCn from 'element-plus/es/locale/lang/zh-cn'import 'element-plus/dist/index.css'import * as ElementPlusIconsVue from '@element-plus/icons-vue'import './assets/css/common.css' // 引入公共CSS文件
import JsonExcel from 'vue-json-excel'import {createPinia} from 'pinia'import VxeUI from 'vxe-pc-ui'import 'vxe-pc-ui/lib/style.css'import VxeUITable from 'vxe-table'import 'vxe-table/lib/style.css'// 修正导入路径
import {useAdminStore} from './store'import request from "@/util/request";import "./global.css";import '@/assets/css/btn.css';
const app = createApp(App)const pinia = createPinia()
// 全局注册 ElementPlus 图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) { app.component(key, component)}
// 先注册组件再挂载
app.component('downloadExcel', JsonExcel)app.config.globalProperties.$http = request
// 使用各种插件
app.use(ElementPlus, { locale: zhCn}) .use(router) .use(VxeUI) .use(VxeUITable) .use(pinia) .mount('#app')
// 在 app 挂载之后再使用 store
const adminStore = useAdminStore()adminStore.initFromLocalStorage()
|