File tree Expand file tree Collapse file tree 6 files changed +12
-54
lines changed Expand file tree Collapse file tree 6 files changed +12
-54
lines changed Original file line number Diff line number Diff line change 1212 "@codemirror/lang-html" : " ^0.20.0" ,
1313 "@codemirror/lang-javascript" : " ^0.20.0" ,
1414 "@codemirror/theme-one-dark" : " ^0.20.0" ,
15+ "@element-plus/icons-vue" : " ^2.3.1" ,
1516 "axios" : " ^0.27.2" ,
1617 "element-plus" : " ^2.7.0" ,
1718 "vue" : " ^3.4.0" ,
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ let vue = {
2020import request from './request.js' ;
2121util . request = request . request ;
2222
23- import { router } from '../router' ;
23+ import router from '../router' ;
2424
2525// 注销登录
2626util . logout = function ( ) {
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import { createApp } from 'vue'
1111import App from './App.vue'
1212import './index.css'
1313import 'virtual:uno.css'
14- import router from './plugins/ router' ;
14+ import router from './router' ;
1515import ElementPlus from 'element-plus'
1616import zhCn from 'element-plus/es/locale/lang/zh-cn'
1717import 'element-plus/dist/index.css' //引入element-plus样式
Original file line number Diff line number Diff line change 1111import qs from 'qs' ;
1212import axios from "axios" ;
1313import base from '../libs/base' ;
14- import { router } from '../router' ;
14+ import router from '../router' ;
1515
1616// 配置参考: https://github.com/axios/axios#request-config
1717// axios.defaults.headers.common['CloudId'] = '0'; // 云应用ID
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1- /**
2- * +----------------------------------------------------------------------
3- * | uiadmin [ 渐进式快速开发接口后台 ]
4- * +----------------------------------------------------------------------
5- * | Copyright (c) 2018-2022 http://uiadmin.jiangruyi.com All rights reserved.
6- * +----------------------------------------------------------------------
7- * | Author: jry <[email protected] > 8- * +----------------------------------------------------------------------
9- */
10-
11- import { createRouter , createWebHistory , createWebHashHistory } from 'vue-router' ;
12-
13- const routes = [
14- {
15- path : '/base' ,
16- component : ( ) => import ( '@/pages/base.vue' ) ,
17- children : [
18- {
19- path : '/' ,
20- component : ( ) => import ( '@/pages/home.vue' )
21- } ,
22- {
23- path : '/user/login' ,
24- component : ( ) => import ( '@/pages/user/login.vue' )
25- } ,
26- {
27- path : '/user/register' ,
28- component : ( ) => import ( '@/pages/user/register.vue' )
29- }
30- ]
31- } ,
32- ]
33-
1+ import { createRouter , createWebHistory } from 'vue-router' ;
2+ import routes from '~pages' ;
3+
344const router = createRouter ( {
35- // 4. 内部提供了 history 模式的实现。为了简单起见,我们在这里使用 hash 模式。
36- history : createWebHashHistory ( ) ,
37- routes, // `routes: routes` 的缩写
38- } )
39-
40- export {
41- router ,
42- createRouter
43- }
5+ history : createWebHistory ( ) ,
6+ routes,
7+ } ) ;
8+
9+ export default router ;
You can’t perform that action at this time.
0 commit comments