Ver código fonte

时间首位为0则去掉

liucf 5 anos atrás
pai
commit
312803e9d9
1 arquivos alterados com 6 adições e 1 exclusões
  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);