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:
parent
5a76ec4df3
commit
c06d65ff00
@ -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
|
||||
// 没有横向滚动条,直接结束
|
||||
|
Loading…
x
Reference in New Issue
Block a user