first commit
This commit is contained in:
commit
6e3c1a90f7
31 changed files with 14083 additions and 0 deletions
30
src/router/index.ts
Normal file
30
src/router/index.ts
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
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 router = createRouter({
|
||||
history: createWebHistory(import.meta.env.BASE_URL),
|
||||
routes: [
|
||||
{
|
||||
path: '/',
|
||||
name: 'home',
|
||||
component: MainLayout,
|
||||
children:[
|
||||
{
|
||||
path: "/metadata",
|
||||
name: "metadata",
|
||||
component: Metadata,
|
||||
},
|
||||
{
|
||||
path: "/organizational",
|
||||
name: "organizational",
|
||||
component: Organizational
|
||||
}
|
||||
]
|
||||
},
|
||||
]
|
||||
})
|
||||
|
||||
export default router;
|
||||
13
src/router/loader.ts
Normal file
13
src/router/loader.ts
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
/**
|
||||
***** DEPRECATED - Must be delete later *****
|
||||
*/
|
||||
|
||||
/**โหลดหน้าแบบ async/await
|
||||
* @param view "ชี่อไฟล์".vue
|
||||
* @param folder "folderในsrc" [Ex. /src/"folder"] default=views เมื่อไม่ส่งค่า
|
||||
*/
|
||||
export function load(view: string, folder: string = "views") {
|
||||
// console.log(`@/${folder}/${view}.vue`);
|
||||
return async () => await import(`@/${folder}/${view}.vue`);
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue