We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Learn more about funding links in repositories.
Report abuse
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[vue] 说说你对proxy的理解
The text was updated successfully, but these errors were encountered:
目前只知道用来修改 属性的get set方法 vue3 来替换Object.defineProperty。一方面提高性能 另一方面可以免去给数组重写方法。
Sorry, something went wrong.
vue的数据劫持有两个缺点: 1、无法监听通过索引修改数组的值的变化 2、无法监听object也就是对象的值的变化 所以vue2.x中才会有$set属性的存在
proxy是es6中推出的新api,可以弥补以上两个缺点,所以vue3.x版本用proxy替换object.defineproperty
No branches or pull requests
[vue] 说说你对proxy的理解
The text was updated successfully, but these errors were encountered: