mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-01-24 12:45:18 +08:00
fix: sonar code smell
This commit is contained in:
parent
d6ef32aa68
commit
c3c5c0942e
@ -325,12 +325,12 @@ export default {
|
||||
if (this.virtualScroll) {
|
||||
if (index !== null) {
|
||||
this.pendingWrappedOption = this.flattenedOptions[index]
|
||||
const itemSize = this.itemSize
|
||||
const offsetTop = itemSize * index
|
||||
const size = this.itemSize
|
||||
const offsetTop = size * index
|
||||
this.updateTrackingRectTop({
|
||||
offsetTop
|
||||
})
|
||||
doScroll && this.$refs.scrollbar.scrollToElement({}, () => offsetTop, () => itemSize)
|
||||
doScroll && this.$refs.scrollbar.scrollToElement({}, () => offsetTop, () => size)
|
||||
}
|
||||
} else {
|
||||
this.pendingWrappedOption = this.flattenedOptions[index]
|
||||
|
Loading…
Reference in New Issue
Block a user