适配fix
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user