Bläddra i källkod

DatePicker: workaround for Chromium 55 - 57

Leopoldthecoder 7 år sedan
förälder
incheckning
146e02c4a3

+ 6 - 0
packages/date-picker/src/panel/date-range.vue

@@ -482,6 +482,12 @@
         this.onPick && this.onPick(val);
         this.maxDate = val.maxDate;
         this.minDate = val.minDate;
+
+        // workaround for https://github.com/ElemeFE/element/issues/7539, should remove this block when we don't have to care about Chromium 55 - 57
+        setTimeout(() => {
+          this.maxDate = val.maxDate;
+          this.minDate = val.minDate;
+        }, 10);
         if (!close || this.showTime) return;
         this.handleConfirm();
       },

+ 3 - 3
packages/theme-chalk/src/date-picker/picker.scss

@@ -15,14 +15,14 @@
   @include m((daterange, timerange)) {
     &.el-input,
     &.el-input__inner {
-      width: 320px;
+      width: 350px;
     }
   }
 
   @include m(datetimerange) {
     &.el-input,
     &.el-input__inner {
-      width: 370px;
+      width: 400px;
     }
   }
 
@@ -42,7 +42,7 @@
     height: 100%;
     margin: 0;
     padding: 0;
-    width: 38%;
+    width: 39%;
     text-align: center;
     font-size: $--font-size-base;
     color: $--color-text-regular;

+ 1 - 1
packages/theme-chalk/src/date-picker/time-spinner.scss

@@ -3,7 +3,7 @@
 @include b(time-spinner) {
   &.has-seconds {
     .el-time-spinner__wrapper {
-      width: 33%;
+      width: 33.3%;
     }
 
     .el-time-spinner__wrapper:nth-child(2) {