mirror of
https://github.com/ruanyf/es6tutorial.git
synced 2024-04-21 12:32:22 +00:00
docs(decorator): fix typo
This commit is contained in:
+1
-1
@@ -103,7 +103,7 @@ let obj = new MyClass();
|
||||
obj.foo() // 'foo'
|
||||
```
|
||||
|
||||
上面代码通过修饰器`mixins`,把`Foo`类的方法添加到了`MyClass`的实例上面。可以用`Object.assign()`模拟这个功能。
|
||||
上面代码通过修饰器`mixins`,把`Foo`对象的方法添加到了`MyClass`的实例上面。可以用`Object.assign()`模拟这个功能。
|
||||
|
||||
```javascript
|
||||
const Foo = {
|
||||
|
||||
Reference in New Issue
Block a user