Fix #4689 - ScrollPanel: TypeError: Cannot read properties of null (reading 'scrollWidth')
parent
12333edd7c
commit
4fb793a33c
|
@ -103,6 +103,7 @@ export default {
|
|||
}
|
||||
},
|
||||
moveBar() {
|
||||
if (this.$refs.content) {
|
||||
/* horizontal scroll */
|
||||
let totalWidth = this.$refs.content.scrollWidth;
|
||||
let ownWidth = this.$refs.content.clientWidth;
|
||||
|
@ -136,6 +137,7 @@ export default {
|
|||
this.$refs.yBar.style.cssText = 'height:' + Math.max(this.scrollYRatio * 100, 10) + '%; top: calc(' + (this.$refs.content.scrollTop / totalHeight) * 100 + '% - ' + this.$refs.xBar.clientHeight + 'px);right:' + right + 'px;';
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
onYBarMouseDown(e) {
|
||||
this.isYBarClicked = true;
|
||||
|
|
Loading…
Reference in New Issue