|
1 | | -import { defineConfig } from 'vitepress' |
2 | | -import react from '@vitejs/plugin-react' |
| 1 | +import react from '@vitejs/plugin-react'; |
| 2 | +import { defineConfig } from 'vitepress'; |
3 | 3 |
|
4 | 4 | export default defineConfig({ |
5 | | - title: 'React Editable Tables', |
6 | | - description: 'React 可编辑表格方案集 — 原生轻量版 & Formily 高性能版', |
7 | | - lang: 'zh-CN', |
8 | | - lastUpdated: true, |
9 | | - appearance: false, |
| 5 | + title: 'React Editable Tables', |
| 6 | + description: 'React 可编辑表格方案集 — 原生轻量版 & Formily 高性能版', |
| 7 | + lang: 'zh-CN', |
| 8 | + lastUpdated: true, |
| 9 | + appearance: false, |
10 | 10 |
|
11 | | - vite: { |
12 | | - plugins: [react()], |
13 | | - }, |
| 11 | + vite: { |
| 12 | + plugins: [react()], |
| 13 | + }, |
14 | 14 |
|
15 | | - head: [ |
16 | | - ['link', { rel: 'icon', type: 'image/png', href: '/logo.png' }], |
17 | | - ['meta', { property: 'og:image', content: '/logo.png' }], |
18 | | - ['meta', { property: 'og:title', content: 'React Editable Tables' }], |
19 | | - ['meta', { property: 'og:description', content: 'React 可编辑表格方案集 — 原生轻量版 & Formily 高性能版' }], |
20 | | - ], |
| 15 | + head: [ |
| 16 | + ['link', { rel: 'icon', type: 'image/png', href: '/logo.png' }], |
| 17 | + ['meta', { property: 'og:image', content: '/logo.png' }], |
| 18 | + ['meta', { property: 'og:title', content: 'React Editable Tables' }], |
| 19 | + ['meta', { property: 'og:description', content: 'React 可编辑表格方案集 — 原生轻量版 & Formily 高性能版' }], |
| 20 | + ], |
21 | 21 |
|
22 | | - themeConfig: { |
23 | | - logo: '/logo.png', |
| 22 | + themeConfig: { |
| 23 | + logo: '/logo.png', |
24 | 24 |
|
25 | | - nav: [ |
26 | | - { text: '指南', link: '/guide/getting-started' }, |
27 | | - { text: 'Native', link: '/native/basic' }, |
28 | | - { text: 'Formily', link: '/formily/quick-start' }, |
29 | | - { |
30 | | - text: '更新日志', |
31 | | - link: 'https://github.com/chenJJ-88/react-editable-tables', |
32 | | - }, |
33 | | - ], |
| 25 | + nav: [ |
| 26 | + { text: '指南', link: '/guide/getting-started' }, |
| 27 | + { text: 'Native', link: '/native/basic' }, |
| 28 | + { text: 'Formily', link: '/formily/quick-start' }, |
| 29 | + { |
| 30 | + text: '更新日志', |
| 31 | + link: 'https://github.com/chenJJ-88/react-editable-tables', |
| 32 | + }, |
| 33 | + ], |
34 | 34 |
|
35 | | - sidebar: { |
36 | | - '/guide/': [ |
37 | | - { |
38 | | - text: '开始', |
39 | | - items: [ |
40 | | - { text: '快速上手', link: '/guide/getting-started' }, |
41 | | - { text: '方案选型', link: '/guide/comparison' }, |
42 | | - ], |
43 | | - }, |
44 | | - ], |
45 | | - '/native/': [ |
46 | | - { |
47 | | - text: '使用指南', |
48 | | - items: [ |
49 | | - { text: '基础用法', link: '/native/basic' }, |
50 | | - { text: '编辑模式', link: '/native/edit-mode' }, |
51 | | - { text: '表单校验', link: '/native/validation' }, |
52 | | - { text: '数据联动', link: '/native/linkage' }, |
53 | | - { text: '自定义编辑器', link: '/native/custom-editor' }, |
54 | | - { text: '行操作', link: '/native/row-ops' }, |
55 | | - { text: '大数据量性能', link: '/native/performance' }, |
56 | | - ], |
57 | | - }, |
58 | | - { |
59 | | - text: 'API', |
60 | | - items: [{ text: 'API 参考', link: '/native/api' }], |
| 35 | + sidebar: { |
| 36 | + '/guide/': [ |
| 37 | + { |
| 38 | + text: '开始', |
| 39 | + items: [ |
| 40 | + { text: '快速上手', link: '/guide/getting-started' }, |
| 41 | + { text: '方案选型', link: '/guide/comparison' }, |
| 42 | + ], |
| 43 | + }, |
| 44 | + ], |
| 45 | + '/native/': [ |
| 46 | + { |
| 47 | + text: '使用指南', |
| 48 | + items: [ |
| 49 | + { text: '基础用法', link: '/native/basic' }, |
| 50 | + { text: '编辑模式', link: '/native/edit-mode' }, |
| 51 | + { text: '表单校验', link: '/native/validation' }, |
| 52 | + { text: '数据联动', link: '/native/linkage' }, |
| 53 | + { text: '自定义编辑器', link: '/native/custom-editor' }, |
| 54 | + { text: '行操作', link: '/native/row-ops' }, |
| 55 | + { text: '大数据量性能', link: '/native/performance' }, |
| 56 | + ], |
| 57 | + }, |
| 58 | + { |
| 59 | + text: 'API', |
| 60 | + items: [{ text: 'API 参考', link: '/native/api' }], |
| 61 | + }, |
| 62 | + ], |
| 63 | + '/formily/': [ |
| 64 | + { |
| 65 | + text: '使用指南', |
| 66 | + items: [ |
| 67 | + { text: '快速开始', link: '/formily/quick-start' }, |
| 68 | + { text: 'Effects 兼容', link: '/formily/effects' }, |
| 69 | + { text: '大数据量性能', link: '/formily/large-data' }, |
| 70 | + ], |
| 71 | + }, |
| 72 | + { |
| 73 | + text: 'API', |
| 74 | + items: [{ text: 'API 参考', link: '/formily/api' }], |
| 75 | + }, |
| 76 | + ], |
61 | 77 | }, |
62 | | - ], |
63 | | - '/formily/': [ |
64 | | - { |
65 | | - text: '使用指南', |
66 | | - items: [ |
67 | | - { text: '快速开始', link: '/formily/quick-start' }, |
68 | | - { text: 'Effects 兼容', link: '/formily/effects' }, |
69 | | - { text: '大数据量性能', link: '/formily/large-data' }, |
70 | | - ], |
71 | | - }, |
72 | | - { |
73 | | - text: 'API', |
74 | | - items: [{ text: 'API 参考', link: '/formily/api' }], |
75 | | - }, |
76 | | - ], |
77 | | - }, |
78 | 78 |
|
79 | | - search: { |
80 | | - provider: 'local', |
81 | | - options: { |
82 | | - locales: { |
83 | | - root: { |
84 | | - translations: { |
85 | | - button: { buttonText: '搜索文档', buttonAriaLabel: '搜索文档' }, |
86 | | - modal: { |
87 | | - noResultsText: '无法找到相关结果', |
88 | | - resetButtonTitle: '清除查询条件', |
89 | | - footer: { selectText: '选择', navigateText: '切换', closeText: '关闭' }, |
90 | | - }, |
| 79 | + search: { |
| 80 | + provider: 'local', |
| 81 | + options: { |
| 82 | + locales: { |
| 83 | + root: { |
| 84 | + translations: { |
| 85 | + button: { buttonText: '搜索文档', buttonAriaLabel: '搜索文档' }, |
| 86 | + modal: { |
| 87 | + noResultsText: '无法找到相关结果', |
| 88 | + resetButtonTitle: '清除查询条件', |
| 89 | + footer: { selectText: '选择', navigateText: '切换', closeText: '关闭' }, |
| 90 | + }, |
| 91 | + }, |
| 92 | + }, |
| 93 | + }, |
91 | 94 | }, |
92 | | - }, |
93 | 95 | }, |
94 | | - }, |
95 | | - }, |
96 | 96 |
|
97 | | - editLink: { |
98 | | - pattern: 'https://github.com/chenJJ-88/react-editable-tables/edit/main/packages/docs/:path', |
99 | | - text: '在 GitHub 上编辑此页', |
100 | | - }, |
| 97 | + editLink: { |
| 98 | + pattern: 'https://github.com/chenJJ-88/react-editable-tables/edit/main/packages/docs/:path', |
| 99 | + text: '在 GitHub 上编辑此页', |
| 100 | + }, |
101 | 101 |
|
102 | | - footer: { |
103 | | - message: '基于 MIT 许可发布', |
104 | | - }, |
| 102 | + footer: { |
| 103 | + message: '基于 MIT 许可发布', |
| 104 | + }, |
105 | 105 |
|
106 | | - docFooter: { |
107 | | - prev: '上一页', |
108 | | - next: '下一页', |
109 | | - }, |
| 106 | + docFooter: { |
| 107 | + prev: '上一页', |
| 108 | + next: '下一页', |
| 109 | + }, |
110 | 110 |
|
111 | | - outline: { |
112 | | - label: '页面导航', |
113 | | - }, |
| 111 | + outline: { |
| 112 | + label: '页面导航', |
| 113 | + }, |
114 | 114 |
|
115 | | - lastUpdated: { |
116 | | - text: '最后更新于', |
117 | | - }, |
| 115 | + lastUpdated: { |
| 116 | + text: '最后更新于', |
| 117 | + }, |
118 | 118 |
|
119 | | - returnToTopLabel: '回到顶部', |
120 | | - sidebarMenuLabel: '菜单', |
121 | | - }, |
122 | | -}) |
| 119 | + returnToTopLabel: '回到顶部', |
| 120 | + sidebarMenuLabel: '菜单', |
| 121 | + }, |
| 122 | +}); |
0 commit comments