2020-08-13 11:47:56 +08:00
|
|
|
|
<template>
|
|
|
|
|
<article>
|
2022-04-21 23:23:30 +08:00
|
|
|
|
<veui-layout>
|
|
|
|
|
<veui-header>Header</veui-header>
|
|
|
|
|
<veui-layout>
|
|
|
|
|
<veui-sidebar collapsible>
|
|
|
|
|
<veui-sidenav
|
|
|
|
|
:items="items"
|
|
|
|
|
collapsible
|
|
|
|
|
/>
|
|
|
|
|
</veui-sidebar>
|
|
|
|
|
<veui-layout>
|
|
|
|
|
<veui-content>Content</veui-content>
|
|
|
|
|
<veui-footer style="background: #ccc;">
|
|
|
|
|
Footer(背景仅为演示)
|
|
|
|
|
</veui-footer>
|
|
|
|
|
</veui-layout>
|
|
|
|
|
</veui-layout>
|
|
|
|
|
</veui-layout>
|
2020-08-13 11:47:56 +08:00
|
|
|
|
</article>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
2022-04-21 23:23:30 +08:00
|
|
|
|
import { Layout, Header, Footer, Sidebar, Content, Sidenav } from 'veui'
|
2020-08-13 11:47:56 +08:00
|
|
|
|
import 'veui-theme-dls-icons/calendar'
|
|
|
|
|
import 'veui-theme-dls-icons/bullseye'
|
|
|
|
|
import 'veui-theme-dls-icons/clock'
|
|
|
|
|
import 'veui-theme-dls-icons/eye'
|
|
|
|
|
|
|
|
|
|
export default {
|
2022-04-21 23:23:30 +08:00
|
|
|
|
name: 'veui-sidenav-demo',
|
2020-08-13 11:47:56 +08:00
|
|
|
|
components: {
|
2022-04-21 23:23:30 +08:00
|
|
|
|
'veui-layout': Layout,
|
|
|
|
|
'veui-header': Header,
|
|
|
|
|
'veui-footer': Footer,
|
|
|
|
|
'veui-sidebar': Sidebar,
|
|
|
|
|
'veui-content': Content,
|
|
|
|
|
'veui-sidenav': Sidenav
|
2020-08-13 11:47:56 +08:00
|
|
|
|
},
|
|
|
|
|
data () {
|
|
|
|
|
let items = [
|
|
|
|
|
{
|
|
|
|
|
label: 'Group One',
|
|
|
|
|
name: 'group-one',
|
|
|
|
|
icon: 'calendar',
|
|
|
|
|
children: [
|
|
|
|
|
{
|
|
|
|
|
label: 'Sub One',
|
|
|
|
|
name: 'sub-one',
|
|
|
|
|
children: [
|
|
|
|
|
{
|
|
|
|
|
label: 'Input',
|
|
|
|
|
to: '/components/input'
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: 'Loading',
|
|
|
|
|
name: 'Loading',
|
|
|
|
|
to: '/components/loading',
|
|
|
|
|
children: [
|
|
|
|
|
{
|
|
|
|
|
label: 'Switch',
|
|
|
|
|
to: '/components/switch'
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: 'Button',
|
|
|
|
|
name: 'Button',
|
|
|
|
|
to: '/components/button',
|
|
|
|
|
icon: 'bullseye',
|
|
|
|
|
children: [
|
|
|
|
|
{
|
|
|
|
|
label: 'Disabled',
|
|
|
|
|
name: 'Disabled',
|
|
|
|
|
disabled: true,
|
|
|
|
|
children: [
|
|
|
|
|
{
|
|
|
|
|
label: 'Link',
|
|
|
|
|
name: 'Link',
|
|
|
|
|
to: '/components/link'
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: 'Navigation Three',
|
|
|
|
|
name: 'nav-three',
|
|
|
|
|
icon: 'eye',
|
|
|
|
|
disabled: true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: 'Navigation Four',
|
|
|
|
|
name: 'nav-four',
|
|
|
|
|
icon: 'clock',
|
|
|
|
|
children: [
|
|
|
|
|
{
|
|
|
|
|
label: 'Progress',
|
|
|
|
|
to: '/components/progress'
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
return {
|
|
|
|
|
items
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
2022-04-21 23:23:30 +08:00
|
|
|
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
|
|
article {
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
|
|
|
|
& > .veui-layout {
|
|
|
|
|
min-width: 720px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.veui-layout-header,
|
|
|
|
|
.veui-layout-footer,
|
|
|
|
|
.veui-layout-content {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
}
|
|
|
|
|
</style>
|