From 9f6f58cad6b6644b7ce45a2600018e0f412fb850 Mon Sep 17 00:00:00 2001 From: zhouxhere Date: Wed, 26 Feb 2025 18:11:00 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0vueuse=EF=BC=8C?= =?UTF-8?q?=E9=9D=A2=E5=8C=85=E5=B1=91=E5=AF=BC=E8=88=AA=E6=8A=BD=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 + web/components/layout/default/breadcrumbs.vue | 22 ++++++ web/layouts/default.vue | 44 ++++------- web/nuxt.config.ts | 13 +++- web/package-lock.json | 78 +++++++++++++++++++ web/package.json | 1 + web/tailwind.config.js | 5 +- 7 files changed, 129 insertions(+), 36 deletions(-) create mode 100644 web/components/layout/default/breadcrumbs.vue diff --git a/.gitignore b/.gitignore index 4a7f73a..6facea9 100755 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,5 @@ logs .env .env.* !.env.example + +__debug_bin*.exe \ No newline at end of file diff --git a/web/components/layout/default/breadcrumbs.vue b/web/components/layout/default/breadcrumbs.vue new file mode 100644 index 0000000..267b10e --- /dev/null +++ b/web/components/layout/default/breadcrumbs.vue @@ -0,0 +1,22 @@ + diff --git a/web/layouts/default.vue b/web/layouts/default.vue index 235798e..e3f68bc 100644 --- a/web/layouts/default.vue +++ b/web/layouts/default.vue @@ -7,11 +7,10 @@ const handleMenuChange = () => { const route = useRoute(); -console.log(route); diff --git a/web/nuxt.config.ts b/web/nuxt.config.ts index 915a4dd..763dff5 100755 --- a/web/nuxt.config.ts +++ b/web/nuxt.config.ts @@ -5,6 +5,11 @@ export default defineNuxtConfig({ devServer: { port: 8888, }, + nitro: { + routeRules:{ + "/api/v1": {proxy: 'http://localhost:8080'} + } + }, app: { head: { title: "Nuxt.js TypeScript TailwindCSS", @@ -13,6 +18,10 @@ export default defineNuxtConfig({ class: 'main', } }, + components: [{ + path: '~/components', + pathPrefix: false + }], css: ["@/assets/css/main.css"], - modules: ['@nuxtjs/tailwindcss', "@nuxt/icon"], -}); + modules: ['@nuxtjs/tailwindcss', "@nuxt/icon", "@vueuse/nuxt"], +}); \ No newline at end of file diff --git a/web/package-lock.json b/web/package-lock.json index ae2373a..6e19191 100755 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -7,6 +7,7 @@ "name": "nuxt-app", "hasInstallScript": true, "dependencies": { + "@vueuse/nuxt": "^12.7.0", "nuxt": "^3.15.4", "vue": "latest", "vue-router": "latest" @@ -2787,6 +2788,12 @@ "integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==", "license": "MIT" }, + "node_modules/@types/web-bluetooth": { + "version": "0.0.20", + "resolved": "https://registry.npmmirror.com/@types/web-bluetooth/-/web-bluetooth-0.0.20.tgz", + "integrity": "sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==", + "license": "MIT" + }, "node_modules/@unhead/dom": { "version": "1.11.19", "resolved": "https://registry.npmmirror.com/@unhead/dom/-/dom-1.11.19.tgz", @@ -3174,6 +3181,77 @@ "integrity": "sha512-/hnE/qP5ZoGpol0a5mDi45bOd7t3tjYJBjsgCsivow7D48cJeV5l05RD82lPqi7gRiphZM37rnhW1l6ZoCNNnQ==", "license": "MIT" }, + "node_modules/@vueuse/core": { + "version": "12.7.0", + "resolved": "https://registry.npmmirror.com/@vueuse/core/-/core-12.7.0.tgz", + "integrity": "sha512-jtK5B7YjZXmkGNHjviyGO4s3ZtEhbzSgrbX+s5o+Lr8i2nYqNyHuPVOeTdM1/hZ5Tkxg/KktAuAVDDiHMraMVA==", + "license": "MIT", + "dependencies": { + "@types/web-bluetooth": "^0.0.20", + "@vueuse/metadata": "12.7.0", + "@vueuse/shared": "12.7.0", + "vue": "^3.5.13" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@vueuse/metadata": { + "version": "12.7.0", + "resolved": "https://registry.npmmirror.com/@vueuse/metadata/-/metadata-12.7.0.tgz", + "integrity": "sha512-4VvTH9mrjXqFN5LYa5YfqHVRI6j7R00Vy4995Rw7PQxyCL3z0Lli86iN4UemWqixxEvYfRjG+hF9wL8oLOn+3g==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@vueuse/nuxt": { + "version": "12.7.0", + "resolved": "https://registry.npmmirror.com/@vueuse/nuxt/-/nuxt-12.7.0.tgz", + "integrity": "sha512-JG1yjJifcIZkFr+X1VmfNsdNZyHia/wXcpUHqVI2gwax5+bgmUlybqh9nStNGbX9NLUuPvPNNq043es5DlSJKg==", + "license": "MIT", + "dependencies": { + "@nuxt/kit": "^3.15.4", + "@vueuse/core": "12.7.0", + "@vueuse/metadata": "12.7.0", + "local-pkg": "^1.0.0", + "vue": "^3.5.13" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "nuxt": "^3.0.0" + } + }, + "node_modules/@vueuse/nuxt/node_modules/local-pkg": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/local-pkg/-/local-pkg-1.0.0.tgz", + "integrity": "sha512-bbgPw/wmroJsil/GgL4qjDzs5YLTBMQ99weRsok1XCDccQeehbHA/I1oRvk2NPtr7KGZgT/Y5tPRnAtMqeG2Kg==", + "license": "MIT", + "dependencies": { + "mlly": "^1.7.3", + "pkg-types": "^1.3.0" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@vueuse/shared": { + "version": "12.7.0", + "resolved": "https://registry.npmmirror.com/@vueuse/shared/-/shared-12.7.0.tgz", + "integrity": "sha512-coLlUw2HHKsm7rPN6WqHJQr18WymN4wkA/3ThFaJ4v4gWGWAQQGK+MJxLuJTBs4mojQiazlVWAKNJNpUWGRkNw==", + "license": "MIT", + "dependencies": { + "vue": "^3.5.13" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, "node_modules/abbrev": { "version": "3.0.0", "resolved": "https://registry.npmmirror.com/abbrev/-/abbrev-3.0.0.tgz", diff --git a/web/package.json b/web/package.json index 725386c..104faab 100755 --- a/web/package.json +++ b/web/package.json @@ -10,6 +10,7 @@ "postinstall": "nuxt prepare" }, "dependencies": { + "@vueuse/nuxt": "^12.7.0", "nuxt": "^3.15.4", "vue": "latest", "vue-router": "latest" diff --git a/web/tailwind.config.js b/web/tailwind.config.js index de78717..fb8ae0b 100644 --- a/web/tailwind.config.js +++ b/web/tailwind.config.js @@ -1,4 +1,4 @@ -import daisyui from 'daisyui' +import daisyui from "daisyui"; /** @type {import('tailwindcss').Config} */ export default { @@ -14,5 +14,4 @@ export default { extend: {}, }, plugins: [daisyui], -} - +};