const docs = [ { title: '开始', titleEn: 'Start', type: 'doc', children: [ { title: '快速开始', titleEn: 'Quick Start', name: 'getting-started', path: '/mobile/getting-started', component: () => import('./src/docs/getting-started.md'), }, ], }, { title: '基础', titleEn: 'Base', type: 'component', children: [ { title: 'Button 按钮', titleEn: 'Button', name: 'button', path: '/mobile/components/button', component: () => import('./src/components/button/docs/button.md'), mobile: () => import('./src/components/button/demos/mobile.vue'), }, { title: 'Icon 图标', titleEn: 'icon', name: 'icon', path: '/mobile/components/icon', component: () => import('./src/components/icon/docs/icon.md'), mobile: () => import('./src/components/icon/demos/mobile.vue'), }, ], }, ]; const enDocs = docs.map((doc) => ({ ...doc, title: doc.titleEn, children: doc?.children?.map((child: any) => ({ title: child.titleEn, name: `${child.name}-en`, path: `${child.path}-en`, meta: { lang: 'en' }, component: child.componentEn || child.component, })), })); export default { docs, enDocs };