diff --git a/.prettierrc.js b/.prettierrc.js
index 50cf6752..4a144326 100644
--- a/.prettierrc.js
+++ b/.prettierrc.js
@@ -1,7 +1,7 @@
module.exports = {
- trailingComma: "none",
+ trailingComma: 'none',
tabWidth: 2,
singleQuote: true,
printWidth: 120,
- endOfLine: "auto",
+ endOfLine: 'auto'
};
diff --git a/package.json b/package.json
index b88fd594..b6f60efa 100644
--- a/package.json
+++ b/package.json
@@ -11,7 +11,8 @@
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-vue": "^7.17.0",
"prettier": "^2.3.2",
- "vue": "^3.2.6"
+ "vue": "^3.2.6",
+ "vue-router": "^4.0.11"
},
"devDependencies": {
"@vitejs/plugin-vue": "^1.6.0",
diff --git a/postcss.config.js b/postcss.config.js
index 33ad091d..5cbc2c7d 100644
--- a/postcss.config.js
+++ b/postcss.config.js
@@ -1,6 +1,6 @@
module.exports = {
plugins: {
tailwindcss: {},
- autoprefixer: {},
- },
-}
+ autoprefixer: {}
+ }
+};
diff --git a/src/App.vue b/src/App.vue
index df4e2d76..1dad1440 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -1,12 +1,11 @@
-
-
+
diff --git a/src/env.d.ts b/src/env.d.ts
index d27eb5a3..a735ff23 100644
--- a/src/env.d.ts
+++ b/src/env.d.ts
@@ -1,8 +1,8 @@
///
declare module '*.vue' {
- import { DefineComponent } from 'vue'
+ import { DefineComponent } from 'vue';
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
- const component: DefineComponent<{}, {}, any>
- export default component
+ const component: DefineComponent<{}, {}, any>;
+ export default component;
}
diff --git a/src/router/index.ts b/src/router/index.ts
new file mode 100644
index 00000000..7861cd5c
--- /dev/null
+++ b/src/router/index.ts
@@ -0,0 +1,15 @@
+import { createRouter, createWebHistory } from 'vue-router';
+import Home from '@/component/HelloWorld.vue';
+const routes = [
+ {
+ path: '/',
+ name: 'Home',
+ component: Home
+ }
+];
+
+const router = createRouter({
+ history: createWebHistory(),
+ routes
+});
+export default router;
diff --git a/vite.config.ts b/vite.config.ts
index 315212d6..0a4f24eb 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -1,7 +1,6 @@
-import { defineConfig } from 'vite'
-import vue from '@vitejs/plugin-vue'
+import { defineConfig } from 'vite';
+import vue from '@vitejs/plugin-vue';
-// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()]
-})
+});
diff --git a/yarn.lock b/yarn.lock
index cb214410..dbddee2e 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -231,6 +231,11 @@
"@vue/compiler-dom" "3.2.6"
"@vue/shared" "3.2.6"
+"@vue/devtools-api@^6.0.0-beta.14":
+ version "6.0.0-beta.15"
+ resolved "https://registry.yarnpkg.com/@vue/devtools-api/-/devtools-api-6.0.0-beta.15.tgz#ad7cb384e062f165bcf9c83732125bffbc2ad83d"
+ integrity sha512-quBx4Jjpexo6KDiNUGFr/zF/2A4srKM9S9v2uHgMXSU//hjgq1eGzqkIFql8T9gfX5ZaVOUzYBP3jIdIR3PKIA==
+
"@vue/reactivity@3.2.6", "@vue/reactivity@^3.2.4":
version "3.2.6"
resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.2.6.tgz#b8993fa6f48545178e588e25a9c9431a1c1b7d50"
@@ -2223,6 +2228,13 @@ vue-eslint-parser@^7.10.0:
lodash "^4.17.21"
semver "^6.3.0"
+vue-router@^4.0.11:
+ version "4.0.11"
+ resolved "https://registry.yarnpkg.com/vue-router/-/vue-router-4.0.11.tgz#cd649a0941c635281763a20965b599643ddc68ed"
+ integrity sha512-sha6I8fx9HWtvTrFZfxZkiQQBpqSeT+UCwauYjkdOQYRvwsGwimlQQE2ayqUwuuXGzquFpCPoXzYKWlzL4OuXg==
+ dependencies:
+ "@vue/devtools-api" "^6.0.0-beta.14"
+
vue-tsc@^0.2.2:
version "0.2.3"
resolved "https://registry.yarnpkg.com/vue-tsc/-/vue-tsc-0.2.3.tgz#12bf48e3c9b1e553d31aad0c641722d5d15841d8"