|
| 1 | +import type { DefaultTheme, LocaleSpecificConfig } from 'vitepress' |
| 2 | + |
| 3 | +export const META_URL = '' |
| 4 | +export const META_TITLE = 'Vue Test Utils' |
| 5 | +export const META_DESCRIPTION = 'Vue.js 3 官方测试工具集' |
| 6 | + |
| 7 | +export const zhConfig: LocaleSpecificConfig<DefaultTheme.Config> = { |
| 8 | + description: META_DESCRIPTION, |
| 9 | + head: [ |
| 10 | + ['meta', { property: 'og:url', content: META_URL }], |
| 11 | + ['meta', { property: 'og:title', content: META_TITLE }], |
| 12 | + ['meta', { property: 'og:description', content: META_DESCRIPTION }], |
| 13 | + ['meta', { property: 'twitter:url', content: META_URL }], |
| 14 | + ['meta', { property: 'twitter:title', content: META_TITLE }], |
| 15 | + ['meta', { property: 'twitter:description', content: META_DESCRIPTION }] |
| 16 | + ], |
| 17 | + |
| 18 | + themeConfig: { |
| 19 | + editLink: { |
| 20 | + pattern: 'https://github.com/vuejs/test-utils/edit/main/docs/:path', |
| 21 | + text: '改进此页面的内容' |
| 22 | + }, |
| 23 | + |
| 24 | + nav: [ |
| 25 | + { text: '指南', link: '/zh/guide/' }, |
| 26 | + { text: 'API 参考', link: '/zh/api/' }, |
| 27 | + { text: '从 Vue 2 迁移', link: '/zh/migration/' }, |
| 28 | + { |
| 29 | + text: '更新日志', |
| 30 | + link: 'https://github.com/vuejs/test-utils/releases' |
| 31 | + } |
| 32 | + ], |
| 33 | + |
| 34 | + sidebar: { |
| 35 | + '/zh': [ |
| 36 | + { |
| 37 | + text: '安装', |
| 38 | + link: '/zh/installation/' |
| 39 | + }, |
| 40 | + { |
| 41 | + text: '基础知识', |
| 42 | + items: [ |
| 43 | + { |
| 44 | + text: '开始', |
| 45 | + link: '/zh/guide/' |
| 46 | + }, |
| 47 | + { |
| 48 | + text: '快速上手', |
| 49 | + link: '/zh/guide/essentials/a-crash-course' |
| 50 | + }, |
| 51 | + { |
| 52 | + text: '条件渲染', |
| 53 | + link: '/zh/guide/essentials/conditional-rendering' |
| 54 | + }, |
| 55 | + { |
| 56 | + text: '测试事件触发', |
| 57 | + link: '/zh/guide/essentials/event-handling' |
| 58 | + }, |
| 59 | + { |
| 60 | + text: '测试表单', |
| 61 | + link: '/zh/guide/essentials/forms' |
| 62 | + }, |
| 63 | + { |
| 64 | + text: '传递数据到组件', |
| 65 | + link: '/zh/guide/essentials/passing-data' |
| 66 | + }, |
| 67 | + { |
| 68 | + text: '编写易于测试的组件', |
| 69 | + link: '/zh/guide/essentials/easy-to-test' |
| 70 | + } |
| 71 | + ] |
| 72 | + }, |
| 73 | + { |
| 74 | + text: '深入学习 Vue Test Utils', |
| 75 | + items: [ |
| 76 | + { |
| 77 | + text: '插槽', |
| 78 | + link: '/zh/guide/advanced/slots' |
| 79 | + }, |
| 80 | + { |
| 81 | + text: '异步行为', |
| 82 | + link: '/zh/guide/advanced/async-suspense' |
| 83 | + }, |
| 84 | + { |
| 85 | + text: '发起 HTTP 请求', |
| 86 | + link: '/zh/guide/advanced/http-requests' |
| 87 | + }, |
| 88 | + { |
| 89 | + text: '过渡效果', |
| 90 | + link: '/zh/guide/advanced/transitions' |
| 91 | + }, |
| 92 | + { |
| 93 | + text: '组件实例', |
| 94 | + link: '/zh/guide/advanced/component-instance' |
| 95 | + }, |
| 96 | + { |
| 97 | + text: '复用与组合', |
| 98 | + link: '/zh/guide/advanced/reusability-composition' |
| 99 | + }, |
| 100 | + { |
| 101 | + text: '测试 v-model', |
| 102 | + link: '/zh/guide/advanced/v-model' |
| 103 | + }, |
| 104 | + { |
| 105 | + text: '测试 Vuex', |
| 106 | + link: '/zh/guide/advanced/vuex' |
| 107 | + }, |
| 108 | + { |
| 109 | + text: '测试 Vue Router', |
| 110 | + link: '/zh/guide/advanced/vue-router' |
| 111 | + }, |
| 112 | + { |
| 113 | + text: '测试 Teleport', |
| 114 | + link: '/zh/guide/advanced/teleport' |
| 115 | + }, |
| 116 | + { |
| 117 | + text: 'Stubs 和浅挂载', |
| 118 | + link: '/zh/guide/advanced/stubs-shallow-mount' |
| 119 | + }, |
| 120 | + { |
| 121 | + text: '测试服务端渲染', |
| 122 | + link: '/zh/guide/advanced/ssr' |
| 123 | + } |
| 124 | + ] |
| 125 | + }, |
| 126 | + { |
| 127 | + text: '扩展 Vue Test Utils', |
| 128 | + items: [ |
| 129 | + { |
| 130 | + text: '插件', |
| 131 | + link: '/zh/guide/extending-vtu/plugins' |
| 132 | + }, |
| 133 | + { |
| 134 | + text: '社区与学习资源', |
| 135 | + link: '/zh/guide/extending-vtu/community-learning' |
| 136 | + } |
| 137 | + ] |
| 138 | + }, |
| 139 | + { |
| 140 | + text: '常见问题', |
| 141 | + link: '/zh/guide/faq/' |
| 142 | + }, |
| 143 | + { |
| 144 | + text: '从 Vue 2 迁移', |
| 145 | + link: '/zh/migration/' |
| 146 | + }, |
| 147 | + { |
| 148 | + text: 'API 参考', |
| 149 | + link: '/zh/api/' |
| 150 | + } |
| 151 | + ] |
| 152 | + } |
| 153 | + } |
| 154 | +} |
0 commit comments