From e2f4b40cc8f84940ac862cd96cd81e0e8156d76d Mon Sep 17 00:00:00 2001 From: Childish-Ghost Date: Tue, 15 Jul 2025 17:39:51 +0800 Subject: [PATCH] =?UTF-8?q?V0.1.2.20250715=20=E2=80=94=E2=80=94=E2=80=94?= =?UTF-8?q?=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94?= =?UTF-8?q?=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=20=E5=AF=B9?= =?UTF-8?q?=E6=8A=AC=E5=A4=B4=E5=B8=83=E5=B1=80=E7=9A=84=E4=BD=8D=E7=BD=AE?= =?UTF-8?q?=E7=A1=AE=E8=AE=A4=20=E2=80=94=E2=80=94=E2=80=94=E2=80=94?= =?UTF-8?q?=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94?= =?UTF-8?q?=E2=80=94=E2=80=94=E2=80=94=E2=80=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 2 +- src/App.vue | 7 +++++-- src/assets/main.css | 21 +++++++++++++++++++++ src/components/Home.vue | 4 ++-- src/components/NotFound.vue | 11 +++++++++++ src/{main.js => main.ts} | 2 +- src/router/router.js | 3 --- src/router/router.ts | 15 +++++++++++++++ 8 files changed, 56 insertions(+), 9 deletions(-) create mode 100644 src/components/NotFound.vue rename src/{main.js => main.ts} (80%) delete mode 100644 src/router/router.js create mode 100644 src/router/router.ts diff --git a/index.html b/index.html index b19040a..9e5fc8f 100644 --- a/index.html +++ b/index.html @@ -8,6 +8,6 @@
- + diff --git a/src/App.vue b/src/App.vue index 428e7d7..f3e4370 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,9 +1,12 @@ - \ No newline at end of file diff --git a/src/main.js b/src/main.ts similarity index 80% rename from src/main.js rename to src/main.ts index 291d2d1..df81dc8 100644 --- a/src/main.js +++ b/src/main.ts @@ -2,7 +2,7 @@ import './assets/main.css' import { createApp } from 'vue' import App from './App.vue' -import router from './router/router' +import router from './router/router.js' import axios from 'axios' createApp(App).use(router).use(axios).mount('#app') diff --git a/src/router/router.js b/src/router/router.js deleted file mode 100644 index d670b27..0000000 --- a/src/router/router.js +++ /dev/null @@ -1,3 +0,0 @@ -export default function router() { - -} \ No newline at end of file diff --git a/src/router/router.ts b/src/router/router.ts new file mode 100644 index 0000000..24c2da4 --- /dev/null +++ b/src/router/router.ts @@ -0,0 +1,15 @@ +import {createRouter, createWebHashHistory} from "vue-router"; +import Home from "@/components/Home.vue"; +import NotFound from "@/components/NotFound.vue"; + +const router = createRouter({ + history: createWebHashHistory(), + routes: [ + { + path: '/', + component: Home, + }, + ] +}) + +export default router \ No newline at end of file