index.ts 880 B

12345678910111213141516171819202122232425262728293031
  1. import { createRouter, createWebHistory } from 'vue-router'
  2. const MainLayout = () => import('@/layouts/MainLayout.vue')
  3. const Dashboard = () => import('@/views/Dashboard.vue')
  4. const About = () => import('@/views/About.vue')
  5. const Templates = () => import('@/views/Templates.vue')
  6. const Executions = () => import('@/views/Executions.vue')
  7. const Editor = () => import('@/views/Editor.vue')
  8. const routes = [
  9. {
  10. path: '/',
  11. component: MainLayout,
  12. children: [
  13. { path: '', name: 'Dashboard', component: Dashboard },
  14. { path: 'about', name: 'About', component: About },
  15. { path: 'templates', name: 'Templates', component: Templates },
  16. { path: 'executions', name: 'Executions', component: Executions },
  17. { path: 'workflow/:id', name: 'Editor', component: Editor }
  18. ]
  19. }
  20. ]
  21. const router = createRouter({
  22. history: createWebHistory(),
  23. routes
  24. })
  25. export default router