mirror of
https://github.com/ruanyf/es6tutorial.git
synced 2024-04-21 12:32:22 +00:00
docs: edit class-extends
This commit is contained in:
@@ -713,7 +713,7 @@ function mix(...mixins) {
|
||||
class Mix {}
|
||||
|
||||
for (let mixin of mixins) {
|
||||
copyProperties(Mix, mixin); // 拷贝实例属性
|
||||
copyProperties(Mix.prototype, new mixin()); // 拷贝实例属性
|
||||
copyProperties(Mix.prototype, mixin.prototype); // 拷贝原型属性
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user