mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-29 10:42:44 +00:00
Front stack primary updates and improvements (#757)
* (fix) index.html formating for prettier * (add) proper icon management - on-demand icons auto importing - handle all available icon sets (https://icones.js.org) * (fix) proper css management * (add) front stack improvement: - implement vue router - prepare for App.vue simplification - proper management of views and layouts - fix Tailwind CSS and prepare for overall css cleaning * (fix) move back user.css to public dir * (fix) remove user.css import from main.ts
This commit is contained in:
28
src/router.ts
Normal file
28
src/router.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import { createRouter, createWebHistory } from 'vue-router'
|
||||
import LayoutDefault from '@/views/layouts/LayoutDefault.vue'
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHistory(),
|
||||
routes: [
|
||||
{
|
||||
path: '/',
|
||||
component: LayoutDefault,
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
component: () => import('@/views/GraphView.vue')
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
scrollBehavior(to, from, savedPosition) {
|
||||
if (savedPosition) {
|
||||
return savedPosition
|
||||
} else {
|
||||
return { top: 0 }
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
export default router
|
||||
Reference in New Issue
Block a user