Skip to content

Commit 760c8a3

Browse files
author
Guillaume Chau
committed
fix(DynamicScroller): round height, closes #118
1 parent 6e4d357 commit 760c8a3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/components/DynamicScrollerItem.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,12 +140,13 @@ export default {
140140
this.$nextTick(() => {
141141
if (this.id === id) {
142142
const size = this.getSize()
143-
if (size.height && this.height !== size.height) {
143+
const height = Math.round(size.height)
144+
if (height && this.height !== height) {
144145
if (this.vscrollBus.$_undefinedMap[id]) {
145146
this.vscrollBus.$_undefinedHeights--
146147
this.vscrollBus.$_undefinedMap[id] = undefined
147148
}
148-
this.$set(this.vscrollData.heights, this.id, size.height)
149+
this.$set(this.vscrollData.heights, this.id, height)
149150
if (this.emitResize) this.$emit('resize', this.id)
150151
}
151152
}

0 commit comments

Comments
 (0)