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.

14 lines
651 B

  1. import { createApp } from 'vue' // 引入vue实例
  2. import App from './App.vue' // 引入App.vue
  3. import router from './router' // 引入router
  4. import axios from './api/axiosConfig'; // 引入axiosConfig
  5. import VotingManagement from './views/VotingManagement.vue' // 引入VotingManagement.vue
  6. import ElementPlus from 'element-plus'
  7. import 'element-plus/dist/index.css'
  8. const app = createApp(App) // 创建vue实例
  9. app.use(router) // 添加路由
  10. app.component('VotingManagement', VotingManagement) // 注册组件
  11. app.config.globalProperties.axios = axios; // 全局挂载axios
  12. app.mount('#app') // 挂载到id为app的div上
  13. app.use(ElementPlus)