Explorar el Código

时间首位为0则去掉

liucf hace 5 años
padre
commit
312803e9d9
Se han modificado 1 ficheros con 6 adiciones y 1 borrados
  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);