import { createApp } from 'vue' import { createRouter, createWebHashHistory } from 'vue-router' import './style.css' import App from './App.vue' import axios from 'axios'; import Wgy from './components/table/Wgy.vue'; import Ddy from './components/table/Ddy.vue'; import ZfGa from './components/table/ZfGa.vue'; import Wgz from './components/table/Wgz.vue'; import Znbm from './components/table/Znbm.vue'; // 路由 const router = createRouter({ history: createWebHashHistory(), routes: [ { name: 'wgy', path: '/', component: Wgy }, { name: 'ddy', path: '/ddy', component: Ddy }, { name: 'zfga', path: '/zfga', component: ZfGa }, { name: 'wgz', path: '/wgz', component: Wgz }, { name: 'znbm', path: '/znbm', component: Znbm }, ] }); // axios const createAxios = { install(app, options) { axios.defaults.baseURL = 'http://127.0.0.1:8087/bigdata'; axios.defaults.timeout = 20000; app.config.globalProperties.$axios = axios; } } const app = createApp(App); app.use(router); app.use(createAxios); app.mount('#app');