Explorar el Código

调整订单界面日期取消选择bug

fenghaifu hace 2 años
padre
commit
39c6ef3f82
Se han modificado 2 ficheros con 7 adiciones y 2 borrados
  1. BIN
      dist.zip
  2. 7 2
      src/views/order/orderList.vue

BIN
dist.zip


+ 7 - 2
src/views/order/orderList.vue

@@ -306,8 +306,13 @@ export default {
     // 时间发生变化的回调,发生在用户选择时间时
     dateRangeSelectChange(value) {
       this.dateRange = value;
-      this.queryParam.dateStar = value[0].format('YYYY-MM-DD');
-      this.queryParam.dateEnd  = value[1].format('YYYY-MM-DD');
+      if (value.length == 0){
+        this.queryParam.dateStar = "";
+        this.queryParam.dateEnd = "";
+      }else{
+        this.queryParam.dateStar = value[0].format('YYYY-MM-DD');
+        this.queryParam.dateEnd  = value[1].format('YYYY-MM-DD');
+      }
     },
   },
   computed: {},