Template
1
0
mirror of https://github.com/un-pany/v3-admin-vite.git synced 2025-04-21 03:19:19 +08:00

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 scrollbarRefWidth = scrollbarRef.value!.wrap$!.clientWidth
const scrollbarRefWidth = scrollbarRef.value!.wrapRef!.clientWidth
/** 最后剩余可滚动的宽度 */
const lastDistance = scrollbarContentRefWidth - scrollbarRefWidth - currentScrollLeft
//