DateTimePicker: fix time-spinner not scroll to right position

pull/16867/head
jesse-li 2019-08-01 18:31:39 +08:00 committed by hetech
parent 31cb7d3036
commit 744bad1f96
1 changed files with 1 additions and 1 deletions

View File

@ -231,7 +231,7 @@
}, },
handleScroll(type) { handleScroll(type) {
const value = Math.min(Math.floor((this.$refs[type].wrap.scrollTop - (this.scrollBarHeight(type) * 0.5 - 10) / this.typeItemHeight(type) + 3) / this.typeItemHeight(type)), (type === 'hours' ? 23 : 59)); const value = Math.min(Math.round((this.$refs[type].wrap.scrollTop - (this.scrollBarHeight(type) * 0.5 - 10) / this.typeItemHeight(type) + 3) / this.typeItemHeight(type)), (type === 'hours' ? 23 : 59));
this.modifyDateField(type, value); this.modifyDateField(type, value);
}, },