临摹微笑
通过MobX来解决MobX 是一个简单、高效的前端状态管理脚本库。 根据文档,Just do something to the state and MobX will make sure your app respects the changes。var person = mobx.observable({firstName: 'Matt',lastName: 'Ruby',age: 37,fullName: function () {this.firstName + ' ' + this.lastName;}});