typescript中怎么给属性设置get set

按照官方文档操作提示 【不能向多个同名的 get/set 访问器应用修饰器】

1赞

get width和set width只需要一个@property。把set width上面的去掉就行了。

1赞

多谢指点