关于装饰器property的小建议

给visible加一个参数表示this,就能用箭头函数了,看上去简洁点

@property({ visible: function () { return this.type === dirEnum.HORIZONTAL } })
// 给visible加一个this参数
@property({ visible: self => self.type === dirEnum.HORIZONTAL })

property修饰get/set,参数为什么不支持简写呢?

@property
private _target: cc.Node = null;
@property({ type: cc.Node }) // 这里不能简写
get target() { return this._target || this.node || null; }
set target(value) { this._target = value; }

@EndEvil

不写类型的话, 在inpector上就不知道显示一个什么框体了

@property(cc.Node) // 编辑器报红字
get target() { return this._target || this.node || null; }
set target(value) { this._target = value; }

不是不写类型,是这样简写编辑器会报红字

还有一个问题,麻烦看下
节点绑定了Button组件,某些情况下修改节点scale无效