Bläddra i källkod

首页基本完成

xsh 3 år sedan
förälder
incheckning
4e09eccafe
1 ändrade filer med 9 tillägg och 0 borttagningar
  1. 9 0
      src/views/MainLayout.vue

+ 9 - 0
src/views/MainLayout.vue

@@ -62,6 +62,15 @@ export default {
         if (strDate >= 0 && strDate <= 9) {
           strDate = "0" + strDate;
         }
+        if(hour >=1&& hour <= 9) {
+          hour = "0" + hour;
+        }
+        if(minutes >=1&& minutes <= 9) {
+          minutes = "0" + minutes;
+        }
+        if(seconds >=1&& seconds <= 9) {
+          seconds = "0" + seconds;
+        }
         _this.currentTime = year + '-' + month + '-' + strDate+"  "+hour+":" +minutes+":" +seconds;
       }, 1000)
     },