Router scroll reset
parent
602e06ef9a
commit
4fa0700d44
517
src/router.js
517
src/router.js
|
@ -5,261 +5,264 @@ import Home from './views/Home.vue';
|
||||||
Vue.use(Router);
|
Vue.use(Router);
|
||||||
|
|
||||||
export default new Router({
|
export default new Router({
|
||||||
routes: [
|
routes: [
|
||||||
{
|
{
|
||||||
path: '/',
|
path: '/',
|
||||||
name: 'home',
|
name: 'home',
|
||||||
component: Home
|
component: Home
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/setup',
|
path: '/setup',
|
||||||
name: 'setup',
|
name: 'setup',
|
||||||
component: () => import('./views/setup/Setup.vue')
|
component: () => import('./views/setup/Setup.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/support',
|
path: '/support',
|
||||||
name: 'support',
|
name: 'support',
|
||||||
component: () => import('./views/support/Support.vue')
|
component: () => import('./views/support/Support.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/icons',
|
path: '/icons',
|
||||||
name: 'icons',
|
name: 'icons',
|
||||||
component: () => import('./views/icons/Icons.vue')
|
component: () => import('./views/icons/Icons.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/accordion',
|
path: '/accordion',
|
||||||
name: 'accordion',
|
name: 'accordion',
|
||||||
component: () => import('./views/accordion/AccordionDemo.vue')
|
component: () => import('./views/accordion/AccordionDemo.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/autocomplete',
|
path: '/autocomplete',
|
||||||
name: 'autocomplete',
|
name: 'autocomplete',
|
||||||
component: () => import('./views/autocomplete/AutoCompleteDemo.vue')
|
component: () => import('./views/autocomplete/AutoCompleteDemo.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/button',
|
path: '/button',
|
||||||
name: 'button',
|
name: 'button',
|
||||||
component: () => import('./views/button/ButtonDemo.vue')
|
component: () => import('./views/button/ButtonDemo.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/calendar',
|
path: '/calendar',
|
||||||
name: 'calendar',
|
name: 'calendar',
|
||||||
component: () => import('./views/calendar/CalendarDemo.vue')
|
component: () => import('./views/calendar/CalendarDemo.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/card',
|
path: '/card',
|
||||||
name: 'card',
|
name: 'card',
|
||||||
component: () => import('./views/card/CardDemo.vue')
|
component: () => import('./views/card/CardDemo.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/chart',
|
path: '/chart',
|
||||||
name: 'chart',
|
name: 'chart',
|
||||||
component: () => import('./views/chart/ChartDemo.vue')
|
component: () => import('./views/chart/ChartDemo.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/chart/bar',
|
path: '/chart/bar',
|
||||||
name: 'barchart',
|
name: 'barchart',
|
||||||
component: () => import('./views/chart/BarChartDemo.vue')
|
component: () => import('./views/chart/BarChartDemo.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/chart/combo',
|
path: '/chart/combo',
|
||||||
name: 'combochart',
|
name: 'combochart',
|
||||||
component: () => import('./views/chart/ComboChartDemo.vue')
|
component: () => import('./views/chart/ComboChartDemo.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/chart/doughnut',
|
path: '/chart/doughnut',
|
||||||
name: 'doughnutchart',
|
name: 'doughnutchart',
|
||||||
component: () => import('./views/chart/DoughnutChartDemo.vue')
|
component: () => import('./views/chart/DoughnutChartDemo.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/chart/line',
|
path: '/chart/line',
|
||||||
name: 'linechart',
|
name: 'linechart',
|
||||||
component: () => import('./views/chart/LineChartDemo.vue')
|
component: () => import('./views/chart/LineChartDemo.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/chart/pie',
|
path: '/chart/pie',
|
||||||
name: 'piechart',
|
name: 'piechart',
|
||||||
component: () => import('./views/chart/PieChartDemo.vue')
|
component: () => import('./views/chart/PieChartDemo.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/chart/polararea',
|
path: '/chart/polararea',
|
||||||
name: 'polarareachart',
|
name: 'polarareachart',
|
||||||
component: () => import('./views/chart/PolarAreaChartDemo.vue')
|
component: () => import('./views/chart/PolarAreaChartDemo.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/chart/radar',
|
path: '/chart/radar',
|
||||||
name: 'radarchart',
|
name: 'radarchart',
|
||||||
component: () => import('./views/chart/RadarChartDemo.vue')
|
component: () => import('./views/chart/RadarChartDemo.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/checkbox',
|
path: '/checkbox',
|
||||||
name: 'checkbox',
|
name: 'checkbox',
|
||||||
component: () => import('./views/checkbox/CheckboxDemo.vue')
|
component: () => import('./views/checkbox/CheckboxDemo.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/chips',
|
path: '/chips',
|
||||||
name: 'chips',
|
name: 'chips',
|
||||||
component: () => import('./views/chips/ChipsDemo.vue')
|
component: () => import('./views/chips/ChipsDemo.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/dataview',
|
path: '/dataview',
|
||||||
name: 'dataview',
|
name: 'dataview',
|
||||||
component: () => import('./views/dataview/DataViewDemo.vue')
|
component: () => import('./views/dataview/DataViewDemo.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/dialog',
|
path: '/dialog',
|
||||||
name: 'dialog',
|
name: 'dialog',
|
||||||
component: () => import('./views/dialog/DialogDemo.vue')
|
component: () => import('./views/dialog/DialogDemo.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/dropdown',
|
path: '/dropdown',
|
||||||
name: 'dropdown',
|
name: 'dropdown',
|
||||||
component: () => import('./views/dropdown/DropdownDemo.vue')
|
component: () => import('./views/dropdown/DropdownDemo.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/editor',
|
path: '/editor',
|
||||||
name: 'editor',
|
name: 'editor',
|
||||||
component: () => import('./views/editor/EditorDemo.vue')
|
component: () => import('./views/editor/EditorDemo.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/fieldset',
|
path: '/fieldset',
|
||||||
name: 'fieldset',
|
name: 'fieldset',
|
||||||
component: () => import('./views/fieldset/FieldsetDemo.vue')
|
component: () => import('./views/fieldset/FieldsetDemo.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/fileupload',
|
path: '/fileupload',
|
||||||
name: 'fileupload',
|
name: 'fileupload',
|
||||||
component: () => import('./views/fileupload/FileUploadDemo.vue')
|
component: () => import('./views/fileupload/FileUploadDemo.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/flexgrid',
|
path: '/flexgrid',
|
||||||
name: 'flexgrid',
|
name: 'flexgrid',
|
||||||
component: () => import('./views/flexgrid/FlexGridDemo.vue')
|
component: () => import('./views/flexgrid/FlexGridDemo.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/fullcalendar',
|
path: '/fullcalendar',
|
||||||
name: 'fullcalendar',
|
name: 'fullcalendar',
|
||||||
component: () => import('./views/fullcalendar/FullCalendarDemo.vue')
|
component: () => import('./views/fullcalendar/FullCalendarDemo.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/inputgroup',
|
path: '/inputgroup',
|
||||||
name: 'inputgroup',
|
name: 'inputgroup',
|
||||||
component: () => import('./views/inputgroup/InputGroupDemo.vue')
|
component: () => import('./views/inputgroup/InputGroupDemo.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/inputswitch',
|
path: '/inputswitch',
|
||||||
name: 'inputswitch',
|
name: 'inputswitch',
|
||||||
component: () => import('./views/inputswitch/InputSwitchDemo.vue')
|
component: () => import('./views/inputswitch/InputSwitchDemo.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/inputtext',
|
path: '/inputtext',
|
||||||
name: 'inputtext',
|
name: 'inputtext',
|
||||||
component: () => import('./views/inputtext/InputTextDemo.vue')
|
component: () => import('./views/inputtext/InputTextDemo.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/listbox',
|
path: '/listbox',
|
||||||
name: 'listbox',
|
name: 'listbox',
|
||||||
component: () => import('./views/listbox/ListboxDemo.vue')
|
component: () => import('./views/listbox/ListboxDemo.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/message',
|
path: '/message',
|
||||||
name: 'message',
|
name: 'message',
|
||||||
component: () => import('./views/message/MessageDemo.vue')
|
component: () => import('./views/message/MessageDemo.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/multiselect',
|
path: '/multiselect',
|
||||||
name: 'multiselect',
|
name: 'multiselect',
|
||||||
component: () => import('./views/multiselect/MultiSelectDemo.vue')
|
component: () => import('./views/multiselect/MultiSelectDemo.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/overlaypanel',
|
path: '/overlaypanel',
|
||||||
name: 'overlaypanel',
|
name: 'overlaypanel',
|
||||||
component: () => import('./views/overlaypanel/OverlayPanelDemo.vue')
|
component: () => import('./views/overlaypanel/OverlayPanelDemo.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/paginator',
|
path: '/paginator',
|
||||||
name: 'paginator',
|
name: 'paginator',
|
||||||
component: () => import('./views/paginator/PaginatorDemo.vue')
|
component: () => import('./views/paginator/PaginatorDemo.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/panel',
|
path: '/panel',
|
||||||
name: 'panel',
|
name: 'panel',
|
||||||
component: () => import('./views/panel/PanelDemo.vue')
|
component: () => import('./views/panel/PanelDemo.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/password',
|
path: '/password',
|
||||||
name: 'password',
|
name: 'password',
|
||||||
component: () => import('./views/password/PasswordDemo.vue')
|
component: () => import('./views/password/PasswordDemo.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/progressbar',
|
path: '/progressbar',
|
||||||
name: 'progressbar',
|
name: 'progressbar',
|
||||||
component: () => import('./views/progressbar/ProgressBarDemo.vue')
|
component: () => import('./views/progressbar/ProgressBarDemo.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/radiobutton',
|
path: '/radiobutton',
|
||||||
name: 'radiobutton',
|
name: 'radiobutton',
|
||||||
component: () => import('./views/radiobutton/RadioButtonDemo.vue')
|
component: () => import('./views/radiobutton/RadioButtonDemo.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/rating',
|
path: '/rating',
|
||||||
name: 'rating',
|
name: 'rating',
|
||||||
component: () => import('./views/rating/RatingDemo.vue')
|
component: () => import('./views/rating/RatingDemo.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/selectbutton',
|
path: '/selectbutton',
|
||||||
name: 'selectbutton',
|
name: 'selectbutton',
|
||||||
component: () => import('./views/selectbutton/SelectButtonDemo.vue')
|
component: () => import('./views/selectbutton/SelectButtonDemo.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/sidebar',
|
path: '/sidebar',
|
||||||
name: 'sidebar',
|
name: 'sidebar',
|
||||||
component: () => import('./views/sidebar/SidebarDemo.vue')
|
component: () => import('./views/sidebar/SidebarDemo.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/slider',
|
path: '/slider',
|
||||||
name: 'slider',
|
name: 'slider',
|
||||||
component: () => import('./views/slider/SliderDemo.vue')
|
component: () => import('./views/slider/SliderDemo.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/spinner',
|
path: '/spinner',
|
||||||
name: 'spinner',
|
name: 'spinner',
|
||||||
component: () => import('./views/spinner/SpinnerDemo.vue')
|
component: () => import('./views/spinner/SpinnerDemo.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/splitbutton',
|
path: '/splitbutton',
|
||||||
name: 'splitbutton',
|
name: 'splitbutton',
|
||||||
component: () => import('./views/splitbutton/SplitButtonDemo.vue')
|
component: () => import('./views/splitbutton/SplitButtonDemo.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/textarea',
|
path: '/textarea',
|
||||||
name: 'textarea',
|
name: 'textarea',
|
||||||
component: () => import('./views/textarea/TextareaDemo.vue')
|
component: () => import('./views/textarea/TextareaDemo.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/tabview',
|
path: '/tabview',
|
||||||
name: 'tabview',
|
name: 'tabview',
|
||||||
component: () => import('./views/tabview/TabViewDemo.vue')
|
component: () => import('./views/tabview/TabViewDemo.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/toast',
|
path: '/toast',
|
||||||
name: 'toast',
|
name: 'toast',
|
||||||
component: () => import('./views/toast/ToastDemo.vue')
|
component: () => import('./views/toast/ToastDemo.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/togglebutton',
|
path: '/togglebutton',
|
||||||
name: 'togglebutton',
|
name: 'togglebutton',
|
||||||
component: () => import('./views/togglebutton/ToggleButtonDemo.vue')
|
component: () => import('./views/togglebutton/ToggleButtonDemo.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/toolbar',
|
path: '/toolbar',
|
||||||
name: 'toolbar',
|
name: 'toolbar',
|
||||||
component: () => import('./views/toolbar/ToolbarDemo.vue')
|
component: () => import('./views/toolbar/ToolbarDemo.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/tristatecheckbox',
|
path: '/tristatecheckbox',
|
||||||
name: 'tristatecheckbox',
|
name: 'tristatecheckbox',
|
||||||
component: () => import('./views/tristatecheckbox/TriStateCheckboxDemo.vue')
|
component: () => import('./views/tristatecheckbox/TriStateCheckboxDemo.vue')
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
scrollBehavior() {
|
||||||
|
return {x: 0, y: 0};
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue