1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-04-05 11:18:42 +08:00

Merge 120735fb39074918abce07111fd3e8be9b08cfb3 into 6858a9ad67483025f6a9432a926beb9327037be3

This commit is contained in:
ZRQ30 2024-11-28 00:29:09 +00:00 committed by GitHub
commit eb9d13ece6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -61,6 +61,16 @@ export default {
top = maxDragDomTop
}
// 当前元素宽度大于浏览器窗口宽度时,则将其向左偏移左侧可拖拽长度
if (maxDragDomLeft < 0) {
left = -minDragDomLeft
}
// 当前元素高度大于浏览器窗口高度时,则将其向上偏移顶侧可拖拽长度
if (maxDragDomTop < 0) {
top = -minDragDomTop
}
// 移动当前元素
dragDom.style.cssText += `;left:${left + styL}px;top:${top + styT}px;`