|
@@ -0,0 +1,35 @@
|
|
|
+import { createRouter, createWebHistory, RouteRecordRaw } from "vue-router";
|
|
|
+import UserLogin from "@/features/UserLogin/UserLogin.vue";
|
|
|
+import MainLayout from "@/components/MainLayout/MainLayout.vue";
|
|
|
+import ChangePassword from "@/features/ChangePassword/ChangePassword.vue";
|
|
|
+
|
|
|
+const routes: RouteRecordRaw[] = [
|
|
|
+ { path: "/", component: UserLogin },
|
|
|
+ { path: "/login", component: UserLogin, name: "UserLogin" },
|
|
|
+ {
|
|
|
+ path: "/",
|
|
|
+ component: MainLayout,
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ path: "password",
|
|
|
+ component: ChangePassword,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: "/:pathMatch(.*)*",
|
|
|
+ name: "NotFound",
|
|
|
+ component: () => import("@/components/PageError404.vue"),
|
|
|
+ },
|
|
|
+];
|
|
|
+
|
|
|
+// 3. Create the router instance and pass the `routes` option
|
|
|
+// You can pass in additional options here, but let's
|
|
|
+// keep it simple for now.
|
|
|
+const router = createRouter({
|
|
|
+ // 4. Provide the history implementation to use. We are using the hash history for simplicity here.
|
|
|
+ history: createWebHistory("web"),
|
|
|
+ routes, // short for `routes: routes`
|
|
|
+});
|
|
|
+
|
|
|
+export default router;
|