feat: add omiu-chart example

This commit is contained in:
yuqing521 2021-08-22 10:32:00 +08:00
parent 1c7c492f68
commit f6ba9615d8
3 changed files with 35 additions and 0 deletions

View File

@ -53,6 +53,11 @@ export const base = {
BasicList: 'Basic List',
Cascader: 'Cascader',
Chart: 'OMIU Charts',
Bar: 'Bar',
Line: 'Line',
Scatter: 'Scatter',
Success: 'Success',
Failure: 'Failure',
Dialog: 'Dialog'

View File

@ -54,6 +54,11 @@ export const base = {
BasicList: '基础列表',
Cascader: 'Cascader 级联选择器',
Chart: 'OMIU 图表',
Bar: '柱状图',
Line: '线状图',
Scatter:'散点图',
Success: '成功页',
Failure: '失败页',
Dialog: 'Dialog 弹窗层'

View File

@ -162,6 +162,15 @@ export function genNavTree(localeMap, locale) {
}
]
},
{
label: localeMap.base.Chart,
expanded: true,
id: genId(),
children: [
]
},
{
label: localeMap.base.Others,
sign: '●',
@ -266,5 +275,21 @@ export function genNavTree(localeMap, locale) {
}
])
const omiuChart = [
'bar',
'line',
'scatter'
]
omiuChart.forEach((chart) => {
navTree[3].children.push({
label: localeMap.base[chart.split('-').map(str => {
return str[0].toUpperCase() + str.slice(1)
}).join('')],
id: genId(),
href: `#/${chart}-chart`
})
})
return navTree
}