first commit
This commit is contained in:
commit
6adcb5b43d
258 files changed
+143145
No files matched your search
@@ -0,0 +1,17 @@
|
||||
import VueRouter from "vue-router";
|
||||
import routes from "./routes";
|
||||
|
||||
// configure router
|
||||
const router = new VueRouter({
|
||||
routes, // short for routes: routes
|
||||
linkExactActiveClass: "active",
|
||||
scrollBehavior: (to) => {
|
||||
if (to.hash) {
|
||||
return {selector: to.hash}
|
||||
} else {
|
||||
return { x: 0, y: 0 }
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
export default router;
|
||||
@@ -0,0 +1,6 @@
|
||||
import Dashboard from '@/pages/Dashboard.vue';
|
||||
export default [
|
||||
{ path: '/', redirect: '/dashboard' },
|
||||
{ path: '/dashboard', name: 'dashboard', component: Dashboard },
|
||||
{ path: '*', redirect: '/dashboard' }
|
||||
];
|
||||
@@ -0,0 +1,24 @@
|
||||
import Vue from 'vue';
|
||||
import Router from 'vue-router';
|
||||
import DashboardLayout from '../layout/starter/SampleLayout.vue';
|
||||
import Starter from '../layout/starter/SamplePage.vue';
|
||||
|
||||
Vue.use(Router);
|
||||
|
||||
export default new Router({
|
||||
routes: [
|
||||
{
|
||||
path: '/',
|
||||
name: 'home',
|
||||
redirect: '/dashboard',
|
||||
component: DashboardLayout,
|
||||
children: [
|
||||
{
|
||||
path: 'dashboard',
|
||||
name: 'dashboard',
|
||||
components: { default: Starter }
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
});
|
||||
Reference in new issue
Block a user