mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-01-06 12:17:13 +08:00
fix(time-picker): scroll timer
This commit is contained in:
parent
df52cffbf3
commit
4dc6a82da5
@ -609,19 +609,19 @@ export default {
|
||||
if (this.hoursRef && this.hoursRef.contentRef) {
|
||||
const hour = this.hoursRef.contentRef.querySelector('.n-time-picker-selector-time-row__item--active')
|
||||
if (hour) {
|
||||
this.hoursRef.scrollTo(0, hour.offsetTop)
|
||||
this.hoursRef.scrollTo({ top: hour.offsetTop })
|
||||
}
|
||||
}
|
||||
if (this.minutesRef && this.minutesRef.contentRef) {
|
||||
const minute = this.minutesRef.contentRef.querySelector('.n-time-picker-selector-time-row__item--active')
|
||||
if (minute) {
|
||||
this.minutesRef.scrollTo(0, minute.offsetTop)
|
||||
this.minutesRef.scrollTo({ top: minute.offsetTop })
|
||||
}
|
||||
}
|
||||
if (this.secondsRef && this.secondsRef.contentRef) {
|
||||
const second = this.secondsRef.contentRef.querySelector('.n-time-picker-selector-time-row__item--active')
|
||||
if (second) {
|
||||
this.secondsRef.scrollTo(0, second.offsetTop)
|
||||
this.secondsRef.scrollTo({ top: second.offsetTop })
|
||||
}
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user