updated to vue3
initial work on more reactive EventSource wrapper
This commit is contained in:
@@ -1,27 +1,41 @@
|
||||
import Vue from 'vue'
|
||||
import VueRouter from 'vue-router'
|
||||
import Home from '../views/Home.vue'
|
||||
import { createWebHashHistory , createRouter } from 'vue-router';
|
||||
|
||||
Vue.use(VueRouter)
|
||||
import Home from '@/views/Home.vue';
|
||||
import Connect from '@/views/Connect.vue';
|
||||
import Connection from '@/components/Connection.vue';
|
||||
import About from '@/views/About.vue';
|
||||
import NotFound from '@/views/NotFound.vue';
|
||||
|
||||
const routes = [
|
||||
{
|
||||
path: '/:channel?',
|
||||
name: 'Home',
|
||||
component: Home
|
||||
}
|
||||
// {
|
||||
// path: '/about',
|
||||
// name: 'About',
|
||||
// // route level code-splitting
|
||||
// // this generates a separate chunk (about.[hash].js) for this route
|
||||
// // which is lazy-loaded when the route is visited.
|
||||
// component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
|
||||
// }
|
||||
]
|
||||
const routes = [
|
||||
{
|
||||
path: "/",
|
||||
name: "Home",
|
||||
component: Home
|
||||
},
|
||||
{
|
||||
path: "/connect/:hash",
|
||||
name: "Connect",
|
||||
components: {
|
||||
default: Connect,
|
||||
"navbar": Connection
|
||||
},
|
||||
props: true
|
||||
},
|
||||
{
|
||||
path: "/about",
|
||||
name: "About",
|
||||
component: About
|
||||
},
|
||||
{
|
||||
path: "/:catchall(.*)",
|
||||
component: NotFound
|
||||
}
|
||||
];
|
||||
|
||||
const router = new VueRouter({
|
||||
routes
|
||||
})
|
||||
const router = createRouter({
|
||||
history: createWebHashHistory(),
|
||||
linkActiveClass: "is-active",
|
||||
routes
|
||||
});
|
||||
|
||||
export default router
|
||||
export default router;
|
||||
Reference in New Issue
Block a user