|
@@ -1,8 +1,10 @@
|
|
|
<template>
|
|
|
<div class="bg-img" id="fullScreen">
|
|
|
<div style="display: flex;justify-content: space-between">
|
|
|
- <div style="width: 330px"></div>
|
|
|
- <div style="width: 330px" class="time-style">{{nowTime}}</div>
|
|
|
+ <div></div>
|
|
|
+ <div class="time-style">
|
|
|
+ {{nowTime}}
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<fullScreen ref="fullRef" class="inline-16" domId="fullScreen" v-show="false" @backFull="backFull"></fullScreen>
|
|
|
</div>
|
|
@@ -15,28 +17,14 @@ export default {
|
|
|
components:{fullScreen},
|
|
|
data(){
|
|
|
return {
|
|
|
- currentTime:'',
|
|
|
timer: "", // 定义一个定时器
|
|
|
nowTime: ""
|
|
|
}
|
|
|
},
|
|
|
- computed: {
|
|
|
- currentTime() {
|
|
|
- // 获取当前日期和时间,并将其转换为字符串
|
|
|
- const now = new Date();
|
|
|
- // 格式化日期时间,这里是一个简单的例子,可根据需要调整格式
|
|
|
- return now.toLocaleString('default', { hour: '2-digit', minute: '2-digit', second: '2-digit' });
|
|
|
- }
|
|
|
- },
|
|
|
mounted() {
|
|
|
- this.updateTime(); // 初始化显示一次
|
|
|
- setInterval(this.updateTime, 1000); // 每秒更新一次
|
|
|
this.$refs.fullRef.enterFullscreen()
|
|
|
},
|
|
|
methods:{
|
|
|
- updateTime() {
|
|
|
- this.currentTime = new Date().toLocaleString('default', { hour: '2-digit', minute: '2-digit', second: '2-digit' });
|
|
|
- },
|
|
|
getTime() {
|
|
|
this.timer = setInterval(() => {
|
|
|
// 获取当前时间的各个部分
|
|
@@ -86,28 +74,21 @@ export default {
|
|
|
<style scoped>
|
|
|
.bg-img {
|
|
|
background: url("../../assets/icons/bgScreen.jpg") no-repeat;
|
|
|
+ min-height:810px ;
|
|
|
+ min-width: 1440px;
|
|
|
+ overflow: auto;
|
|
|
background-size: 100% 100%;
|
|
|
width: 100%;
|
|
|
height: calc(100vh - 130px);
|
|
|
}
|
|
|
-.title-style{
|
|
|
- font-family: Microsoft YaHei, Microsoft YaHei;
|
|
|
- font-weight: bold;
|
|
|
- font-size: 2.75rem;
|
|
|
- color: #E6F4FF;
|
|
|
- text-shadow: 0rem 0.125rem 0.25rem #A9D7F9;
|
|
|
- text-align: left;
|
|
|
- font-style: normal;
|
|
|
- text-transform: none;
|
|
|
- margin: 1.25rem;
|
|
|
-}
|
|
|
.time-style{
|
|
|
font-family: Microsoft YaHei, Microsoft YaHei;
|
|
|
font-weight: 400;
|
|
|
- font-size: 1.125rem;
|
|
|
+ font-size: 18px;
|
|
|
color: #E6F4FF;
|
|
|
text-align: left;
|
|
|
font-style: normal;
|
|
|
text-transform: none;
|
|
|
+ margin: 18px 20px 0 0 ;
|
|
|
}
|
|
|
</style>
|