我基本上有一个对象:
var foo = function() {
this.setting = false;
this.refresh = function() { ... };
}
let a = new foo();
a.setting = true; // a.refresh() is triggered
Run Code Online (Sandbox Code Playgroud)
我需要随时.setting写入触发刷新.我觉得它与它有关bind,但我无法理解它.