|
|
@@ -14,21 +14,6 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
showTime: true,
|
|
|
height: '60px',
|
|
|
})
|
|
|
-
|
|
|
-const timer: any = ref('')
|
|
|
-const time: any = ref('')
|
|
|
-
|
|
|
-onMounted(() => {
|
|
|
- if (props.showTime) {
|
|
|
- time.value = dayjs().format('YYYY-MM-DD HH:mm:ss')
|
|
|
- timer.value = setInterval(() => {
|
|
|
- time.value = dayjs().format('YYYY-MM-DD HH:mm:ss')
|
|
|
- }, 1000)
|
|
|
- }
|
|
|
-})
|
|
|
-onDeactivated(() => {
|
|
|
- timer.value && clearInterval(timer.value)
|
|
|
-})
|
|
|
</script>
|
|
|
<template>
|
|
|
<div
|
|
|
@@ -44,8 +29,7 @@ onDeactivated(() => {
|
|
|
</span>
|
|
|
<div
|
|
|
v-if="showTime"
|
|
|
- class="absolute right-[20px] top-[0] w-[100] h-full flex items-center text-[20px]"
|
|
|
- style="color: #fff"
|
|
|
+ class="absolute right-[20px] top-[0] w-[100] h-full flex items-center text-[20px] color-white"
|
|
|
>
|
|
|
<fs-timer></fs-timer>
|
|
|
</div>
|