updated to vue3

initial work on more reactive EventSource wrapper
This commit is contained in:
2021-05-15 22:43:06 +00:00
parent fdbd14a2b2
commit 7b26672963
14 changed files with 2144 additions and 1531 deletions
+37 -23
View File
@@ -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;