diff --git a/lua/app/ui/shop/cell/gem_cell.lua b/lua/app/ui/shop/cell/gem_cell.lua index c7e30afb..82b136a2 100644 --- a/lua/app/ui/shop/cell/gem_cell.lua +++ b/lua/app/ui/shop/cell/gem_cell.lua @@ -62,6 +62,14 @@ function GemCell:refresh(id, cfgInfo) -- GFunc.centerImgAndTx(self.doubleImg, self.doubleText, 5) self.doubleOriginText:setText(reward.num) self.doubleOriginLine:setVisible(true) + + self.doubleDesc:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_TEXT_MESH_PRO):ForceMeshUpdate() + local txW = self.doubleDesc:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_TEXT_MESH_PRO).renderedWidth + local setWidth = txW + 30 + local curWidth = self.doubleNode:getSizeDeltaX() + if setWidth > curWidth then + self.doubleNode:setSizeDeltaX(setWidth) + end else self.doubleNode:setVisible(false) self.doubleOriginLine:setVisible(false)