mirror of
https://github.com/ruanyf/es6tutorial.git
synced 2025-05-29 05:42:20 +00:00
docs: edit class-extends
This commit is contained in:
parent
06fac98bb1
commit
19e1974afe
@ -713,7 +713,7 @@ function mix(...mixins) {
|
|||||||
class Mix {}
|
class Mix {}
|
||||||
|
|
||||||
for (let mixin of mixins) {
|
for (let mixin of mixins) {
|
||||||
copyProperties(Mix, mixin); // 拷贝实例属性
|
copyProperties(Mix.prototype, new mixin()); // 拷贝实例属性
|
||||||
copyProperties(Mix.prototype, mixin.prototype); // 拷贝原型属性
|
copyProperties(Mix.prototype, mixin.prototype); // 拷贝原型属性
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user