适配fix

This commit is contained in:
2025-10-13 17:40:11 +08:00
parent 104e7f566c
commit 0f6a9fcc47
3 changed files with 41 additions and 35 deletions
@@ -137,17 +137,20 @@ export class DialogBubble extends Component {
//const bgHeight = actualHeight + 17;
this.bg.setContentSize(new Size(actualSize.x + 40, actualSize.y + 30));
this.uiTransform.setContentSize(
new Size(actualSize.x + 40, actualSize.y + 30)
new Size(
actualSize.x + 40,
actualSize.y + 30 > 110 ? actualSize.y + 30 : 110
)
);
// 回调通知实际高度
if (callback) {
callback(actualSize.y);
callback(actualSize.y > 110 ? actualSize.y : 110);
}
}, 0);
// 返回预估的背景高度(用于同步计算)
const estimatedHeight = Math.max(lines.length * 35 + 20, 60); // 最小高度60
const estimatedHeight = Math.max(lines.length * 35 + 20, 110); // 最小高度60
return estimatedHeight;
}