代码如下:
const ll = new cc.Label();
ll.string = “”;
报错如下:
CCRenderComponent.js:145 Uncaught TypeError: Cannot read properties of null (reading '_renderFlag') at cc_Label.markForRender (CCRenderComponent.js:145:18) at cc_Label._checkStringEmpty (CCLabel.js:724:14) at cc_Label.set [as string] (CCLabel.js:220:22) at cc_ClickEvent.emit (CCComponentEventHandler.js:168:17) at Function.emitEvents (CCComponentEventHandler.js:132:23) at cc_Button._onTouchEnded (CCButton.js:716:39) at 285.proto.emit (callbacks-invoker.js:341:30) at _doDispatchEvent (CCNode.js:652:34)
是不是落了什么属性没有设置?