From f810ef6cec6515f497c3ba668fd035b578576d0b Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Sun, 8 Dec 2024 12:50:18 +0700 Subject: [PATCH] fixing sub path --- src/router/index.ts | 55 ++- src/views/MainLayout.vue | 741 +++++++++++++++++++++++---------------- vite.config.ts | 37 +- 3 files changed, 490 insertions(+), 343 deletions(-) diff --git a/src/router/index.ts b/src/router/index.ts index 41e589c..cace3f2 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -1,10 +1,12 @@ -import { createRouter, createWebHistory } from 'vue-router' +import { createRouter, createWebHistory } from "vue-router"; const MainLayout = () => import("@/views/MainLayout.vue"); const Metadata = () => import("@/modules/01_metadata/views/Main.vue"); -const Organizational = () => import("@/modules/02_organizational/views/Main.vue"); +const Organizational = () => + import("@/modules/02_organizational/views/Main.vue"); const Registration = () => import("@/modules/03_registration/views/Main.vue"); -const Registemployee = () => import("@/modules/04_registry-employee/views/Main.vue"); +const Registemployee = () => + import("@/modules/04_registry-employee/views/Main.vue"); const Order = () => import("@/modules/05_order/views/Main.vue"); const Recruitmain = () => import("@/modules/06_recruitmain/views/Main.vue"); const Placement = () => import("@/modules/07_placement/views/Main.vue"); @@ -16,26 +18,18 @@ const Leaveadmin = () => import("@/modules/11_leaveadmin/views/Main.vue"); const Estimate = () => import("@/modules/12_estimate/views/Main.vue"); const Discipline = () => import("@/modules/13_discipline/views/Main.vue"); - - - - - - - - const Contact = () => import("@/modules/00_contact/views/Main.vue"); const Maintenance = () => import("@/modules/001_Maintenance/views/Main.vue"); const router = createRouter({ - history: createWebHistory(import.meta.env.BASE_URL), + history: createWebHistory(`/faq/`), routes: [ { - path: '/', - name: 'home', + path: "/", + name: "home", component: MainLayout, - children:[ + children: [ { path: "/metadata", name: "metadata", @@ -74,66 +68,59 @@ const router = createRouter({ { path: "/order", name: "Order", - component: Order + component: Order, }, { path: "/recruitmain", name: "Recruitmain", - component: Recruitmain + component: Recruitmain, }, { path: "/placement", name: "Placement", - component: Placement + component: Placement, }, { path: "/retirement", name: "Retirement", - component: Retirement + component: Retirement, }, { path: "/insignia", name: "Insignia", - component: Insignia + component: Insignia, }, { path: "/leaveuser", name: "leaveuser", - component: Leaveuser + component: Leaveuser, }, { path: "/leaveadmin", name: "leaveadmin", - component: Leaveadmin + component: Leaveadmin, }, { path: "/estimate", name: "estimate", - component: Estimate + component: Estimate, }, { path: "/discipline", name: "discipline", - component: Discipline + component: Discipline, }, - - - ] + ], }, - ] -}) + ], +}); export default router; - - - - - diff --git a/src/views/MainLayout.vue b/src/views/MainLayout.vue index 303f460..eedb3e2 100644 --- a/src/views/MainLayout.vue +++ b/src/views/MainLayout.vue @@ -1,352 +1,510 @@ diff --git a/vite.config.ts b/vite.config.ts index e1be6c5..ac70727 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,20 +1,25 @@ -import { fileURLToPath, URL } from 'node:url' +import { fileURLToPath, URL } from "node:url"; -import { defineConfig } from 'vite' -import vue from '@vitejs/plugin-vue' -import vueJsx from '@vitejs/plugin-vue-jsx' -import { quasar, transformAssetUrls } from '@quasar/vite-plugin' +import { defineConfig } from "vite"; +import vue from "@vitejs/plugin-vue"; +import vueJsx from "@vitejs/plugin-vue-jsx"; +import { quasar, transformAssetUrls } from "@quasar/vite-plugin"; // https://vitejs.dev/config/ export default defineConfig({ - plugins: [vue({ - template: { transformAssetUrls } - }), quasar({ - sassVariables: 'src/style/quasar-variables.sass' - }), vueJsx()], - resolve: { - alias: { - '@': fileURLToPath(new URL('./src', import.meta.url)) - } - } -}) + base: "", + plugins: [ + vue({ + template: { transformAssetUrls }, + }), + quasar({ + sassVariables: "src/style/quasar-variables.sass", + }), + vueJsx(), + ], + resolve: { + alias: { + "@": fileURLToPath(new URL("./src", import.meta.url)), + }, + }, +});