pull/165/head
tangjinzhou 7 years ago
parent d73442a0ac
commit 3035b83e15

@ -1,6 +1,7 @@
<script>
import { Menu } from 'antd'
import * as AllDemo from '../demo'
import Header from './header'
const MenuItem = Menu.Item
export default {
render () {
@ -11,7 +12,9 @@ export default {
lang = 'us'
}
return (
<div class='site page-container'>
<div class='site'>
<Header />
<div class='main-wrapper'>
<Menu class='nav' selectedKeys={[name]}>
{Object.keys(AllDemo).map(d => <MenuItem key={d}>
<router-link to={{ path: `/components/${lang}/${d}` }}>{d}</router-link>
@ -20,6 +23,7 @@ export default {
<div class='content main-container'>
{Demo ? <Demo /> : '正在紧急开发中...'}
</div>
</div>
</div>
)

@ -0,0 +1,24 @@
<template>
<header id='header'>
<a-menu v-model="current" mode="horizontal" id="nav">
<a-menu-item key='home'>
首页
</a-menu-item>
<a-menu-item key='design'>
设计语言
</a-menu-item>
<a-menu-item key='components'>
组件
</a-menu-item>
</a-menu>
</header>
</template>
<script>
export default {
data () {
return {
current: ['components'],
}
},
}
</script>

@ -1,11 +1,25 @@
@import './theme/static/index.less';
#app {
height: 100%;
}
.site {
display: flex;
flex-direction: column;
height: 100%;
.nav {
width: 200px;
overflow-y: scroll;
}
.content {
flex: 1;
overflow-y: scroll;
}
#header {
padding: 0 50px;
}
.main-wrapper {
display: flex;
flex: 1;
}
}

Loading…
Cancel
Save