amis2/examples/components/Doc.jsx

81 lines
1.9 KiB
React
Raw Normal View History

2019-06-11 17:00:02 +08:00
import React from 'react';
2019-05-09 18:25:12 +08:00
import makeMarkdownRenderer from './MdRenderer';
export default {
2020-06-08 18:55:59 +08:00
// prefix: ({classnames: cx}) => <li className={cx('AsideNav-divider')} />,
2019-11-07 10:41:14 +08:00
label: '文档',
children: [
{
label: 'AMIS 是什么?',
icon: 'fa fa-home',
path: '/docs/intro',
getComponent: (location, cb) =>
require(['../../docs/intro.md'], doc => {
cb(null, makeMarkdownRenderer(doc));
})
},
2019-11-07 10:41:14 +08:00
{
label: '快速开始',
icon: 'fa fa-flash',
path: '/docs/getting-started',
getComponent: (location, cb) =>
require(['../../docs/getting_started.md'], doc => {
cb(null, makeMarkdownRenderer(doc));
})
},
{
label: '基本用法',
icon: 'fa fa-file',
path: '/docs/basic',
getComponent: (location, cb) =>
require(['../../docs/basic.md'], doc => {
cb(null, makeMarkdownRenderer(doc));
})
},
2019-05-09 18:25:12 +08:00
2019-11-07 10:41:14 +08:00
{
label: '高级用法',
icon: 'fa fa-rocket',
path: '/docs/advanced',
getComponent: (location, cb) =>
require(['../../docs/advanced.md'], doc => {
cb(null, makeMarkdownRenderer(doc));
})
},
2020-04-02 17:48:26 +08:00
// {{renderer-docs}}
2019-11-07 10:41:14 +08:00
{
label: '动态数据',
2019-11-07 10:41:14 +08:00
path: '/docs/api',
icon: 'fa fa-cloud',
getComponent: (location, cb) =>
require(['../../docs/api.md'], doc => {
cb(null, makeMarkdownRenderer(doc));
})
},
{
label: '定制功能',
path: '/docs/custom',
2019-11-07 10:41:14 +08:00
icon: 'fa fa-cubes',
getComponent: (location, cb) =>
require(['../../docs/custom.md'], doc => {
2019-11-07 10:41:14 +08:00
cb(null, makeMarkdownRenderer(doc));
})
},
{
label: '定制样式',
2019-11-07 10:41:14 +08:00
path: '/docs/style',
icon: 'fa fa-laptop',
getComponent: (location, cb) =>
require(['../../docs/style.md'], doc => {
cb(null, makeMarkdownRenderer(doc));
})
}
]
};