import { defineConfigWithTheme } from 'vitepress' import baseConfig from '@vue/theme/config' const quickStart = { text: '快速开始', link: '/guide/quick-start' }; const baseComponents = [ { text: '查询', link: '/components/search/' }, { text: '表格', link: '/components/table/' }, { text: '综合查询', link: '/components/integrated-query/' }, { text: '概况', link: '/components/overview/' }, { text: '树', link: '/components/tree/' }, { text: '弹框', link: '/components/dialog/' }, { text: '分页', link: '/components/pagin/' }, { text: '表单', link: '/components/field/' }, { text: '状态', link: '/components/status/' }, { text: '下拉', link: '/components/select/' }, { text: '概览', link: '/components/cardView/' }, { text: '日期选择', link: '/components/dateSelect/' }, { text: 'echarts', link: '/components/echarts/' }, { text: '锚点', link: '/components/anchor/' } ]; const components = [quickStart, ...baseComponents]; const hooks = [ { text: 'usePageSearch', link: '/hooks/usePageSearch' }, { text: 'useRouteChange', link: '/hooks/useRouteChange' }, { text: 'useQueryChage', link: '/hooks/queryChage' }, { text: 'useColumnsSet', link: '/hooks/useColumnsSet' }, { text: 'usePageDownload', link: '/hooks/usePageDownload' }, { text: 'useRowSelect', link: '/hooks/useRowSelect' }, { text: 'useCacheTree', link: '/hooks/useCacheTree' }, { text: 'useValidationAnimation', link: '/hooks/useValidationAnimation' } ] const share = [ { text: '树节点操作', link: '/share/tree-handler/' } ] const directives = [ { text: '超出省略', link: '/directives/ellipsis/' } ] export default defineConfigWithTheme({ extends: baseConfig, title: "KSC", description: "Uni-Manager业务组件", base: '/uni-components/', vite: { ssr: { noExternal: ['@king-design/vue'] } }, themeConfig: { search: { provider: 'local', }, nav: [ { text: '开始', link: '/guide/quick-start' }, { text: '组件', activeMatch: `^/components/`, items: baseComponents }, { text: 'hooks', activeMatch: `^/hooks/`, items: hooks }, { text: '共享工具包', activeMatch: `^/share/`, items: share }, { text: '指令', activeMatch: `^/directives/`, items: directives } ], sidebar: { '/components/': components, '/guide/': components, '/hooks/': hooks } } })