From 8607fe1cb0a91813d701c0d00312855f4d20c942 Mon Sep 17 00:00:00 2001 From: LittleSound <464388324@qq.com> Date: Thu, 22 Sep 2022 22:12:58 +0800 Subject: [PATCH] fix: lint error --- docs/.vitepress/config.ts | 39 +++++++++++++++++++++++++++++++++++++-- types/default-theme.d.ts | 36 ++++++++++++++++++------------------ 2 files changed, 55 insertions(+), 20 deletions(-) diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index a24c1be1f109..1bfaea06308b 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -78,8 +78,43 @@ function sidebarGuide() { items: [ { text: 'What is VitePress?', link: '/guide/what-is-vitepress' }, { text: 'Getting Started', link: '/guide/getting-started' }, - { text: 'Configuration', link: '/guide/configuration' }, - { text: 'Deploying', link: '/guide/deploying' } + { + text: 'Configuration', + link: '/guide/configuration', + collapsible: true, + collapsed: true, + items: [ + { text: 'What is VitePress?', link: '/guide/what-is-vitepress' }, + { text: 'Getting Started', link: '/guide/getting-started' }, + { text: 'Configuration', link: '/guide/configuration' }, + { text: 'Deploying', link: '/guide/deploying' } + ] + }, + { + text: 'Deploying', + collapsible: true, + collapsed: true, + items: [ + { text: 'What is VitePress?', link: '/guide/what-is-vitepress' }, + { text: 'Getting Started', link: '/guide/getting-started' }, + { text: 'Configuration', link: '/guide/configuration' }, + { + text: 'Deploying', + link: '/guide/deploying', + collapsible: true, + collapsed: true, + items: [ + { + text: 'What is VitePress?', + link: '/guide/what-is-vitepress' + }, + { text: 'Getting Started', link: '/guide/getting-started' }, + { text: 'Configuration', link: '/guide/configuration' }, + { text: 'Deploying', link: '/guide/deploying' } + ] + } + ] + } ] }, { diff --git a/types/default-theme.d.ts b/types/default-theme.d.ts index e5dc5981d3c7..7338ca034d86 100644 --- a/types/default-theme.d.ts +++ b/types/default-theme.d.ts @@ -149,24 +149,24 @@ export namespace DefaultTheme { export type SidebarItem = | { text: string; link: string } | { - text: string; - link?: string; - items: SidebarItem[]; - - /** - * If `true`, toggle button is shown. - * - * @default false - */ - collapsible?: boolean - - /** - * If `true`, collapsible group is collapsed by default. - * - * @default false - */ - collapsed?: boolean - } + text: string + link?: string + items: SidebarItem[] + + /** + * If `true`, toggle button is shown. + * + * @default false + */ + collapsible?: boolean + + /** + * If `true`, collapsible group is collapsed by default. + * + * @default false + */ + collapsed?: boolean + } // edit link -----------------------------------------------------------------