From 3bda7753057325dd036227dc821c9f1627cbfe52 Mon Sep 17 00:00:00 2001 From: jiannibang <271381693@qq.com> Date: Tue, 13 Dec 2022 15:57:18 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=A6=96=E9=A1=B5=E7=BE=8E=E9=A3=9F?= =?UTF-8?q?=E3=80=81=E6=8E=A8=E8=8D=90=E8=BD=AE=E6=92=AD=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/ScrollView/ScrollView.vue | 2 -- .../CarouselWithIntro/CarouselWithIntro.vue | 6 +----- src/components/PublicComponent/Tabs.vue | 4 ++-- src/composables/useTime.js | 6 +++++- src/views/Guide/Guide.vue | 8 +++----- src/views/Index/Index.vue | 12 +++++++----- 6 files changed, 18 insertions(+), 20 deletions(-) diff --git a/src/base/ScrollView/ScrollView.vue b/src/base/ScrollView/ScrollView.vue index 25f06a0..4a773be 100644 --- a/src/base/ScrollView/ScrollView.vue +++ b/src/base/ScrollView/ScrollView.vue @@ -49,8 +49,6 @@ const scrollDOMRef = ref(null) const store = useStore() const languageRef = computed(() => store.language) -const emits = defineEmits(['scroll']) - function _initScroll() { if (!scrollDOMRef.value) { return diff --git a/src/components/CarouselWithIntro/CarouselWithIntro.vue b/src/components/CarouselWithIntro/CarouselWithIntro.vue index 19096ac..8b37f86 100644 --- a/src/components/CarouselWithIntro/CarouselWithIntro.vue +++ b/src/components/CarouselWithIntro/CarouselWithIntro.vue @@ -24,7 +24,7 @@ \ No newline at end of file + diff --git a/src/composables/useTime.js b/src/composables/useTime.js index 118ad40..dbbb77a 100644 --- a/src/composables/useTime.js +++ b/src/composables/useTime.js @@ -7,6 +7,8 @@ export const useTime = () => { const currentTime = computed(() => { return `${date.value.getHours().toString().padStart(2, '0')}:${date.value.getMinutes().toString().padStart(2, '0')}` }) + const currentHour = computed(() => date.value.getHours()) + const currentTimeMinute = computed(() => date.value.getMinutes()) const getDate = () => { timer.value = setInterval(() => { date.value = new Date() @@ -17,6 +19,8 @@ export const useTime = () => { onBeforeUnmount(() => clearInterval(timer.value)) return { - currentTime + currentTime, + currentHour, + currentTimeMinute } } diff --git a/src/views/Guide/Guide.vue b/src/views/Guide/Guide.vue index 29ee8a3..6607522 100644 --- a/src/views/Guide/Guide.vue +++ b/src/views/Guide/Guide.vue @@ -64,10 +64,10 @@