mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 15:52:40 +08:00
fix bug (#4559)
1. fix button interactable no effect in runtime 2. fix label initial string length to 0 without rendering
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -178,8 +178,8 @@ export class LabelComponent extends UIRenderComponent {
|
||||
}
|
||||
|
||||
this._string = value;
|
||||
this.updateRenderData();
|
||||
this._checkStringEmpty();
|
||||
this.updateRenderData();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user