Skip to content

Commit

Permalink
fix: 🐛 修复 offset 属性传入数组时的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
RYGRIT committed Sep 24, 2024
1 parent ef7416e commit 6b4c1b1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export function usePopover() {
let offsetY = 0
if (Array.isArray(offset)) {
offsetX = (verticalX - 17 > 0 ? 0 : verticalX - 25) + offset[0]
offsetY = (horizontalY - 17 > 0 ? 0 : horizontalY - 25) + offset[1]
offsetY = (horizontalY - 17 > 0 ? 0 : horizontalY - 25) + (offset[1] ? offset[1] : offset[0])
} else if (isObj(offset)) {
offsetX = (verticalX - 17 > 0 ? 0 : verticalX - 25) + offset.x
offsetY = (horizontalY - 17 > 0 ? 0 : horizontalY - 25) + offset.y
Expand Down

0 comments on commit 6b4c1b1

Please sign in to comment.