在 JavaScript 中实现装饰器模式 属于「结构型模式」,是「GoF」的 23 种设计模式之一。 动态地为某个对象而非类添加额外行为。 在采用 AOP 时会较常用到。 更多 Decorator - Refactoring and Design Patterns