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 7041c6a1
authored
Feb 24, 2025
by
Netfan
Committed by
GitHub
Feb 24, 2025
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
chore: output console error for invalid route component (#5593)
1 parent
12ffb310
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
packages/utils/src/helpers/generate-routes-backend.ts
packages/utils/src/helpers/generate-routes-backend.ts
View file @
7041c6a
...
@@ -56,12 +56,14 @@ function convertRoutes(
...
@@ -56,12 +56,14 @@ function convertRoutes(
// 页面组件转换
// 页面组件转换
}
else
if
(
component
)
{
}
else
if
(
component
)
{
const
normalizePath
=
normalizeViewPath
(
component
);
const
normalizePath
=
normalizeViewPath
(
component
);
route
.
component
=
const
pageKey
=
normalizePath
.
endsWith
(
'.vue'
)
pageMap
[
normalizePath
.
endsWith
(
'.vue'
)
?
normalizePath
?
normalizePath
:
`
${
normalizePath
}
.vue`
:
`
${
normalizePath
}
.vue`
;
];
if
(
pageMap
[
pageKey
])
{
route
.
component
=
pageMap
[
pageKey
];
}
else
{
console
.
error
(
`route component is invalid:
${
pageKey
}
`
,
route
);
}
}
}
return
route
;
return
route
;
...
...
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