master
yutent 2022-10-09 19:19:06 +08:00
parent 7ce34d1020
commit 225fee72d5
4 changed files with 72 additions and 0 deletions

11
src/app.vue Normal file
View File

@ -0,0 +1,11 @@
<template>
<h1>hello vue-live!</h1>
</template>
<script>
export default {
data() {
return {}
}
}
</script>

16
src/main.js Normal file
View File

@ -0,0 +1,16 @@
/**
* {}
* @author yutent<yutent.io@gmail.com>
* @date 2022/10/09 18:06:54
*/
import { createApp } from 'vue'
import App from './app.vue'
import store from './store'
import router from './router'
let app = createApp(App)
app.use(store).use(router).mount('.app')

30
src/router.js Normal file
View File

@ -0,0 +1,30 @@
/**
* {}
* @author yutent<yutent.io@gmail.com>
* @date 2022/10/09 18:09:20
*/
import { createRouter, createWebHistory } from 'vue-router'
const router = createRouter({
history: createWebHistory(),
routes: [
// {
// path: '/login',
// name: 'login',
// component: Login
// },
// {
// path: '/',
// name: 'main',
// component: Main
// },
// {
// path: '/room',
// name: 'room',
// component: Room
// }
]
})
export default router

15
src/store.js Normal file
View File

@ -0,0 +1,15 @@
/**
* {}
* @author yutent<yutent.io@gmail.com>
* @date 2022/10/09 18:10:08
*/
import { reactive } from 'vue'
const store = reactive({
foo: 'bar'
})
export default function (app) {
app.config.globalProperties.$store = store
}