From d9e838dae998da604466060a13079593c8f804a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Acid=20Chicken=20=28=E7=A1=AB=E9=85=B8=E9=B6=8F=29?= Date: Thu, 13 Apr 2023 12:47:28 +0900 Subject: [PATCH] style: linebreak --- packages/frontend/src/components/global/MkTime.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/frontend/src/components/global/MkTime.vue b/packages/frontend/src/components/global/MkTime.vue index 43665780f1..96a80c973a 100644 --- a/packages/frontend/src/components/global/MkTime.vue +++ b/packages/frontend/src/components/global/MkTime.vue @@ -11,6 +11,7 @@ import { onUnmounted } from 'vue'; import { i18n } from '@/i18n'; import { dateTimeFormat } from '@/scripts/intl-const'; + const props = withDefaults(defineProps<{ time: Date | string | number | null; origin?: Date | null; @@ -50,6 +51,7 @@ function tick() { now = props.origin ?? (new Date()).getTime(); const ago = (now - _time) / 1000/*ms*/; const next = ago < 60 ? 10000 : ago < 3600 ? 60000 : 180000; + tickId = window.setTimeout(tick, next); }