Ver código fonte

TimePicker:fix hour selection can't select 23 bug

QingDeng 8 anos atrás
pai
commit
5f05fd18fd
1 arquivos alterados com 1 adições e 1 exclusões
  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);
       },