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 || ''
},
destroyed () {
modal.close()
},
methods: {
play (vendor) {
let locale = getLocale(this.$route.path)

View File

@ -13,71 +13,70 @@ export default {
'veui-sidenav': Sidenav
},
data () {
let items = [
return {
items: [
{
label: 'Group One',
name: 'group-one',
label: 'Basic',
children: [
{
label: 'Sub One',
name: 'sub-one',
label: 'Button',
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: [
{
label: 'Input',
to: '/components/input'
},
{
label: 'Textarea',
to: '/components/textarea'
}
]
},
{
label: 'Loading',
name: 'Loading',
to: '/components/loading',
label: 'Pickers',
children: [
{
label: 'Switch',
to: '/components/switch'
}
]
}
]
label: 'Select',
to: '/components/select'
},
{
label: 'Button',
name: 'Button',
to: '/components/button',
children: [
{
label: 'Disabled',
name: 'Disabled',
disabled: true,
children: [
{
label: 'Link',
name: 'Link',
to: '/components/link'
}
]
}
]
label: 'DatePicker',
to: '/components/date-picker'
},
{
label: 'Navigation Three',
name: 'nav-three',
disabled: true
},
{
label: 'Navigation Four',
name: 'nav-four',
children: [
{
label: 'Progress',
to: '/components/progress'
label: 'TimePicker',
to: '/components/time-picker'
}
]
}
]
}
]
return {
items
}
}
}

View File

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