Browse Source

删除标题组件无用代码

tongshangming 5 months ago
parent
commit
a9e51f2eec
1 changed files with 1 additions and 17 deletions
  1. 1 17
      src/components/FsTitle.vue

+ 1 - 17
src/components/FsTitle.vue

@@ -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>