Open ckinmind opened 7 years ago
@action async getData() { try { this.loading = true // 正常写法 const content = await io.getData() // this.loading = true 写在await之后runInAction之前会报错,错误是严格模式下改变observable必须 // 在action中 runInAction(() => { this.loading = false }] }) } catch (e) { } }