const {ccclass, property} = cc._decorator; @ccclass export default class JuQingTipView extends cc.Component { @property(cc.Label) contentStr: cc.Label = null; // LIFE-CYCLE CALLBACKS: // onLoad () {} start () { } initView(str){ this.contentStr.string = str } onBtnClose(){ this.node.removeFromParent() } // update (dt) {} }