mirror of
https://github.com/ElemeFE/element.git
synced 2025-12-16 11:44:01 +08:00
DateTimePicker: fix time-spinner not scroll to right position
This commit is contained in:
@@ -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);
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user