ES7装饰器(Decorator)在Javascript中的使用

1. Decorator JS使用的装饰器(Decorator)很像Java的 @annotation ,其目的是可以在运行时改变类或者改变类的属性。 Decorators make it possible to annotate and modify classes and properties at design time. 要使用Decorator, 得安装Babel的 babel-plugin-transform-decorators-legacy 插件用于转译装饰...