Browse Source

时间首位为0则去掉

liucf 5 năm trước cách đây
mục cha
commit
312803e9d9
1 tập tin đã thay đổi với 6 bổ sung1 xóa
  1. 6 1
      src/common/PickTime.vue

+ 6 - 1
src/common/PickTime.vue

@@ -25,7 +25,12 @@
         $(".foot").css({'position':'fixed'})
       },
       getTimeVal(value){//确定
-        this.val = value;
+        if(value.charAt(0) == 0){
+          this.val = value.substr(1);
+        }else{
+          this.val = value;
+        }
+        
         this.showTime = false;
         const newData = Object.assign({},this.item,{value:this.val,valueP:this.val});
         this.$emit("updata",newData);