работаем бля работаем
This commit is contained in:
21
new-client/src/app/plugins/router.ts
Normal file
21
new-client/src/app/plugins/router.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import type { Component, FunctionPlugin } from 'vue'
|
||||
import { createRouter, createWebHistory } from 'vue-router'
|
||||
import { routes } from 'vue-router/auto-routes'
|
||||
|
||||
declare module 'vue-router' {
|
||||
interface RouteMeta {
|
||||
layout?: Component
|
||||
auth?: false | 'guest'
|
||||
}
|
||||
}
|
||||
|
||||
export const router = createRouter({
|
||||
history: createWebHistory(),
|
||||
routes,
|
||||
})
|
||||
|
||||
export default {
|
||||
install(app) {
|
||||
app.use(router)
|
||||
},
|
||||
} as FunctionPlugin
|
||||
Reference in New Issue
Block a user