fix: 修复 el-scrollbar api 变动导致的获取滚动可视区宽度失败问题
This commit is contained in:
parent
5a76ec4df3
commit
c06d65ff00
@ -26,7 +26,7 @@ const scrollTo = (direction: "left" | "right") => {
|
|||||||
/** 可滚动内容的长度 */
|
/** 可滚动内容的长度 */
|
||||||
const scrollbarContentRefWidth = scrollbarContentRef.value!.clientWidth
|
const scrollbarContentRefWidth = scrollbarContentRef.value!.clientWidth
|
||||||
/** 滚动可视区宽度 */
|
/** 滚动可视区宽度 */
|
||||||
const scrollbarRefWidth = scrollbarRef.value!.wrap$!.clientWidth
|
const scrollbarRefWidth = scrollbarRef.value!.wrapRef!.clientWidth
|
||||||
/** 最后剩余可滚动的宽度 */
|
/** 最后剩余可滚动的宽度 */
|
||||||
const lastDistance = scrollbarContentRefWidth - scrollbarRefWidth - currentScrollLeft
|
const lastDistance = scrollbarContentRefWidth - scrollbarRefWidth - currentScrollLeft
|
||||||
// 没有横向滚动条,直接结束
|
// 没有横向滚动条,直接结束
|
||||||
|
Loading…
x
Reference in New Issue
Block a user