cc.Class({ extends: cc.Component, editor: { menu: 'Launch/VersionLabel' }, onLoad () { let curVersion = G.MiddleDevice.getVersionName(); let label = this.node.getComponent(cc.Label); label.string = `${curVersion} - ${ G.RES_VERSION}`; } });