mirror of https://github.com/ElemeFE/element
DateTimePicker: fix time-spinner not scroll to right position
parent
31cb7d3036
commit
744bad1f96
|
@ -231,7 +231,7 @@
|
|||
},
|
||||
|
||||
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);
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in New Issue