perf: 前端配置Element Plus按需引入,优化Axios错误拦截提示
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import "element-plus/dist/index.css";
|
||||
import "element-plus/theme-chalk/el-message.css";
|
||||
import "element-plus/theme-chalk/el-message-box.css";
|
||||
import "vant/lib/index.css";
|
||||
import "./styles/base.css";
|
||||
|
||||
import ElementPlus from "element-plus";
|
||||
import { createPinia } from "pinia";
|
||||
import { createApp } from "vue";
|
||||
|
||||
@@ -14,7 +14,7 @@ import { useSessionStore } from "./stores/session";
|
||||
const app = createApp(App);
|
||||
const pinia = createPinia();
|
||||
|
||||
app.use(pinia).use(router).use(ElementPlus);
|
||||
app.use(pinia).use(router);
|
||||
|
||||
window.addEventListener("auth-storage-changed", () => {
|
||||
useSessionStore(pinia).syncFromStorage();
|
||||
|
||||
Reference in New Issue
Block a user