Skip to content

Commit ccf0ec7

Browse files
committed
fix: the url 404 when switch platform
1 parent c19392d commit ccf0ec7

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

docs/.vuepress/components/Navbar.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const extraNavList = themeData.value.extra_nav || [];
2929
></path>
3030
</svg>
3131
</div>
32-
<div class="search-input">搜索关键字</div>
32+
<div class="search-input">Search</div>
3333
</div>
3434
</div>
3535

@@ -91,7 +91,7 @@ export default {
9191
font-weight: 500;
9292
color: #999; /* 字体颜色 */
9393
font-size: 14px; /* 缩小字体大小 */
94-
width: 100px; /* 缩小输入框宽度 */
94+
width: 50px; /* 缩小输入框宽度 */
9595
margin-left: 0.4em; /* 缩小间距 */
9696
cursor: pointer;
9797
}

docs/.vuepress/components/PlatformSwitch.vue

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,16 @@ const onChange = (platform) => {
7272
let newPath = route.path.split('/')
7373
newPath[2] = platform
7474
const nextPathPath = newPath.join('/')
75-
75+
const quickstartPath = `/document/${platform}/quickstart.html`;
76+
const overviewPath = `/document/${platform}/overview.html`;
7677
if (nextPlatformDocRouters.indexOf(nextPathPath) > -1) {
77-
router.push(nextPathPath)
78+
router.push(nextPathPath);
79+
} else if (nextPlatformDocRouters.indexOf(quickstartPath) > -1) {
80+
router.push(quickstartPath);
81+
} else if (nextPlatformDocRouters.indexOf(overviewPath) > -1) {
82+
router.push(overviewPath);
7883
} else {
79-
router.push('/document/'+platform+'/overview.html')
84+
router.push(`/document/${platform}`);
8085
}
8186
}
8287

0 commit comments

Comments
 (0)