aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/views/index/Left.vue
diff options
context:
space:
mode:
author简律纯 <i@jyunko.cn>2025-01-26 23:29:23 +0800
committerGitHub <noreply@github.com>2025-01-26 23:29:23 +0800
commita97b7a38f4a652e7b24e101ef34e4f37b8c3094e (patch)
treec387ca55aa6977499b03346ab46e63a0f7c09b36 /src/views/index/Left.vue
parentd4d7fac39528b978b742420a3cb4e91cea6f5834 (diff)
parentcd8aab3a511091ce378ff7ebcaa42bf979f00882 (diff)
downloadHydroRollSite-a97b7a38f4a652e7b24e101ef34e4f37b8c3094e.tar.gz
HydroRollSite-a97b7a38f4a652e7b24e101ef34e4f37b8c3094e.zip
Merge pull request #8 from LofiSu/重构官网HEADmain
Refactor: Rewrite Site
Diffstat (limited to 'src/views/index/Left.vue')
-rw-r--r--src/views/index/Left.vue84
1 files changed, 0 insertions, 84 deletions
diff --git a/src/views/index/Left.vue b/src/views/index/Left.vue
deleted file mode 100644
index f774223..0000000
--- a/src/views/index/Left.vue
+++ /dev/null
@@ -1,84 +0,0 @@
-<script lang="ts">
-export default {
- data(){
- return{
- day:0,
- hour:0,
- min:0,
- sec:0,
- timer:0
- }
- },
- props:{
- msg:{
- type:String,
- require:true
- },
- date:{
- type:Date,
- default:new Date('2024-07-14T12:00:00Z')
- }
- },
- methods:{
- getTime(){
- this.timer=window.setTimeout(()=>{
- const date1 = new Date();
- const date2 = new Date(this.date);
- const timeDiff = Math.abs(date2.getTime() - date1.getTime());
- this.day = Math.floor(timeDiff / (1000 * 60 * 60 * 24));
- this.hour = Math.floor(timeDiff / (1000 * 60 * 60)%24);
- this.min = Math.floor((timeDiff / (1000 * 60)) % 60);
- this.sec = Math.floor((timeDiff / 1000) % 60);
- this.getTime()
- },1000)
- }
- },
- beforeMount() {
- this.getTime()
- }
-
-}
-</script>
-
-<template>
- <div class="greetings">
- <h1 class="green">{{ msg }}</h1>
- <h3>
- 距离水系公测计划:
- </h3>
- <h2>
- {{ day }} 天 {{ hour }} 时 {{ min }} 分 {{ sec }} 秒
- </h2>
- </div>
-</template>
-
-<style scoped>
-h1 {
- font-weight: 500;
- font-size: 2.6rem;
- position: relative;
- top: -10px;
-}
-
-h3 {
- font-size: 1.2rem;
-}
-
-.greetings h1,
-.greetings h2 {
- text-align: center;
-}
-.greetings h3 {
- text-align: center;
-}
-
-@media screen and (orientation:landscape) {
- .greetings h1,
- .greetings h2 {
- text-align: left;
- }
- .greetings h3 {
- text-align: left;
- }
-}
-</style>