64 lines
1.8 KiB
JavaScript
64 lines
1.8 KiB
JavaScript
import Vue from 'vue'
|
|
import Router from 'vue-router'
|
|
import { normalizeURL, decode } from 'ufo'
|
|
import { interopDefault } from './utils'
|
|
import scrollBehavior from './router.scrollBehavior.js'
|
|
|
|
const _4c4bd4da = () => interopDefault(import('../pages/autofill.ts' /* webpackChunkName: "pages/autofill" */))
|
|
const _ae4b8690 = () => interopDefault(import('../pages/Check_Veify.ts' /* webpackChunkName: "pages/Check_Veify" */))
|
|
const _a9d81b18 = () => interopDefault(import('../pages/submit.ts' /* webpackChunkName: "pages/submit" */))
|
|
const _6619b0c9 = () => interopDefault(import('../pages/index.vue' /* webpackChunkName: "pages/index" */))
|
|
|
|
const emptyFn = () => {}
|
|
|
|
Vue.use(Router)
|
|
|
|
export const routerOptions = {
|
|
mode: 'history',
|
|
base: '/',
|
|
linkActiveClass: 'nuxt-link-active',
|
|
linkExactActiveClass: 'nuxt-link-exact-active',
|
|
scrollBehavior,
|
|
|
|
routes: [{
|
|
path: "/autofill",
|
|
component: _4c4bd4da,
|
|
name: "autofill"
|
|
}, {
|
|
path: "/Check_Veify",
|
|
component: _ae4b8690,
|
|
name: "Check_Veify"
|
|
}, {
|
|
path: "/submit",
|
|
component: _a9d81b18,
|
|
name: "submit"
|
|
}, {
|
|
path: "/",
|
|
component: _6619b0c9,
|
|
name: "index"
|
|
}],
|
|
|
|
fallback: false
|
|
}
|
|
|
|
export function createRouter (ssrContext, config) {
|
|
const base = (config._app && config._app.basePath) || routerOptions.base
|
|
const router = new Router({ ...routerOptions, base })
|
|
|
|
// TODO: remove in Nuxt 3
|
|
const originalPush = router.push
|
|
router.push = function push (location, onComplete = emptyFn, onAbort) {
|
|
return originalPush.call(this, location, onComplete, onAbort)
|
|
}
|
|
|
|
const resolve = router.resolve.bind(router)
|
|
router.resolve = (to, current, append) => {
|
|
if (typeof to === 'string') {
|
|
to = normalizeURL(to)
|
|
}
|
|
return resolve(to, current, append)
|
|
}
|
|
|
|
return router
|
|
}
|