diff --git a/assets/script/game/map/SkillBoxComp.ts b/assets/script/game/map/SkillBoxComp.ts index 16c6c0e7..7b42812a 100644 --- a/assets/script/game/map/SkillBoxComp.ts +++ b/assets/script/game/map/SkillBoxComp.ts @@ -461,8 +461,11 @@ export class SkillBoxComp extends CCComp { const remain = Math.max(0, Math.floor(total) - used); this.num_label.string = `${remain}`; } + // 有数值才显示,无数值隐藏整个节点(避免 Label 空字符串仍占位) + this.num_label.node.active = true; } else { this.num_label.string = ""; + this.num_label.node.active = false; } }