修改时钟显示

This commit is contained in:
ZtRXR 2023-09-10 00:16:53 +08:00
parent ee091597b4
commit 89433705c5

View File

@ -19,12 +19,12 @@ onBeforeUnmount(()=>{
<Title>大屏时钟</Title>
<client-only>
<div>
<el-text>{{showTime.getHours()%12}}</el-text>
<el-text style="font-size: xxx-large" type="primary">{{(showTime.getHours()/12>1?"PM":"AM")}}</el-text>
<el-text>{{(showTime.getHours()%12)/10<1?`0${showTime.getHours()%12}`:showTime.getHours()%12}}</el-text>
<el-text style="font-size: 5vw" type="primary">{{(showTime.getHours()/12>1?"PM":"AM")}}</el-text>
<el-text>:</el-text>
<el-text>{{showTime.getMinutes()}}</el-text>
<el-text>{{(showTime.getMinutes())/10<1?`0${showTime.getMinutes()}`:showTime.getMinutes()}}</el-text>
<el-text style="font-size: 5vw">:</el-text>
<el-text style="font-size: 5vw">{{showTime.getSeconds()}}</el-text>
<el-text style="font-size: 5vw">{{(showTime.getSeconds())/10<1?`0${showTime.getSeconds()}`:showTime.getSeconds()}}</el-text>
</div>
</client-only>
</template>