提交 0a81e955 编写于 作者: D DCloud_LXH

fix: normalizeLink

上级 2b176a0c
......@@ -9,7 +9,7 @@ function isExternal(path) {
}
function normalizeLink(url) {
if (!url.startsWith('/') && folderNames.some(item => url.startsWith(item))) {
if (!url.startsWith('/') && folderNames.some(item => url.split('/')[0] === item)) {
return '/' + url
}
return url
......
......@@ -12,6 +12,8 @@ const routerMap = {
'/collocation/i18n': '/worktile/i18n.html',
'/collocation/env': '/tutorial/env.html',
'/collocation/ssr': '/tutorial/ssr.html',
'/ssr': '/tutorial/ssr.html',
'/ssr/': '/tutorial/ssr.html',
'/collocation/frame/window': '/tutorial/page.html#getapp',
'/collocation/frame/window#getcurrentpages': '/tutorial/page.html#getcurrentpages',
'/collocation/auto/api': '/worktile/auto/api.html',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册