Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
Admin
Project
Project
Details
Activity
Releases
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
周远喜
Admin
Commits
3db1dad0
Commit
3db1dad0
authored
Mar 20, 2020
by
周远喜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
打开页面处理
parent
e67f7a54
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
page.js
store/admin/page.js
+10
-10
No files found.
store/admin/page.js
View file @
3db1dad0
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* 多标签页
* 多标签页
* */
* */
import
{
get
}
from
'lodash'
;
import
{
get
}
from
'lodash'
;
import
router
from
'@/router'
;
//
import router from '@/router';
import
Setting
from
'@/setting'
;
import
Setting
from
'@/setting'
;
import
menuSider
from
'@/menu/sider'
;
import
menuSider
from
'@/menu/sider'
;
import
{
getAllSiderMenu
,
includeArray
}
from
'@/libs/system'
;
import
{
getAllSiderMenu
,
includeArray
}
from
'@/libs/system'
;
...
@@ -245,7 +245,7 @@ export const actions={
...
@@ -245,7 +245,7 @@ export const actions={
params
,
params
,
query
query
};
};
router
.
push
(
routerObj
,
()
=>
{});
$nuxt
.
$
router
.
push
(
routerObj
,
()
=>
{});
}
}
// end
// end
resolve
();
resolve
();
...
@@ -269,8 +269,8 @@ export const actions={
...
@@ -269,8 +269,8 @@ export const actions={
state
.
opened
.
splice
(
1
,
currentIndex
-
1
).
forEach
(({
name
})
=>
commit
(
'keepAliveRemove'
,
name
));
state
.
opened
.
splice
(
1
,
currentIndex
-
1
).
forEach
(({
name
})
=>
commit
(
'keepAliveRemove'
,
name
));
}
}
state
.
current
=
pageAim
;
state
.
current
=
pageAim
;
if
(
router
.
app
.
$route
.
fullPath
!==
pageAim
)
{
if
(
$nuxt
.
$router
.
fullPath
!==
pageAim
)
{
router
.
push
(
pageAim
);
$nuxt
.
$
router
.
push
(
pageAim
);
}
}
// 持久化
// 持久化
await
dispatch
(
'opened2db'
);
await
dispatch
(
'opened2db'
);
...
@@ -295,8 +295,8 @@ export const actions={
...
@@ -295,8 +295,8 @@ export const actions={
state
.
opened
.
splice
(
currentIndex
+
1
).
forEach
(({
name
})
=>
commit
(
'keepAliveRemove'
,
name
));
state
.
opened
.
splice
(
currentIndex
+
1
).
forEach
(({
name
})
=>
commit
(
'keepAliveRemove'
,
name
));
// 设置当前的页面
// 设置当前的页面
state
.
current
=
pageAim
;
state
.
current
=
pageAim
;
if
(
router
.
app
.
$route
.
fullPath
!==
pageAim
)
{
if
(
$nuxt
.
$router
.
fullPath
!==
pageAim
)
{
router
.
push
(
pageAim
);
$nuxt
.
$
router
.
push
(
pageAim
);
}
}
// 持久化
// 持久化
await
dispatch
(
'opened2db'
);
await
dispatch
(
'opened2db'
);
...
@@ -326,8 +326,8 @@ export const actions={
...
@@ -326,8 +326,8 @@ export const actions={
}
}
// 设置新的页面
// 设置新的页面
state
.
current
=
pageAim
;
state
.
current
=
pageAim
;
if
(
router
.
app
.
$route
.
fullPath
!==
pageAim
)
{
if
(
$nuxt
.
$router
.
fullPath
!==
pageAim
)
{
router
.
push
(
pageAim
);
$nuxt
.
$
router
.
push
(
pageAim
);
}
}
// 持久化
// 持久化
await
dispatch
(
'opened2db'
);
await
dispatch
(
'opened2db'
);
...
@@ -346,8 +346,8 @@ export const actions={
...
@@ -346,8 +346,8 @@ export const actions={
// 持久化
// 持久化
await
dispatch
(
'opened2db'
);
await
dispatch
(
'opened2db'
);
// 关闭所有的标签页后需要判断一次现在是不是在首页
// 关闭所有的标签页后需要判断一次现在是不是在首页
if
(
router
.
app
.
$route
.
name
!==
'index'
)
{
if
(
$nuxt
.
$router
.
name
!==
'index'
)
{
router
.
push
({
$nuxt
.
$
router
.
push
({
name
:
'index'
name
:
'index'
},
()
=>
{});
},
()
=>
{});
}
}
...
...
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