Skip to content

Commit 7423da6

Browse files
committed
修复路由中的一个错误link
1 parent 57885cc commit 7423da6

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

docs/.vitepress/theme/components/ChapterContents.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ let tocs: { link: string; text: string }[][] = [];
1919
2020
// console.log("chapter_root", chapter_root);
2121
// console.log("ChapterItems[chapter_root]", ChapterItems[chapter_root]);
22+
2223
const items = ChapterItems[chapter_root];
2324
if (!items) {
2425
const { page } = useData();
@@ -32,6 +33,7 @@ if (!items) {
3233
);
3334
} else {
3435
items.forEach((subchapter) => {
36+
console.log(subchapter);
3537
const t = subchapter.items?.filter((item) => {
3638
return item.link !== chapter_root && !item.goback;
3739
});

docs/.vitepress/theme/constrants/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ const items_xrobot_platform_esp32 = [
201201
const items_xrobot_platform_others = [
202202
{
203203
text: "厂商接入指南",
204-
link: Chapters.xrobot_platform,
204+
link: Chapters.xrobot_platform_others,
205205
collapsed: true,
206206
items: [
207207
...items_xrobot_platform_device,
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<script setup>
2+
import { Chapters } from "../../../.vitepress/theme/constrants/route";
3+
4+
const chapter_root = Chapters.xrobot_platform_others;
5+
</script>
6+
7+
<ChapterContents :chapter=chapter_root />

0 commit comments

Comments
 (0)