@chiyou/minigame-framework 1.3.8 → 1.3.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chiyou/minigame-framework",
3
- "version": "1.3.8",
3
+ "version": "1.3.9",
4
4
  "description": "基于 Cocos Creator 3.x 的小游戏开发框架,支持多平台发布",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -474,9 +474,11 @@ export class UIMgr extends BaseMgr {
474
474
  labelComponent.string = content;
475
475
  labelComponent.updateRenderData(true);
476
476
  let textWidth: number = labelComponent.node.getComponent(UITransform).contentSize.width;
477
+ let textHeight: number = labelComponent.node.getComponent(UITransform).contentSize.height;
477
478
 
478
479
  this.node_toastRoot.active = true;
479
480
  this.node_toastRoot.getComponent(UITransform).width = textWidth + 80;
481
+ this.node_toastRoot.getComponent(UITransform).height = textHeight + 40;
480
482
 
481
483
  // 设置 Toast 位置
482
484
  if (position !== undefined) {