@jumpchess1 写道:
var self; cc.Class({ properties: () => ({ length: 10, }), ctor: function () { self = this; ... }, testA: function () { self.length = 9; }, testB: function () { self.length = 11; }, });
是这么写么, 我想把self变成const, 但不知道怎么弄
帖子: 1
参与者: 1
@jumpchess1 写道:
var self; cc.Class({ properties: () => ({ length: 10, }), ctor: function () { self = this; ... }, testA: function () { self.length = 9; }, testB: function () { self.length = 11; }, });
是这么写么, 我想把self变成const, 但不知道怎么弄
帖子: 1
参与者: 1