aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/router
diff options
context:
space:
mode:
authorHsiangNianian <i@jyunko.cn>2024-09-07 15:17:33 +0800
committerHsiangNianian <i@jyunko.cn>2024-09-07 15:17:33 +0800
commitad4bbef65b1621a8f5ef609b459fb75084b909ac (patch)
tree909bbf4d3ec3d349cebb995c0e73f4ab72efc878 /src/router
parent1cfb957cdf5fd1c91929beca23ee1417bc3ae6ee (diff)
downloadHydroRollSite-ad4bbef65b1621a8f5ef609b459fb75084b909ac.tar.gz
HydroRollSite-ad4bbef65b1621a8f5ef609b459fb75084b909ac.zip
chore: move site dir
Diffstat (limited to 'src/router')
-rw-r--r--src/router/index.ts21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/router/index.ts b/src/router/index.ts
new file mode 100644
index 0000000..38c65fd
--- /dev/null
+++ b/src/router/index.ts
@@ -0,0 +1,21 @@
+// Composables
+import { createRouter, createWebHistory } from 'vue-router'
+
+const routes = [
+ {
+ path: '/',
+ component: () => import('@/views/index/index.vue'),
+ },
+ {
+ path: '/:path(.*)',
+ name: '404',
+ component: () => import('@/views/404.vue'),
+ }
+]
+
+const router = createRouter({
+ history: createWebHistory(process.env.BASE_URL),
+ routes,
+})
+
+export default router