1,事件驱动模型 参考资料: https://www.cnblogs.com/tiancai/p/9003031.html 2,观察者模式 参考资料:https://www.runoob.com/design-pattern/observer-pattern.html