init project and finish login page
This commit is contained in:
16
src/router/index.ts
Normal file
16
src/router/index.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { createMemoryHistory, createRouter } from 'vue-router'
|
||||
import LoginView from "@/views/LoginView.vue"
|
||||
import User from '@/views/UserView.vue'
|
||||
|
||||
const routes = [
|
||||
{ path: "/", redirect: "/login" },
|
||||
{ path: "/login", name: "Login", component: LoginView },
|
||||
{ path: "/user", name: "User", component: User },
|
||||
]
|
||||
|
||||
const router = createRouter({
|
||||
history: createMemoryHistory(),
|
||||
routes,
|
||||
})
|
||||
|
||||
export default router
|
||||
Reference in New Issue
Block a user