摘要: decorator修改类 的行为 (扩展类的功能) 的函数 1.修饰类 @testable class MyClass{} function testable(target){ target.isTestable=true } console.log(MyClass.isTestable) // t 阅读全文
posted @ 2021-02-07 21:25 sunmarvell 阅读(49) 评论(0) 推荐(0) 编辑