fix(layer): 修复 layer.tips 在触发元素宽度较小时的定位 (#2871)

This commit is contained in:
morning-star
2025-10-20 12:17:49 +08:00
committed by GitHub
parent 09182fbe3a
commit c91f8a10d2

View File

@@ -693,7 +693,8 @@ Class.pt.tips = function(){
goal.tipLeft = goal.left + goal.width - layArea[0];
tipsG.css({right: 12, left: 'auto'});
} else {
goal.tipLeft = goal.left;
goal.tipLeft = goal.left - (goal.width * 0.75 < 21 ? 21 - goal.width * 0.5 : 0);
goal.tipLeft = Math.max(goal.tipLeft, 0);
}
};