about-Vue icon indicating copy to clipboard operation
about-Vue copied to clipboard

Object.defineProperties() get set demo有问题 辛苦验证

Open gt-leibin opened this issue 5 years ago • 1 comments

Object defineProperties

这个demo是跑不通的,陷入了死循环 参考 https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperties

gt-leibin avatar Oct 26 '19 13:10 gt-leibin

Object defineProperties

这个demo是跑不通的,陷入了死循环 参考 https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperties

是的,忘了修改,因为读取book.year时会触发Getter,然后获取继续读取book.year,再次触发Getter,便会导致溢出。 谢谢你的问题提出。

Leo-lin214 avatar Oct 28 '19 02:10 Leo-lin214