2018-01-22 10:56:58 +00:00
|
|
|
<script>
|
|
|
|
import { Menu } from 'antd'
|
2018-01-22 13:06:51 +00:00
|
|
|
import * as AllDemo from './demo'
|
|
|
|
const MenuItem = Menu.Item
|
2018-01-22 10:56:58 +00:00
|
|
|
export default {
|
2018-01-22 13:06:51 +00:00
|
|
|
render () {
|
|
|
|
const { name, demo } = this.$route.params // eslint-disable-line
|
|
|
|
const Demo = AllDemo[name]
|
|
|
|
return (
|
2018-01-23 10:55:39 +00:00
|
|
|
<div class='site page-container'>
|
2018-01-22 13:06:51 +00:00
|
|
|
<Menu class='nav' selectedKeys={[name]}>
|
|
|
|
{Object.keys(AllDemo).map(d => <MenuItem key={d}>
|
|
|
|
<router-link to={{ path: `/components/${d}` }}>{d}</router-link>
|
|
|
|
</MenuItem>)}
|
|
|
|
</Menu>
|
|
|
|
<div class='content'>
|
|
|
|
{Demo ? <Demo /> : '正在紧急开发中...'}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
)
|
2018-01-22 10:56:58 +00:00
|
|
|
},
|
|
|
|
}
|
|
|
|
</script>
|