Преглед изворни кода

TimePicker:fix hour selection can't select 23 bug

QingDeng пре 8 година
родитељ
комит
5f05fd18fd
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      packages/date-picker/src/basic/time-spinner.vue

+ 1 - 1
packages/date-picker/src/basic/time-spinner.vue

@@ -175,7 +175,7 @@
 
       handleScroll(type) {
         const ajust = {};
-        ajust[`${type}s`] = Math.min(Math.floor((this[`${type}El`].scrollTop - 80) / 32 + 3), 59);
+        ajust[`${type}s`] = Math.min(Math.floor((this[`${type}El`].scrollTop - 80) / 32 + 3), (`${type}` === 'hour' ? 23 : 59));
         this.debounceAjustElTop(type);
         this.$emit('change', ajust);
       },