1
0
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:
ruanyf 2018-06-21 16:40:25 +08:00
parent 06fac98bb1
commit 19e1974afe

View File

@ -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); // 拷贝原型属性
} }