diff --git a/src/App.vue b/src/App.vue index 80013a5..7cacf98 100644 --- a/src/App.vue +++ b/src/App.vue @@ -10,5 +10,4 @@ } \ No newline at end of file diff --git a/src/components/HelloWorld.vue b/src/components/HelloWorld.vue deleted file mode 100644 index 2d61249..0000000 --- a/src/components/HelloWorld.vue +++ /dev/null @@ -1,52 +0,0 @@ - - - - - diff --git a/src/components/home/topnav.vue b/src/components/home/topnav.vue new file mode 100644 index 0000000..af1bcdb --- /dev/null +++ b/src/components/home/topnav.vue @@ -0,0 +1,21 @@ + + + + + \ No newline at end of file diff --git a/src/page/home.vue b/src/page/home.vue index 35b5b07..3bbe45e 100644 --- a/src/page/home.vue +++ b/src/page/home.vue @@ -1,15 +1,36 @@ - \ No newline at end of file diff --git a/src/route/index.ts b/src/route/index.ts index 8f4e82b..4f1bb1e 100644 --- a/src/route/index.ts +++ b/src/route/index.ts @@ -15,8 +15,8 @@ for(let i in zujian){ component:zujian[i] }) } -console.log(routes1) -console.log(zujian, typeof zujian) +// console.log(routes1) +// console.log(zujian, typeof zujian) // const routes = [ // // { // // path: "/home", diff --git a/vite.config.ts b/vite.config.ts index 315212d..71c79bc 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,7 +1,17 @@ import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' +const path = require('path') +// @ts-ignore +const resolve = dir => { + return path.join(__dirname, dir); +}; // https://vitejs.dev/config/ export default defineConfig({ - plugins: [vue()] + plugins: [vue()], + resolve: { + alias: { + '@': resolve('src') + } + } }) diff --git a/yarn-error.log b/yarn-error.log index 2ee71fb..168574e 100644 --- a/yarn-error.log +++ b/yarn-error.log @@ -1,25 +1,30 @@ Arguments: - C:\Program Files\nodejs\node.exe C:\Users\Administrator\AppData\Roaming\npm\node_modules\yarn\bin\yarn.js add vue-router@4.0.0-beta + D:\Program Files\nodejs\node.exe C:\Users\37436\AppData\Roaming\npm\node_modules\yarn\bin\yarn.js add @/components PATH: - C:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn\;C:\Program ;C:\Program Files (x86)\Git\cmd;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\nodejs\;C:\Users\Administrator\AppData\Local\Programs\Python\Python37\Scripts\;C:\Users\Administrator\AppData\Local\Programs\Python\Python37\;C:\Users\Administrator\.dotnet\tools;C:\Users\Administrator\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps;C:\Users\Administrator\AppData\Roaming\npm + C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;D:\Program Files\Git\cmd;D:\Program Files\nodejs\;D:\mongodb\bin;C:\Users\37436\AppData\Local\Microsoft\WindowsApps;;D:\Program Files\JetBrains\WebStorm 2021.1.2\bin;;C:\Users\37436\AppData\Roaming\npm;D:\Users\37436\AppData\Local\Programs\Microsoft VS Code\bin Yarn version: - 1.22.11 + 1.22.10 Node version: - 14.17.5 + 14.17.0 Platform: win32 x64 Trace: - SyntaxError: C:\web\myblog\mynewblog\package.json: Unexpected token } in JSON at position 343 - at JSON.parse () - at C:\Users\Administrator\AppData\Roaming\npm\node_modules\yarn\lib\cli.js:1625:59 - at Generator.next () - at step (C:\Users\Administrator\AppData\Roaming\npm\node_modules\yarn\lib\cli.js:310:30) - at C:\Users\Administrator\AppData\Roaming\npm\node_modules\yarn\lib\cli.js:321:13 + Error: https://registry.npm.taobao.org/@%2fcomponents: Not found + at Request.params.callback [as _callback] (C:\Users\37436\AppData\Roaming\npm\node_modules\yarn\lib\cli.js:66988:18) + at Request.self.callback (C:\Users\37436\AppData\Roaming\npm\node_modules\yarn\lib\cli.js:140662:22) + at Request.emit (events.js:376:20) + at Request. (C:\Users\37436\AppData\Roaming\npm\node_modules\yarn\lib\cli.js:141634:10) + at Request.emit (events.js:376:20) + at IncomingMessage. (C:\Users\37436\AppData\Roaming\npm\node_modules\yarn\lib\cli.js:141556:12) + at Object.onceWrapper (events.js:482:28) + at IncomingMessage.emit (events.js:388:22) + at endReadableNT (internal/streams/readable.js:1336:12) + at processTicksAndRejections (internal/process/task_queues.js:82:21) npm manifest: { @@ -37,6 +42,7 @@ npm manifest: "style-loader": "^3.2.1", "vfonts": "^0.1.0", "vue": "^3.2.6", + "vue-router": "^4.0.11" }, "devDependencies": { "@vitejs/plugin-vue": "^1.6.0", @@ -328,6 +334,11 @@ Lockfile: "@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.6": version "3.2.6" resolved "https://registry.nlark.com/@vue/reactivity/download/@vue/reactivity-3.2.6.tgz?cache=0&sync_timestamp=1629824253192&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40vue%2Freactivity%2Fdownload%2F%40vue%2Freactivity-3.2.6.tgz#b8993fa6f48545178e588e25a9c9431a1c1b7d50" @@ -2636,10 +2647,12 @@ Lockfile: vscode-pug-languageservice "^0.27.8" vscode-typescript-languageservice "^0.27.8" - vue-router@4.0.0-alpha.4: - version "4.0.0-alpha.4" - resolved "https://registry.yarnpkg.com/vue-router/-/vue-router-4.0.0-alpha.4.tgz#17569b948fa0e6eb344208471ec7dea78b7db402" - integrity sha512-IRcf+im38Vja/7FMdiLhUjVRw+tzi/Larij6OYD2nn+0musntrGj/ZSAhO9ITCQgaeluKQJxUxyMvrNslds12w== + 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"