es7之修饰器什么是修饰器可以用在哪不能用在哪第三方库用vuepress 搭个博客试试水
什么是修饰器修饰器其实就是一个普通的函数,用来修饰类以及类的方法。比如:@testclass DecoratorTest {}function test(target) { target.testable = true;}target 参数就是它修饰的类 这就表示给DecoratorTest这个类加上了一个静态属性 testable,等价于:class De...