From db3872cc3a267d7c53ac569440aabddf3c99b8dc Mon Sep 17 00:00:00 2001 From: 05412 <2738076308@qq.com> Date: Fri, 2 Aug 2024 16:03:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=95=E5=85=A5ky?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 12 ++++++++ package.json | 1 + src/components/views/HomeView.vue | 46 ++++++++++++++++++---------- src/components/views/ServiceView.vue | 17 +++++----- src/script/functions.ts | 10 ++++-- 5 files changed, 59 insertions(+), 27 deletions(-) diff --git a/package-lock.json b/package-lock.json index 67e8334..c47a8f0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,6 +8,7 @@ "name": "surl-front", "version": "0.0.0", "dependencies": { + "ky": "^1.5.0", "pinia": "^2.2.0", "vite-plugin-vuetify": "^2.0.3", "vue": "^3.4.31", @@ -890,6 +891,17 @@ "he": "bin/he" } }, + "node_modules/ky": { + "version": "1.5.0", + "resolved": "https://registry.npmmirror.com/ky/-/ky-1.5.0.tgz", + "integrity": "sha512-bkQo+UqryW6Zmo/DsixYZE4Z9t2mzvNMhceyIhuMuInb3knm5Q+GNGMKveydJAj+Z6piN1SwI6eR/V0G+Z0BtA==", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sindresorhus/ky?sponsor=1" + } + }, "node_modules/magic-string": { "version": "0.30.10", "resolved": "https://registry.npmmirror.com/magic-string/-/magic-string-0.30.10.tgz", diff --git a/package.json b/package.json index 0eb9711..8e46510 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "preview": "vite preview" }, "dependencies": { + "ky": "^1.5.0", "pinia": "^2.2.0", "vite-plugin-vuetify": "^2.0.3", "vue": "^3.4.31", diff --git a/src/components/views/HomeView.vue b/src/components/views/HomeView.vue index db196f0..4e8fd6e 100644 --- a/src/components/views/HomeView.vue +++ b/src/components/views/HomeView.vue @@ -54,12 +54,11 @@ function toogleLocale() { localStorage.setItem('locale', current.value) } -function toggleTheme () { +function toggleTheme() { const currentTheme = theme.global.current.value.dark ? 'light' : 'dark' theme.global.name.value = currentTheme localStorage.setItem('theme', currentTheme) } -