corretto altro ts...
ora manca ancora il vuelidate
This commit is contained in:
@@ -2,7 +2,7 @@ import Vue from 'vue'
|
||||
import VueRouter, { RouterMode } from 'vue-router'
|
||||
import { PositionResult } from 'vue-router/types/router'
|
||||
|
||||
import routes from '@/router/routes'
|
||||
import { RouteConfig } from './route-config'
|
||||
|
||||
Vue.use(VueRouter)
|
||||
/*
|
||||
@@ -13,7 +13,7 @@ Vue.use(VueRouter)
|
||||
export default function (/* { store, ssrContext } */) {
|
||||
const Router = new VueRouter({
|
||||
scrollBehavior: () => ({ y: 0 } as PositionResult),
|
||||
routes,
|
||||
routes: RouteConfig,
|
||||
|
||||
// Leave these as is and change from quasar.conf.js instead!
|
||||
// quasar.conf.js -> build -> vueRouterMode
|
||||
|
||||
@@ -1,9 +1,17 @@
|
||||
import { RouteConfig } from 'vue-router'
|
||||
import { RouteConfig as VueRouteConfig } from 'vue-router'
|
||||
|
||||
const routes: RouteConfig[] = [
|
||||
{ path: '/', component: () => import('@/pages/Index.vue'), meta: { name: 'Home' } },
|
||||
{ path: '/test', component: () => import('@/views/login/test.vue'), meta: { name: 'Test' } },
|
||||
{ path: '/signup', component: () => import('@/views/login/signup/signup.vue'), meta: { name: 'Registration' } },
|
||||
import { RouteNames } from './route-names'
|
||||
|
||||
|
||||
export const RouteConfig: VueRouteConfig[] = [
|
||||
{
|
||||
component: () => import('@/root/home/home.vue'),
|
||||
name: RouteNames.home,
|
||||
path: '/',
|
||||
meta: { name: 'Home' }
|
||||
},
|
||||
{ path: '/test', component: () => import('@/views/login/test.vue'), meta: { name: 'Test' } },
|
||||
{ path: '/signup', component: () => import('@/views/login/signup/signup.vue'), meta: { name: 'Registration' } }
|
||||
/*
|
||||
{ path: '/signin', component: () => import('@/views/login/signin.vue'), meta: { name: 'Login' } },
|
||||
{ path: '/vreg', component: () => import('@/views/login/vreg.vue'), meta: { name: 'Verify Reg' } },
|
||||
@@ -29,4 +37,3 @@ const routes: RouteConfig[] = [
|
||||
}*/
|
||||
]
|
||||
|
||||
export default routes
|
||||
4
src/router/route-names.ts
Normal file
4
src/router/route-names.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export const RouteNames = {
|
||||
home: 'home',
|
||||
login: 'login'
|
||||
}
|
||||
Reference in New Issue
Block a user