Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
胡锦波
/
org-manager-web
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
01143797
authored
Mar 29, 2022
by
胡锦波
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
1. init fix
parent
e9234cbd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
src/router/compatible-url.ts
src/router/compatible-url.ts
View file @
01143797
...
...
@@ -43,9 +43,6 @@ const compatibleUrl = [
const
direction4AbsolutePathMap
=
new
Map
<
Direction
,
string
>
();
/**
* 根据path 和 direction拿到需要重定向的路径, 主要是适配之前的路由
*/
const
setDirectionEnum4Url
=
function
(
routes
:
RouteConfig
[],
prefix
=
''
)
{
for
(
let
i
=
0
;
i
<
routes
.
length
;
i
++
)
{
const
route
=
routes
[
i
];
...
...
@@ -62,6 +59,9 @@ const setDirectionEnum4Url = function(routes: RouteConfig[], prefix = '') {
}
};
/**
* 根据oldPath 和 direction拿到需要重定向的路径, 主要是适配老项目的路由
*/
const
setCompatibleUrl
=
function
(
routes
:
RouteConfig
[]):
RedirectPath
[]
{
setDirectionEnum4Url
(
routes
);
return
compatibleUrl
.
map
(
i
=>
{
...
...
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