Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我知道它提供静态或“类”属性,但我想了解它是如何做到这一点的,它是创建一个新对象并将这些静态属性放在原型上吗?
Backbone.View.extend(属性,[classProperties])
使用的主干和称为的内部辅助函数inherits。您可以在此处查看带注释的源代码。它设置原型链以提供类类功能。
inherits