Преглед на файлове

DatePicker: fix prevent clear value when readonly is true, fixed #1238 (#1326)

cinwell.li преди 8 години
родител
ревизия
066eaf123e
променени са 1 файла, в които са добавени 2 реда и са изтрити 0 реда
  1. 2 0
      packages/date-picker/src/picker.vue

+ 2 - 0
packages/date-picker/src/picker.vue

@@ -328,12 +328,14 @@ export default {
 
   methods: {
     handleMouseEnterIcon() {
+      if (this.readonly || this.disabled) return;
       if (!this.valueIsEmpty) {
         this.showClose = true;
       }
     },
 
     handleClickIcon() {
+      if (this.readonly || this.disabled) return;
       if (this.valueIsEmpty) {
         this.pickerVisible = !this.pickerVisible;
       } else {