From 225fee72d5d5e82f9793f21c428aa89e928724bc Mon Sep 17 00:00:00 2001 From: yutent Date: Sun, 9 Oct 2022 19:19:06 +0800 Subject: [PATCH] update --- src/app.vue | 11 +++++++++++ src/main.js | 16 ++++++++++++++++ src/router.js | 30 ++++++++++++++++++++++++++++++ src/store.js | 15 +++++++++++++++ 4 files changed, 72 insertions(+) create mode 100644 src/app.vue create mode 100644 src/main.js create mode 100644 src/router.js create mode 100644 src/store.js diff --git a/src/app.vue b/src/app.vue new file mode 100644 index 0000000..0bc67fd --- /dev/null +++ b/src/app.vue @@ -0,0 +1,11 @@ + + + diff --git a/src/main.js b/src/main.js new file mode 100644 index 0000000..ea93c01 --- /dev/null +++ b/src/main.js @@ -0,0 +1,16 @@ +/** + * {} + * @author yutent + * @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') diff --git a/src/router.js b/src/router.js new file mode 100644 index 0000000..2f021a3 --- /dev/null +++ b/src/router.js @@ -0,0 +1,30 @@ +/** + * {} + * @author yutent + * @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 diff --git a/src/store.js b/src/store.js new file mode 100644 index 0000000..23173d7 --- /dev/null +++ b/src/store.js @@ -0,0 +1,15 @@ +/** + * {} + * @author yutent + * @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 +}