农场 nuxt3实现的大屏界面
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

39 lines
741 B

<template>
<div class="time-wrap">
<div class="date">{{ date }}</div>
<div class="time">{{ time }}</div>
</div>
</template>
<script setup>
import { ref } from 'vue';
import dayjs from '@/utils/time';
import { weeks } from "@/config/time";
const date = ref('');
const time = ref('');
setInterval(() =>{
const week = weeks[dayjs().day()];
date.value = dayjs().format('YYYY年MM月DD日 星期') + week;
time.value = dayjs().format('HH:mm:ss');
}, 1000);
</script>
<style scoped>
.time-wrap {
height: 38rem;
padding-left: 15rem;
color: #fff;
display: flex;
align-items: center;
}
.date {
font-size: 14rem;
margin-right: 14rem;
}
.time {
font-size: 25rem;
}
</style>