소스 검색

首页基本完成

xsh 3 년 전
부모
커밋
4e09eccafe
1개의 변경된 파일9개의 추가작업 그리고 0개의 파일을 삭제
  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)
     },