fix: fix demo and refine sidenav demo
This commit is contained in:
		| @@ -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) | ||||||
|   | |||||||
| @@ -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 |  | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -308,7 +308,7 @@ | |||||||
|           "slug": "drawer" |           "slug": "drawer" | ||||||
|         }, |         }, | ||||||
|         { |         { | ||||||
|           "title": "Sidenav - 边栏菜单", |           "title": "Sidenav - 侧导航", | ||||||
|           "slug": "sidenav" |           "slug": "sidenav" | ||||||
|         }, |         }, | ||||||
|         { |         { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user