2020-11-13 18:57:28 +08:00
|
|
|
// rubbish code here
|
2020-10-07 21:03:23 +08:00
|
|
|
|
2021-06-21 09:39:54 +08:00
|
|
|
import { h } from 'vue'
|
|
|
|
import { RouterLink } from 'vue-router'
|
|
|
|
|
|
|
|
export const renderMenuLabel = (option) => {
|
|
|
|
if (!('path' in option) || option.label === '--Debug') {
|
|
|
|
return option.label
|
|
|
|
}
|
|
|
|
return h(
|
|
|
|
RouterLink,
|
|
|
|
{
|
|
|
|
to: option.path
|
|
|
|
},
|
|
|
|
{ default: () => option.label }
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
2020-12-12 13:51:22 +08:00
|
|
|
const appendCounts = (item) => {
|
2021-02-14 14:52:14 +08:00
|
|
|
if (!item.children) {
|
2020-02-04 23:13:53 +08:00
|
|
|
item.count = 1
|
|
|
|
return item
|
|
|
|
}
|
2021-02-14 14:52:14 +08:00
|
|
|
if (item.children) {
|
|
|
|
item.children.forEach(appendCounts)
|
|
|
|
item.count = item.children.reduce((sum, item) => sum + item.count, 0)
|
2021-02-14 15:19:32 +08:00
|
|
|
if (item.type === 'group') {
|
|
|
|
item.en += ` (${item.count})`
|
|
|
|
item.zh += ` (${item.count})`
|
|
|
|
}
|
2020-02-04 23:13:53 +08:00
|
|
|
return item
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-14 20:38:30 +08:00
|
|
|
const createDebugDemos = (item, mode) => {
|
2020-10-30 17:42:34 +08:00
|
|
|
if (__DEV__ && mode === 'debug') {
|
2020-02-26 12:41:50 +08:00
|
|
|
return [item]
|
|
|
|
} else return []
|
2020-02-24 16:24:23 +08:00
|
|
|
}
|
|
|
|
|
2021-02-14 14:52:14 +08:00
|
|
|
function createItems (lang, theme, prefix, items) {
|
|
|
|
const isZh = lang === 'zh-CN'
|
|
|
|
const langKey = isZh ? 'zh' : 'en'
|
|
|
|
return items.map((rawItem) => {
|
|
|
|
const item = {
|
|
|
|
...rawItem,
|
|
|
|
key: rawItem.en,
|
2021-04-06 00:17:14 +08:00
|
|
|
label: rawItem[langKey] || rawItem.en,
|
2021-02-14 15:19:32 +08:00
|
|
|
extra: rawItem.enSuffix && isZh ? rawItem.en : undefined,
|
2021-02-14 14:52:14 +08:00
|
|
|
path: rawItem.path
|
|
|
|
? `/${lang}/${theme}` + prefix + rawItem.path
|
|
|
|
: undefined
|
|
|
|
}
|
|
|
|
if (rawItem.children) {
|
|
|
|
item.children = createItems(lang, theme, prefix, rawItem.children)
|
|
|
|
}
|
|
|
|
return item
|
|
|
|
})
|
2020-11-13 18:57:28 +08:00
|
|
|
}
|
|
|
|
|
2021-02-14 14:52:14 +08:00
|
|
|
export function createDocumentationMenuOptions ({ lang, theme, mode }) {
|
|
|
|
return createItems(lang, theme, '/docs', [
|
2021-04-19 21:47:29 +08:00
|
|
|
{
|
|
|
|
en: 'Introduction',
|
|
|
|
zh: '介绍',
|
|
|
|
type: 'group',
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
en: 'Naive UI',
|
|
|
|
zh: 'Naive UI',
|
|
|
|
path: '/introduction'
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2020-11-13 18:57:28 +08:00
|
|
|
{
|
2021-02-18 22:30:41 +08:00
|
|
|
en: 'Getting Started',
|
|
|
|
zh: '快速上手',
|
2020-11-13 18:57:28 +08:00
|
|
|
type: 'group',
|
2021-02-14 14:52:14 +08:00
|
|
|
children: [
|
2020-11-13 18:57:28 +08:00
|
|
|
{
|
2021-02-18 22:30:41 +08:00
|
|
|
en: 'Installation',
|
|
|
|
zh: '安装',
|
|
|
|
path: '/installation'
|
2020-11-13 18:57:28 +08:00
|
|
|
},
|
|
|
|
{
|
2021-06-06 19:13:52 +08:00
|
|
|
en: 'Usage in SFC',
|
|
|
|
zh: '在 SFC 中使用',
|
|
|
|
path: '/usage-sfc'
|
2021-02-18 22:30:41 +08:00
|
|
|
},
|
2021-06-06 18:34:02 +08:00
|
|
|
{
|
|
|
|
en: 'Configuring Fonts',
|
|
|
|
zh: '配置字体',
|
|
|
|
path: '/fonts'
|
|
|
|
},
|
2021-06-06 19:13:52 +08:00
|
|
|
{
|
|
|
|
en: 'Import on Demand',
|
|
|
|
zh: '按需引入',
|
|
|
|
path: '/import-on-demand'
|
|
|
|
},
|
2021-02-18 22:30:41 +08:00
|
|
|
{
|
|
|
|
en: 'Supported Platforms',
|
|
|
|
zh: '支持的平台',
|
|
|
|
path: '/supported-platforms'
|
2021-06-03 01:15:27 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
en: 'Common Issues',
|
|
|
|
zh: '常见问题',
|
|
|
|
path: '/common-issues'
|
2020-11-13 18:57:28 +08:00
|
|
|
}
|
|
|
|
]
|
2021-02-18 22:30:41 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
en: 'Guides',
|
|
|
|
zh: '指南',
|
2020-11-13 18:57:28 +08:00
|
|
|
type: 'group',
|
2021-02-14 14:52:14 +08:00
|
|
|
children: [
|
2021-03-18 15:51:25 +08:00
|
|
|
{
|
|
|
|
en: 'JSX & TSX',
|
|
|
|
zh: 'JSX & TSX',
|
|
|
|
path: '/jsx'
|
|
|
|
},
|
2021-06-02 16:17:13 +08:00
|
|
|
{
|
|
|
|
en: 'Server-Sider Rendering',
|
|
|
|
zh: '服务端渲染 SSR',
|
|
|
|
path: '/ssr'
|
|
|
|
},
|
2021-04-07 01:44:02 +08:00
|
|
|
{
|
2021-06-06 19:13:52 +08:00
|
|
|
en: 'Customizing Theme',
|
2021-04-07 01:44:02 +08:00
|
|
|
zh: '调整主题',
|
|
|
|
path: '/customize-theme'
|
|
|
|
},
|
2020-11-13 18:57:28 +08:00
|
|
|
{
|
2021-02-18 22:30:41 +08:00
|
|
|
en: 'Create Themed Component',
|
|
|
|
zh: '创建适配主题的组件',
|
|
|
|
path: '/theme'
|
|
|
|
}
|
2021-06-05 23:24:07 +08:00
|
|
|
// {
|
|
|
|
// en: 'Experimental Features',
|
|
|
|
// zh: '试验性特性',
|
|
|
|
// path: '/experimental-features'
|
|
|
|
// }
|
2021-02-18 22:30:41 +08:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
en: 'Version',
|
|
|
|
zh: '版本',
|
|
|
|
type: 'group',
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
en: 'Change Log',
|
|
|
|
zh: '变更日志',
|
|
|
|
path: '/changelog'
|
2020-11-13 18:57:28 +08:00
|
|
|
}
|
2021-06-06 18:34:02 +08:00
|
|
|
// {
|
|
|
|
// en: 'Migrate From V1',
|
|
|
|
// zh: '从 V1 升级',
|
|
|
|
// path: '/from-v1'
|
|
|
|
// }
|
2020-11-13 18:57:28 +08:00
|
|
|
]
|
2021-02-18 22:30:41 +08:00
|
|
|
}
|
|
|
|
])
|
|
|
|
}
|
|
|
|
|
|
|
|
export function createComponentMenuOptions ({ lang, theme, mode }) {
|
|
|
|
return createItems(lang, theme, '/components', [
|
2020-11-13 18:57:28 +08:00
|
|
|
appendCounts({
|
2021-02-14 14:52:14 +08:00
|
|
|
zh: '通用组件',
|
|
|
|
en: 'Common Components',
|
2020-11-13 18:57:28 +08:00
|
|
|
type: 'group',
|
2021-02-14 14:52:14 +08:00
|
|
|
children: [
|
2020-11-13 18:57:28 +08:00
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Avatar',
|
|
|
|
zh: '头像',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/avatar'
|
2020-11-13 18:57:28 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Button',
|
|
|
|
zh: '按钮',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/button'
|
2020-11-13 18:57:28 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Card',
|
|
|
|
zh: '卡片',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/card'
|
2020-11-13 18:57:28 +08:00
|
|
|
},
|
2021-06-23 08:30:35 +08:00
|
|
|
{
|
|
|
|
en: 'Carousel',
|
|
|
|
zh: '轮播图',
|
|
|
|
enSuffix: true,
|
|
|
|
path: '/carousel'
|
|
|
|
},
|
2020-11-13 18:57:28 +08:00
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Collapse',
|
|
|
|
zh: '折叠面板',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/collapse'
|
2020-11-13 18:57:28 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Divider',
|
|
|
|
zh: '分割线',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/divider'
|
2020-11-13 18:57:28 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Dropdown',
|
|
|
|
zh: '下拉菜单',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/dropdown'
|
2020-11-13 18:57:28 +08:00
|
|
|
},
|
2021-03-21 01:02:13 +08:00
|
|
|
{
|
|
|
|
en: 'Ellipsis',
|
|
|
|
zh: '文本省略',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/ellipsis'
|
2021-03-21 01:02:13 +08:00
|
|
|
},
|
2020-11-13 18:57:28 +08:00
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Gradient Text',
|
|
|
|
zh: '渐变文字',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/gradient-text'
|
2020-11-13 18:57:28 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Icon',
|
|
|
|
zh: '图标',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/icon'
|
2020-11-13 18:57:28 +08:00
|
|
|
},
|
2021-04-03 11:29:37 +08:00
|
|
|
{
|
|
|
|
en: 'PageHeader',
|
|
|
|
zh: '页头',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/page-header'
|
2021-04-03 11:29:37 +08:00
|
|
|
},
|
2020-11-13 18:57:28 +08:00
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Tag',
|
|
|
|
zh: '标签',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/tag'
|
2020-11-13 18:57:28 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Typography',
|
|
|
|
zh: '排印',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/typography'
|
2020-11-13 18:57:28 +08:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}),
|
|
|
|
appendCounts({
|
2021-02-14 14:52:14 +08:00
|
|
|
zh: '数据录入组件',
|
|
|
|
en: 'Data Input Components',
|
2020-11-13 18:57:28 +08:00
|
|
|
type: 'group',
|
2021-02-14 14:52:14 +08:00
|
|
|
children: [
|
2020-11-13 18:57:28 +08:00
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Auto Complete',
|
|
|
|
zh: '自动填充',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/auto-complete'
|
2020-11-13 18:57:28 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Cascader',
|
|
|
|
zh: '级联选择',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/cascader'
|
2020-11-13 18:57:28 +08:00
|
|
|
},
|
2021-04-10 10:30:04 +08:00
|
|
|
{
|
|
|
|
en: 'Color Picker',
|
2021-04-13 19:50:31 +08:00
|
|
|
zh: '颜色选择器',
|
2021-04-10 10:30:04 +08:00
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/color-picker'
|
2021-04-10 10:30:04 +08:00
|
|
|
},
|
2020-11-13 18:57:28 +08:00
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Checkbox',
|
|
|
|
zh: '复选框',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/checkbox'
|
2020-11-13 18:57:28 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Date Picker',
|
|
|
|
zh: '日期选择器',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/date-picker'
|
2020-11-13 18:57:28 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Dynamic Input',
|
|
|
|
zh: '动态录入',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/dynamic-input'
|
2020-11-13 18:57:28 +08:00
|
|
|
},
|
2021-02-02 15:47:21 +08:00
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Dynamic Tags',
|
|
|
|
zh: '动态标签',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/dynamic-tags'
|
2021-02-02 15:47:21 +08:00
|
|
|
},
|
2020-11-13 18:57:28 +08:00
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Form',
|
|
|
|
zh: '表单',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/form'
|
2020-11-13 18:57:28 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Input',
|
|
|
|
zh: '文本输入',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/input'
|
2020-11-13 18:57:28 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Input Number',
|
|
|
|
zh: '数字输入',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/input-number'
|
2020-11-13 18:57:28 +08:00
|
|
|
},
|
2021-03-27 12:06:08 +08:00
|
|
|
{
|
|
|
|
en: 'Mention',
|
|
|
|
zh: '提及',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/mention'
|
2021-03-27 12:06:08 +08:00
|
|
|
},
|
2020-11-13 18:57:28 +08:00
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Radio',
|
|
|
|
zh: '单选',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/radio'
|
2020-11-13 18:57:28 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Rate',
|
|
|
|
zh: '评分',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/rate'
|
2020-11-13 18:57:28 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Select',
|
|
|
|
zh: '选择器',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/select'
|
2020-11-13 18:57:28 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Slider',
|
|
|
|
zh: '滑动选择',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/slider'
|
2020-11-13 18:57:28 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Switch',
|
|
|
|
zh: '开关',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/switch'
|
2020-11-13 18:57:28 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Time Picker',
|
|
|
|
zh: '时间选择器',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/time-picker'
|
2020-11-13 18:57:28 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Transfer',
|
|
|
|
zh: '穿梭框',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/transfer'
|
2020-11-13 18:57:28 +08:00
|
|
|
},
|
2021-06-21 15:48:15 +08:00
|
|
|
{
|
|
|
|
en: 'Tree Select',
|
|
|
|
zh: '树型选择',
|
|
|
|
enSuffix: true,
|
|
|
|
path: '/tree-select'
|
|
|
|
},
|
2020-11-13 18:57:28 +08:00
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Upload',
|
|
|
|
zh: '上传',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/upload'
|
2020-11-13 18:57:28 +08:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}),
|
|
|
|
appendCounts({
|
2021-02-14 14:52:14 +08:00
|
|
|
zh: '数据展示组件',
|
|
|
|
en: 'Data Display Components',
|
2020-11-13 18:57:28 +08:00
|
|
|
type: 'group',
|
2021-02-14 14:52:14 +08:00
|
|
|
children: [
|
2021-04-09 12:43:05 +08:00
|
|
|
{
|
|
|
|
en: 'Calendar',
|
|
|
|
zh: '日历',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/calendar'
|
2021-04-09 12:43:05 +08:00
|
|
|
},
|
2020-11-13 18:57:28 +08:00
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Code',
|
|
|
|
zh: '代码',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/code'
|
2020-11-13 18:57:28 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Data Table',
|
|
|
|
zh: '数据表格',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/data-table'
|
2020-11-13 18:57:28 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Descriptions',
|
|
|
|
zh: '描述',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/descriptions'
|
2020-11-13 18:57:28 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Empty',
|
|
|
|
zh: '无内容',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/empty'
|
2020-11-13 18:57:28 +08:00
|
|
|
},
|
2021-04-07 13:10:45 +08:00
|
|
|
{
|
|
|
|
en: 'Image',
|
|
|
|
zh: '图像',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/image'
|
2021-04-07 13:10:45 +08:00
|
|
|
},
|
2020-11-13 18:57:28 +08:00
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'List',
|
|
|
|
zh: '列表',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/list'
|
2020-11-13 18:57:28 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Log',
|
|
|
|
zh: '日志',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/log'
|
2020-11-13 18:57:28 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Statistic',
|
|
|
|
zh: '统计数据',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/statistic'
|
2020-11-13 18:57:28 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Table',
|
|
|
|
zh: '表格',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/table'
|
2020-11-13 18:57:28 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Thing',
|
|
|
|
zh: '东西',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/thing'
|
2020-11-13 18:57:28 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Time',
|
|
|
|
zh: '时间',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/time'
|
2020-11-13 18:57:28 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Timeline',
|
|
|
|
zh: '时间线',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/timeline'
|
2020-11-13 18:57:28 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Tree',
|
|
|
|
zh: '树',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/tree'
|
2020-11-13 18:57:28 +08:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}),
|
|
|
|
appendCounts({
|
2021-02-14 14:52:14 +08:00
|
|
|
zh: '导航组件',
|
|
|
|
en: 'Navigation Components',
|
2020-11-13 18:57:28 +08:00
|
|
|
type: 'group',
|
2021-02-14 14:52:14 +08:00
|
|
|
children: [
|
2020-11-13 18:57:28 +08:00
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Affix',
|
|
|
|
zh: '固钉',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/affix'
|
2020-11-13 18:57:28 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Anchor',
|
|
|
|
zh: '侧边导航',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/anchor'
|
2020-11-13 18:57:28 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Back Top',
|
|
|
|
zh: '回到顶部',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/back-top'
|
2020-11-13 18:57:28 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Breadcrumb',
|
|
|
|
zh: '面包屑',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/breadcrumb'
|
2020-11-13 18:57:28 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Loading Bar',
|
|
|
|
zh: '加载条',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/loading-bar'
|
2020-11-13 18:57:28 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Menu',
|
|
|
|
zh: '菜单',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/menu'
|
2020-11-13 18:57:28 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Pagination',
|
|
|
|
zh: '分页',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/pagination'
|
2020-11-13 18:57:28 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Steps',
|
|
|
|
zh: '步骤',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/steps'
|
2020-11-13 18:57:28 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Tabs',
|
|
|
|
zh: '标签页',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/tabs'
|
2020-11-13 18:57:28 +08:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}),
|
|
|
|
appendCounts({
|
2021-02-14 14:52:14 +08:00
|
|
|
zh: '反馈组件',
|
|
|
|
en: 'Feedback Components',
|
2020-11-13 18:57:28 +08:00
|
|
|
type: 'group',
|
2021-02-14 14:52:14 +08:00
|
|
|
children: [
|
2020-11-13 18:57:28 +08:00
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Alert',
|
|
|
|
zh: '警告信息',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/alert'
|
2020-11-13 18:57:28 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Badge',
|
|
|
|
zh: '标记',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/badge'
|
2020-11-13 18:57:28 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Dialog',
|
|
|
|
zh: '对话框',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/dialog'
|
2020-11-13 18:57:28 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Drawer',
|
|
|
|
zh: '抽屉',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/drawer'
|
2020-11-13 18:57:28 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Message',
|
|
|
|
zh: '信息',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/message'
|
2020-11-13 18:57:28 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Modal',
|
|
|
|
zh: '模态框',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/modal'
|
2020-11-13 18:57:28 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Notification',
|
|
|
|
zh: '通知',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/notification'
|
2020-11-13 18:57:28 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Popconfirm',
|
|
|
|
zh: '弹出确认',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/popconfirm'
|
2020-11-13 18:57:28 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Popover',
|
|
|
|
zh: '弹出信息',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/popover'
|
2020-11-13 18:57:28 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Popselect',
|
|
|
|
zh: '弹出选择',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/popselect'
|
2020-11-13 18:57:28 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Progress',
|
|
|
|
zh: '进度',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/progress'
|
2020-11-13 18:57:28 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Result',
|
|
|
|
zh: '结果页',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/result'
|
2020-11-13 18:57:28 +08:00
|
|
|
},
|
2021-04-09 00:43:33 +08:00
|
|
|
{
|
|
|
|
en: 'Skeleton',
|
|
|
|
zh: '骨架屏',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/skeleton'
|
2021-04-09 00:43:33 +08:00
|
|
|
},
|
2020-11-13 18:57:28 +08:00
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Spin',
|
|
|
|
zh: '加载',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/spin'
|
2020-11-13 18:57:28 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'Tooltip',
|
|
|
|
zh: '弹出提示',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/tooltip'
|
2020-11-13 18:57:28 +08:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}),
|
2021-02-18 22:30:41 +08:00
|
|
|
appendCounts({
|
|
|
|
zh: '布局组件',
|
|
|
|
en: 'Layout Components',
|
|
|
|
type: 'group',
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
en: 'Layout',
|
|
|
|
zh: '布局',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/layout'
|
2021-02-18 22:30:41 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
en: 'Grid',
|
|
|
|
zh: '栅格',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/grid'
|
2021-02-18 22:30:41 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
en: 'Space',
|
|
|
|
zh: '间距',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/space'
|
2021-02-18 22:30:41 +08:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}),
|
|
|
|
appendCounts({
|
|
|
|
zh: '配置组件',
|
|
|
|
en: 'Config Components',
|
|
|
|
type: 'group',
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
en: 'Config Provider',
|
2021-03-18 14:52:39 +08:00
|
|
|
zh: '全局化配置',
|
2021-02-18 22:30:41 +08:00
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/config-provider'
|
2021-02-18 22:30:41 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
en: 'Element',
|
|
|
|
zh: '元素',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/element'
|
2021-04-06 18:06:04 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
en: 'Global Style',
|
|
|
|
zh: '全局样式',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/global-style'
|
2021-02-18 22:30:41 +08:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}),
|
2021-03-03 00:55:43 +08:00
|
|
|
{
|
|
|
|
zh: '废弃',
|
|
|
|
en: 'Deprecated',
|
|
|
|
type: 'group',
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
en: 'Legacy Grid',
|
|
|
|
zh: '旧版栅格',
|
|
|
|
enSuffix: true,
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/legacy-grid'
|
2021-03-03 00:55:43 +08:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2020-11-14 20:38:30 +08:00
|
|
|
...createDebugDemos(
|
2020-06-18 01:33:55 +08:00
|
|
|
{
|
2021-04-06 01:31:09 +08:00
|
|
|
en: '--Debug',
|
2021-02-14 14:52:14 +08:00
|
|
|
children: [
|
2020-03-04 18:22:25 +08:00
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'SuffixDebug',
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/base-suffix-debug'
|
2020-03-04 18:22:25 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'PopoverDebug',
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/popover-debug'
|
2020-03-04 18:22:25 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'RouterDebug',
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/router-debug'
|
2020-03-04 18:22:25 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'ModalDebug',
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/modal-debug'
|
2020-03-04 18:22:25 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'ScrollbarDebug',
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/scrollbar-debug'
|
2020-03-04 18:22:25 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'ScrollbarDebug2',
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/scrollbar-debug2'
|
2020-03-04 18:22:25 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'DatePickerDebug',
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/date-picker-debug'
|
2020-03-04 18:22:25 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'BackTopDebug',
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/back-top-debug'
|
2020-03-04 18:22:25 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'CascaderDebug',
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/cascader-debug'
|
2020-03-04 18:22:25 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'VerticalAlignDebug',
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/vertical-align-debug'
|
2020-03-04 18:22:25 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'IconTransitionDebug',
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/icon-transition-debug'
|
2020-03-04 18:22:25 +08:00
|
|
|
},
|
|
|
|
{
|
2021-02-14 14:52:14 +08:00
|
|
|
en: 'SelectDebug',
|
2021-04-20 12:49:47 +08:00
|
|
|
path: '/select-debug'
|
2020-03-04 18:22:25 +08:00
|
|
|
}
|
|
|
|
]
|
2020-12-12 13:51:22 +08:00
|
|
|
},
|
|
|
|
mode
|
|
|
|
)
|
2020-11-13 18:57:28 +08:00
|
|
|
])
|
2020-02-04 23:13:53 +08:00
|
|
|
}
|