fix: 修复 el-scrollbar api 变动导致的获取滚动可视区宽度失败问题

This commit is contained in:
pany 2022-11-21 10:54:29 +08:00
parent 5a76ec4df3
commit c06d65ff00

View File

@ -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
// //