From 80052e6afc358ac4032be2e57e03cfa0e9d37c6c Mon Sep 17 00:00:00 2001 From: unitwk Date: Fri, 29 Dec 2023 16:29:50 +0800 Subject: [PATCH] Refactor: clock card --- frontend/src/widgets/others/ClockCard.vue | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/frontend/src/widgets/others/ClockCard.vue b/frontend/src/widgets/others/ClockCard.vue index b63d3abc..8b0c9838 100644 --- a/frontend/src/widgets/others/ClockCard.vue +++ b/frontend/src/widgets/others/ClockCard.vue @@ -14,8 +14,6 @@ const getDate = () => dayjs().format("YYYY/MM/DD dddd"); const time = ref(getTime()); const date = ref(getDate()); -const sizeTime = ref(`font-size: 60px;`); -const sizeDate = ref(`font-size: 10px;`); let timer: NodeJS.Timer | null; @@ -23,8 +21,6 @@ onMounted(() => { timer = setInterval(() => { time.value = getTime(); }, 1000); - sizeTime.value = (`font-size: ${(getCurrentInstance()?.refs.boxTime).offsetHeight * .6}px;`); - sizeDate.value = (`font-size: ${(getCurrentInstance()?.refs.boxTime).offsetHeight * .1}px;`); }); onUnmounted(() => { @@ -38,11 +34,14 @@ onUnmounted(() => {