|
|
@ -3,8 +3,9 @@ import { createApp } from "vue";
|
|
|
|
import App from "./App.vue";
|
|
|
|
import App from "./App.vue";
|
|
|
|
import ElementPlus from "element-plus";
|
|
|
|
import ElementPlus from "element-plus";
|
|
|
|
import "element-plus/dist/index.css";
|
|
|
|
import "element-plus/dist/index.css";
|
|
|
|
|
|
|
|
|
|
|
|
import { createRouter, createWebHistory } from "vue-router";
|
|
|
|
import { createRouter, createWebHistory } from "vue-router";
|
|
|
|
|
|
|
|
import axios from "axios";
|
|
|
|
|
|
|
|
axios.defaults.baseURL = '/api'
|
|
|
|
|
|
|
|
|
|
|
|
const routes = [
|
|
|
|
const routes = [
|
|
|
|
{ path: "/login", component: () => import("./components/login/Index.vue") },
|
|
|
|
{ path: "/login", component: () => import("./components/login/Index.vue") },
|
|
|
@ -19,9 +20,9 @@ const router = createRouter({
|
|
|
|
history: createWebHistory(),
|
|
|
|
history: createWebHistory(),
|
|
|
|
routes,
|
|
|
|
routes,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
//https://cn.vuejs.org/api/application.html#app-config-compileroptions
|
|
|
|
|
|
|
|
|
|
|
|
let app = createApp(App);
|
|
|
|
let app = createApp(App);
|
|
|
|
app.use(router);
|
|
|
|
app.use(router);
|
|
|
|
app.use(ElementPlus);
|
|
|
|
app.use(ElementPlus);
|
|
|
|
|
|
|
|
app.config.globalProperties.$http = axios;
|
|
|
|
app.mount("#app");
|
|
|
|
app.mount("#app");
|
|
|
|