123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321 |
- // @ts-check
- /**
- * @type {import('vitepress').UserConfig}
- */
- module.exports = {
- base: process.argv[3] && process.argv[3] === '--gitee' ? '/vue-element-plus-admin-doc/' : '/',
- title: 'vue-element-plus-admin',
- lang: 'zh-CN',
- description: '一套基于vue3、element-plus、typesScript4、vite2的后台集成方案',
- head: createHead(),
- themeConfig: {
- repo: 'kailong321200875/vue-element-plus-adminc',
- docsRepo: 'kailong321200875/vue-element-plus-admin-doc',
- logo: '/logo.png',
- docsBranch: 'master',
- editLinks: true,
- editLinkText: '为此页提供修改建议',
- nav: createNav(),
- sidebar: createSidebar(),
- },
- };
- /**
- * @type {()=>import('vitepress').HeadConfig[]}
- */
- function createHead() {
- return [
- ['meta', { name: 'author', content: 'Archer' }],
- [
- 'meta',
- {
- name: 'keywords',
- content: 'vue-element-plus-admin, vitejs, vite, element-plus, vue',
- },
- ],
- ['link', { rel: 'icon', type: 'image/svg+xml', href: '/logo.svg' }],
- [
- 'meta',
- {
- name: 'viewport',
- content:
- 'width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no',
- },
- ],
- ['meta', { name: 'keywords', content: 'vue-element-plus-admin-doc' }],
- ['link', { rel: 'icon', href: '/favicon.ico' }],
- ];
- }
- /**
- * @type {()=>import('./theme-default/config').DefaultTheme.NavItem[]}
- */
- function createNav() {
- return [
- {
- text: '指南',
- link: '/guide/',
- items: [
- {
- text: '指南',
- link: '/guide/introduction',
- },
- {
- text: '深入',
- link: '/dep/i18n',
- },
- ],
- },
- {
- text: '组件',
- link: '/components/',
- items: [
- {
- text: '介绍',
- link: '/components/introduction',
- },
- {
- text: '全局组件',
- link: '/components/icon',
- },
- {
- text: '功能组件',
- link: '/components/form',
- },
- {
- text: '函数式组件',
- link: '/components/image-viewer',
- },
- ],
- },
- {
- text: '常用Hooks',
- link: '/hooks/',
- items: [
- {
- text: 'useWatermark',
- link: '/hooks/useWatermark',
- },
- {
- text: 'useCrudSchemas',
- link: '/hooks/useCrudSchemas',
- },
- ],
- },
- {
- text: '相关链接',
- items: [
- {
- text: 'Github 站点预览',
- link: 'https://element-plus-admin.cn/',
- },
- {
- text: 'Github 源码',
- link: 'https://github.com/kailong321200875/vue-element-plus-admin',
- },
- {
- text: 'Github 文档源码',
- link: 'https://github.com/kailong321200875/vue-element-plus-admin-doc',
- },
- {
- text: 'Github 更新日志',
- link: 'https://github.com/kailong321200875/vue-element-plus-admin/blob/master/CHANGELOG.md',
- },
- {
- text: 'Gitee 站点预览',
- link: 'https://kailong110120130.gitee.io/vue-element-plus-admin',
- },
- {
- text: 'Gitee 源码',
- link: 'https://gitee.com/kailong110120130/vue-element-plus-admin',
- },
- {
- text: 'Gitee 文档源码',
- link: 'https://gitee.com/kailong110120130/vue-element-plus-admin-doc',
- },
- {
- text: 'Gitee 更新日志',
- link: 'https://gitee.com/kailong110120130/vue-element-plus-admin/blob/master/CHANGELOG.md',
- },
- ],
- },
- ];
- }
- function createSidebar() {
- return {
- '/hooks/': [
- {
- text: 'useWatermark',
- link: '/hooks/useWatermark',
- },
- {
- text: 'useCrudSchemas',
- link: '/hooks/useCrudSchemas',
- },
- ],
- '/components/': [
- {
- text: '组件',
- children: [
- {
- text: '前言',
- link: '/components/introduction',
- },
- ],
- },
- {
- text: '全局组件',
- children: [
- {
- text: 'Icon 图标组件',
- link: '/components/icon',
- },
- ],
- },
- {
- text: '功能组件',
- children: [
- {
- text: 'Form 表单组件',
- link: '/components/form',
- },
- {
- text: 'Table 表格组件',
- link: '/components/table',
- },
- {
- text: 'Editor 富文本组件',
- link: '/components/editor',
- },
- {
- text: 'Search 查询组件',
- link: '/components/search',
- },
- {
- text: 'Descriptions 描述组件',
- link: '/components/descriptions',
- },
- {
- text: 'Dialog 弹窗组件',
- link: '/components/dialog',
- },
- {
- text: 'Echart 图表组件',
- link: '/components/echart',
- },
- {
- text: 'CountTo 数字动画组件',
- link: '/components/count-to',
- },
- {
- text: 'Qrcode 二维码组件',
- link: '/components/qrcode',
- },
- {
- text: 'Highlight 高亮组件',
- link: '/components/highlight',
- },
- {
- text: 'Infotip 信息提示组件',
- link: '/components/infotip',
- },
- {
- text: 'Error 缺省组件',
- link: '/components/error',
- },
- {
- text: 'Sticky 黏性组件',
- link: '/components/sticky',
- },
- {
- text: 'ContentDetailWrap 详情包裹组件',
- link: '/components/content-detail-wrap',
- },
- {
- text: 'InputPassword 密码输入框组件',
- link: '/components/input-password',
- },
- {
- text: 'Footer 页脚组件',
- link: '/components/footer',
- },
- ],
- },
- {
- text: '函数式组件',
- children: [
- {
- text: 'ImageViewer 图片预览组件',
- link: '/components/image-viewer',
- },
- ],
- },
- ],
- '/': [
- {
- text: '指南',
- children: [
- {
- text: '介绍',
- link: '/guide/introduction',
- },
- {
- text: '开始',
- link: '/guide/',
- },
- {
- text: '项目配置',
- link: '/guide/settings',
- },
- {
- text: '路由',
- link: '/guide/router',
- },
- {
- text: '权限',
- link: '/guide/auth',
- },
- {
- text: 'Mock&联调',
- link: '/guide/mock',
- },
- {
- text: '组件注册',
- link: '/guide/component',
- },
- {
- text: '样式',
- link: '/guide/design',
- },
- {
- text: '构建&部署',
- link: '/guide/deploy',
- },
- ],
- },
- {
- text: '深入',
- children: [
- {
- text: '国际化',
- link: '/dep/i18n',
- },
- {
- text: '项目规范',
- link: '/dep/lint',
- },
- {
- text: '黑暗主题',
- link: '/dep/dark',
- },
- {
- text: '模版生成',
- link: '/dep/create-module',
- },
- ],
- },
- ],
- };
- }
|