Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
monorepo
/
venus
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
1
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 654bf90c
authored
Aug 11, 2024
by
falcon-jin
Committed by
GitHub
Aug 11, 2024
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix: missing route data in guard of web-ele and web-naive, fixed: #4108 (#4115) (#4117)
1 parent
9d6cc22d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
apps/web-ele/src/router/guard.ts
apps/web-naive/src/router/guard.ts
apps/web-ele/src/router/guard.ts
View file @
654bf90
...
@@ -115,10 +115,10 @@ function setupAccessGuard(router: Router) {
...
@@ -115,10 +115,10 @@ function setupAccessGuard(router: Router) {
// 保存菜单信息和路由信息
// 保存菜单信息和路由信息
accessStore
.
setAccessMenus
(
accessibleMenus
);
accessStore
.
setAccessMenus
(
accessibleMenus
);
accessStore
.
setAccessRoutes
(
accessibleRoutes
);
accessStore
.
setAccessRoutes
(
accessibleRoutes
);
const
redirectPath
=
(
from
.
query
.
redirect
??
to
.
p
ath
)
as
string
;
const
redirectPath
=
(
from
.
query
.
redirect
??
to
.
fullP
ath
)
as
string
;
return
{
return
{
path
:
decodeURIComponent
(
redirectPath
),
...
router
.
resolve
(
decodeURIComponent
(
redirectPath
)
),
replace
:
true
,
replace
:
true
,
};
};
});
});
...
...
apps/web-naive/src/router/guard.ts
View file @
654bf90
...
@@ -115,10 +115,10 @@ function setupAccessGuard(router: Router) {
...
@@ -115,10 +115,10 @@ function setupAccessGuard(router: Router) {
// 保存菜单信息和路由信息
// 保存菜单信息和路由信息
accessStore
.
setAccessMenus
(
accessibleMenus
);
accessStore
.
setAccessMenus
(
accessibleMenus
);
accessStore
.
setAccessRoutes
(
accessibleRoutes
);
accessStore
.
setAccessRoutes
(
accessibleRoutes
);
const
redirectPath
=
(
from
.
query
.
redirect
??
to
.
p
ath
)
as
string
;
const
redirectPath
=
(
from
.
query
.
redirect
??
to
.
fullP
ath
)
as
string
;
return
{
return
{
path
:
decodeURIComponent
(
redirectPath
),
...
router
.
resolve
(
decodeURIComponent
(
redirectPath
)
),
replace
:
true
,
replace
:
true
,
};
};
});
});
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment