Skip to content

Commit cde1d00

Browse files
committed
fix: fix demo and refine sidenav demo
1 parent 9f25df8 commit cde1d00

File tree

3 files changed

+67
-65
lines changed

3 files changed

+67
-65
lines changed

components/OneDemo.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,9 @@ export default {
164164
165165
this.code = this.$refs.source?.querySelector('pre')?.textContent || ''
166166
},
167+
destroyed () {
168+
modal.close()
169+
},
167170
methods: {
168171
play (vendor) {
169172
let locale = getLocale(this.$route.path)

one/docs/demo/sidenav/normal.vue

Lines changed: 63 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -13,71 +13,70 @@ export default {
1313
'veui-sidenav': Sidenav
1414
},
1515
data () {
16-
let items = [
17-
{
18-
label: 'Group One',
19-
name: 'group-one',
20-
children: [
21-
{
22-
label: 'Sub One',
23-
name: 'sub-one',
24-
children: [
25-
{
26-
label: 'Input',
27-
to: '/components/input'
28-
}
29-
]
30-
},
31-
{
32-
label: 'Loading',
33-
name: 'Loading',
34-
to: '/components/loading',
35-
children: [
36-
{
37-
label: 'Switch',
38-
to: '/components/switch'
39-
}
40-
]
41-
}
42-
]
43-
},
44-
{
45-
label: 'Button',
46-
name: 'Button',
47-
to: '/components/button',
48-
children: [
49-
{
50-
label: 'Disabled',
51-
name: 'Disabled',
52-
disabled: true,
53-
children: [
54-
{
55-
label: 'Link',
56-
name: 'Link',
57-
to: '/components/link'
58-
}
59-
]
60-
}
61-
]
62-
},
63-
{
64-
label: 'Navigation Three',
65-
name: 'nav-three',
66-
disabled: true
67-
},
68-
{
69-
label: 'Navigation Four',
70-
name: 'nav-four',
71-
children: [
72-
{
73-
label: 'Progress',
74-
to: '/components/progress'
75-
}
76-
]
77-
}
78-
]
7916
return {
80-
items
17+
items: [
18+
{
19+
label: 'Basic',
20+
children: [
21+
{
22+
label: 'Button',
23+
to: '/components/button'
24+
},
25+
{
26+
label: 'Dropdown',
27+
to: '/components/dropdown'
28+
}
29+
]
30+
},
31+
{
32+
label: 'Groups',
33+
children: [
34+
{
35+
label: 'RadioGroup',
36+
to: '/components/radio-group'
37+
},
38+
{
39+
label: 'CheckboxGroup',
40+
to: '/components/checkbox-group'
41+
}
42+
]
43+
},
44+
{
45+
label: 'Form Controls',
46+
children: [
47+
{
48+
label: 'Text Fields',
49+
children: [
50+
{
51+
label: 'Input',
52+
to: '/components/input'
53+
},
54+
{
55+
label: 'Textarea',
56+
to: '/components/textarea'
57+
}
58+
]
59+
},
60+
{
61+
label: 'Pickers',
62+
children: [
63+
{
64+
label: 'Select',
65+
to: '/components/select'
66+
},
67+
{
68+
label: 'DatePicker',
69+
to: '/components/date-picker'
70+
},
71+
{
72+
label: 'TimePicker',
73+
to: '/components/time-picker'
74+
}
75+
]
76+
}
77+
]
78+
}
79+
]
8180
}
8281
}
8382
}

one/docs/nav.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@
308308
"slug": "drawer"
309309
},
310310
{
311-
"title": "Sidenav - 边栏菜单",
311+
"title": "Sidenav - 侧导航",
312312
"slug": "sidenav"
313313
},
314314
{

0 commit comments

Comments
 (0)