From 90c29c141c841c8d359bca7bc88602376336c637 Mon Sep 17 00:00:00 2001 From: "DESKTOP-FUDKNA8\\znjsz" Date: Tue, 23 Jan 2024 14:45:26 +0800 Subject: [PATCH] solve fullscreen issue --- package-lock.json | 14 ++++++ package.json | 1 + src/MainPage.vue | 6 +-- src/components/SettingDialog.vue | 28 ++++++++--- src/components/Tools.vue | 25 ++++++---- src/pages/AnnouncementPage.vue | 4 +- src/store/settings.js | 85 +++++++++++++++++++------------- 7 files changed, 108 insertions(+), 55 deletions(-) diff --git a/package-lock.json b/package-lock.json index f8973ad..b71121d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,6 +11,7 @@ "echarts": "^5.4.3", "element-plus": "^2.4.4", "pinia": "^2.1.7", + "screenfull": "^6.0.2", "vue": "^3.3.11", "vue3-marquee": "^4.1.0" }, @@ -1123,6 +1124,14 @@ "fsevents": "~2.3.2" } }, + "node_modules/screenfull": { + "version": "6.0.2", + "resolved": "https://registry.npmmirror.com/screenfull/-/screenfull-6.0.2.tgz", + "integrity": "sha512-AQdy8s4WhNvUZ6P8F6PB21tSPIYKniic+Ogx0AacBMjKP1GUHN2E9URxQHtCusiwxudnCKkdy4GrHXPPJSkCCw==", + "engines": { + "node": "^14.13.1 || >=16.0.0" + } + }, "node_modules/source-map-js": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", @@ -1888,6 +1897,11 @@ "fsevents": "~2.3.2" } }, + "screenfull": { + "version": "6.0.2", + "resolved": "https://registry.npmmirror.com/screenfull/-/screenfull-6.0.2.tgz", + "integrity": "sha512-AQdy8s4WhNvUZ6P8F6PB21tSPIYKniic+Ogx0AacBMjKP1GUHN2E9URxQHtCusiwxudnCKkdy4GrHXPPJSkCCw==" + }, "source-map-js": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", diff --git a/package.json b/package.json index 65f8f14..496eaa6 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "echarts": "^5.4.3", "element-plus": "^2.4.4", "pinia": "^2.1.7", + "screenfull": "^6.0.2", "vue": "^3.3.11", "vue3-marquee": "^4.1.0" }, diff --git a/src/MainPage.vue b/src/MainPage.vue index a500391..abb29de 100644 --- a/src/MainPage.vue +++ b/src/MainPage.vue @@ -26,7 +26,7 @@ watch(() => settings.carousel, val => { if (val) { timer.value = setInterval(() => { handlePageChange(pages[(pages.indexOf(currentPage.value) + 1) % pages.length]) - }, settings.carouselTime); + }, settings.carouselTime * 1000); return; } clearInterval(timer.value); @@ -38,7 +38,7 @@ watch(() => settings.carouselTime, val => { if (timer.value) clearInterval(timer.value); timer.value = setInterval(() => { handlePageChange(pages[(pages.indexOf(currentPage.value) + 1) % pages.length]) - }, val); + }, val * 1000); } }) @@ -62,7 +62,7 @@ const pathMap = {