Added libs

This commit is contained in:
Lucas
2026-01-25 13:55:46 +10:00
parent 575c682afc
commit f70af3c4ea
229 changed files with 26983 additions and 0 deletions

29
vueNoSys/src/router.js Normal file
View File

@@ -0,0 +1,29 @@
import { createRouter, createWebHistory } from "vue-router";
import HomeView from "./views/HomeView.vue";
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
routes: [
{path: '/', name:'vueNoSys', component: HomeView},
],
})
async function getRouter(configs){
for (const [packageId, config] of Object.entries(configs)) {
try {
await import(`./modules/${packageId}/router.js`)
.then(config => {
config.routes.forEach(route =>{
route.path = '/'+packageId+route.path;
router.addRoute(route);
})
});
} catch (error) {
console.log(error)
}
}
console.log(router.getRoutes())
return router;
}
export default getRouter;