Skip to content

Commit 172ff11

Browse files
committed
fix: type error
1 parent 82c9ba4 commit 172ff11

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

docs/.vitepress/locales/common.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ gtag('config', 'G-29NKGSL23C');`,
3030
],
3131
]
3232

33-
export const sidebar = (lang: string): DefaultTheme.Sidebar => {
33+
export const sidebar = (lang: string): DefaultTheme.SidebarItem[] => {
3434
const urlPrefix = lang ? `/${lang}` : ''
3535
return [
3636
{

docs/.vitepress/locales/zh-cn.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export const nav: DefaultTheme.NavItem[] = [
1010
{ text: '特性', link: '/zh-CN/features/hoist-static' },
1111
]
1212

13-
export const sidebar = common.sidebar('zh-CN') as DefaultTheme.SidebarGroup[]
13+
export const sidebar = common.sidebar('zh-CN')
1414

1515
const sidebarTitle: string[] = ['指南', '宏', '特性']
1616
const sidebarItem: string[][] = [
@@ -20,7 +20,7 @@ const sidebarItem: string[][] = [
2020
]
2121
sidebar.forEach((bar, i) => {
2222
bar.text = sidebarTitle[i]
23-
bar.items.forEach((item, j) => {
23+
bar.items!.forEach((item, j) => {
2424
if (sidebarItem[i][j]) item.text = sidebarItem[i][j]
2525
})
2626
})

0 commit comments

Comments
 (0)