在vue中使用更好的滚动,但有时会显示空白

问题描述 投票:0回答:1

我使用插件,更好地滚动,在vue中做一个滑块,但它有时会显示一个空白。我不知道为什么。任何人都可以给我一个建议吗?有一个不可避免的问题。当我第一次进入此页面时,滑块显示一个空白。

vue.js
1个回答
0
投票

使用const imgWidth = document.documentElement.clientWidth而不是const imgWidth = this。$ refs.sliderItemImg [0] .clientWidth;

© www.soinside.com 2019 - 2024. All rights reserved.