Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dcxy-manage-shell
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
姜雷
dcxy-manage-shell
Commits
2ea0ddae
Commit
2ea0ddae
authored
Mar 27, 2019
by
姜雷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加基本地址配置
parent
8901c98b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
8 deletions
+15
-8
main.js
src/lib/main.js
+9
-2
main.js
src/main.js
+1
-0
index.js
src/router/index.js
+5
-6
No files found.
src/lib/main.js
View file @
2ea0ddae
import
'normalize.css/normalize.css'
;
import
'normalize.css/normalize.css'
;
import
App
from
'../App'
;
import
App
from
'../App'
;
import
router
,
{
constantRouterMap
,
routeStore
}
from
'../router'
;
import
{
constantRouterMap
,
routeStore
}
from
'../router'
;
import
store
from
'../store'
;
import
store
from
'../store'
;
import
createBaseFetch
from
'./Api'
;
import
createBaseFetch
from
'./Api'
;
import
configRoutePermission
from
'./permission'
;
import
configRoutePermission
from
'./permission'
;
...
@@ -25,11 +25,18 @@ class SystemShell {
...
@@ -25,11 +25,18 @@ class SystemShell {
this
.
mixinModule
=
mixinModule
;
this
.
mixinModule
=
mixinModule
;
this
.
utils
=
utilsModule
;
this
.
utils
=
utilsModule
;
}
}
createSystem
=
({
routers
,
routeFilter
})
=>
{
createSystem
=
({
basePath
=
'/'
,
routers
,
routeFilter
})
=>
{
const
router
=
new
VueRouter
({
mode
:
'history'
,
base
:
basePath
,
scrollBehavior
:
()
=>
({
y
:
0
}),
routes
:
constantRouterMap
,
});
routeStore
.
install
(
store
);
routeStore
.
install
(
store
);
extendCom
(
Vue
);
extendCom
(
Vue
);
configRoutePermission
(
router
,
store
,
routers
);
configRoutePermission
(
router
,
store
,
routers
);
Vue
.
config
.
productionTip
=
false
;
Vue
.
config
.
productionTip
=
false
;
console
.
log
(
router
);
let
app
=
new
Vue
({
let
app
=
new
Vue
({
el
:
'#app'
,
el
:
'#app'
,
...
...
src/main.js
View file @
2ea0ddae
...
@@ -9,5 +9,6 @@ let allAasyncRouterMap = [
...
@@ -9,5 +9,6 @@ let allAasyncRouterMap = [
];
];
System
.
createSystem
({
System
.
createSystem
({
basePath
:
process
.
env
.
VUE_APP_BASE_URL
,
routers
:
allAasyncRouterMap
,
routers
:
allAasyncRouterMap
,
});
});
src/router/index.js
View file @
2ea0ddae
...
@@ -33,9 +33,8 @@ const asyncRouterMap = [{ path: '*', redirect: '/404', hidden: true }];
...
@@ -33,9 +33,8 @@ const asyncRouterMap = [{ path: '*', redirect: '/404', hidden: true }];
export
{
constantRouterMap
,
asyncRouterMap
,
routeStore
};
export
{
constantRouterMap
,
asyncRouterMap
,
routeStore
};
export
default
new
VueRouter
({
export
default
{
mode
:
'history'
,
constantRouterMap
,
base
:
process
.
env
.
VUE_APP_BASE_URL
,
asyncRouterMap
,
scrollBehavior
:
()
=>
({
y
:
0
}),
routeStore
,
routes
:
constantRouterMap
,
};
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment