fix: fix demo and refine sidenav demo

This commit is contained in:
Justineo 2022-05-07 00:02:55 +08:00
parent 9f25df8b89
commit cde1d00122
No known key found for this signature in database
GPG Key ID: B73F0979CF18A0EA
3 changed files with 67 additions and 65 deletions

View File

@ -164,6 +164,9 @@ export default {
this.code = this.$refs.source?.querySelector('pre')?.textContent || '' this.code = this.$refs.source?.querySelector('pre')?.textContent || ''
}, },
destroyed () {
modal.close()
},
methods: { methods: {
play (vendor) { play (vendor) {
let locale = getLocale(this.$route.path) let locale = getLocale(this.$route.path)

View File

@ -13,71 +13,70 @@ export default {
'veui-sidenav': Sidenav 'veui-sidenav': Sidenav
}, },
data () { data () {
let items = [ return {
items: [
{ {
label: 'Group One', label: 'Basic',
name: 'group-one',
children: [ children: [
{ {
label: 'Sub One', label: 'Button',
name: 'sub-one', to: '/components/button'
},
{
label: 'Dropdown',
to: '/components/dropdown'
}
]
},
{
label: 'Groups',
children: [
{
label: 'RadioGroup',
to: '/components/radio-group'
},
{
label: 'CheckboxGroup',
to: '/components/checkbox-group'
}
]
},
{
label: 'Form Controls',
children: [
{
label: 'Text Fields',
children: [ children: [
{ {
label: 'Input', label: 'Input',
to: '/components/input' to: '/components/input'
},
{
label: 'Textarea',
to: '/components/textarea'
} }
] ]
}, },
{ {
label: 'Loading', label: 'Pickers',
name: 'Loading',
to: '/components/loading',
children: [ children: [
{ {
label: 'Switch', label: 'Select',
to: '/components/switch' to: '/components/select'
}
]
}
]
}, },
{ {
label: 'Button', label: 'DatePicker',
name: 'Button', to: '/components/date-picker'
to: '/components/button',
children: [
{
label: 'Disabled',
name: 'Disabled',
disabled: true,
children: [
{
label: 'Link',
name: 'Link',
to: '/components/link'
}
]
}
]
}, },
{ {
label: 'Navigation Three', label: 'TimePicker',
name: 'nav-three', to: '/components/time-picker'
disabled: true }
}, ]
{
label: 'Navigation Four',
name: 'nav-four',
children: [
{
label: 'Progress',
to: '/components/progress'
} }
] ]
} }
] ]
return {
items
} }
} }
} }

View File

@ -308,7 +308,7 @@
"slug": "drawer" "slug": "drawer"
}, },
{ {
"title": "Sidenav - 边栏菜单", "title": "Sidenav - 侧导航",
"slug": "sidenav" "slug": "sidenav"
}, },
{ {