diff --git a/lua/app/ui/tips/desc_tips.lua b/lua/app/ui/tips/desc_tips.lua index f0143d00..e78f4d48 100644 --- a/lua/app/ui/tips/desc_tips.lua +++ b/lua/app/ui/tips/desc_tips.lua @@ -36,7 +36,11 @@ function DescTips:onRefresh() -- 这里原来是用preferredHeight,但是在中英文混合的时候这个值可能不准,只有改用renderedHeight -- renderedHeight必须要先调用下ForceMeshUpdate强制刷新才有效 self.descTx:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_TEXT_MESH_PRO):ForceMeshUpdate() - self.bg:setSizeDeltaY(self.descTx:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_TEXT_MESH_PRO).renderedHeight + 18) + local height = self.descTx:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_TEXT_MESH_PRO).renderedHeight + 18 + if height < 130 then + height = 130 + end + self.bg:setSizeDeltaY(height) if self.tarCornerScreenPos then self:locate(self.location, self.originSizeDelta, self.bg, self.tarCornerScreenPos) end