diff --git a/cocos/3d/ui/components/button-component.ts b/cocos/3d/ui/components/button-component.ts index ea49fd2af8..9a1a6b1e8d 100644 --- a/cocos/3d/ui/components/button-component.ts +++ b/cocos/3d/ui/components/button-component.ts @@ -709,7 +709,7 @@ export class ButtonComponent extends Component { return; } - if (CC_EDITOR) { + if (CC_EDITOR || state === State.DISABLED) { renderComp.color = color; } else { this._fromColor = renderComp.color.clone(); diff --git a/cocos/3d/ui/components/label-component.ts b/cocos/3d/ui/components/label-component.ts index 28fe0a8dc6..4ed7d84fbc 100644 --- a/cocos/3d/ui/components/label-component.ts +++ b/cocos/3d/ui/components/label-component.ts @@ -178,8 +178,8 @@ export class LabelComponent extends UIRenderComponent { } this._string = value; - this.updateRenderData(); this._checkStringEmpty(); + this.updateRenderData(); } /**