We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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构造函数那段说,不用class是方便Vue按功能分散到多个模块对prototype进行扩展,而class难以实现,这里不太明白。class应该只是语法糖,对class的prototype也是可以扩展的,而且效果一样。不明白有何区别,还请老师指点
The text was updated successfully, but these errors were encountered:
class 是语法糖没错,但是通常你去用 class 的语法去实现一个类的时候是在一个文件中定义的吧,我很少见到 class 和 prototype 混用的情况。
Sorry, something went wrong.
也就是说从语法形式上来说,使用Function更加符合?
为了之后在各个文件加载Vue.prototype.*属性 不然class 和prototype混用 很尴尬
No branches or pull requests
在Vue构造函数那段说,不用class是方便Vue按功能分散到多个模块对prototype进行扩展,而class难以实现,这里不太明白。class应该只是语法糖,对class的prototype也是可以扩展的,而且效果一样。不明白有何区别,还请老师指点
The text was updated successfully, but these errors were encountered: