mirror of
https://gitee.com/layui/layui.git
synced 2025-11-24 16:43:14 +08:00
fix(layer): 修复 layer.tips 在触发元素宽度较小时的定位 (#2871)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user