From 20438d2011e179a0477941bb5d3e9bb284b8d94a Mon Sep 17 00:00:00 2001 From: guy Date: Mon, 20 Sep 2021 14:11:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=E8=87=AA=E5=8A=A8watch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/4.widget.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/4.widget.js b/src/core/4.widget.js index 318c48daf..3c76213ab 100644 --- a/src/core/4.widget.js +++ b/src/core/4.widget.js @@ -200,9 +200,12 @@ }, __watch: function (getter, handler, options) { + var self = this; if (_global.Fix) { this._watchers = this._watchers || []; - var watcher = new Fix.Watcher(null, BI.bind(getter, this), (handler && BI.bind(handler, this)) || BI.emptyFn, options); + var watcher = new Fix.Watcher(null, BI.bind(getter, this), (handler && function () { + handler.call(self, self); + }) || BI.emptyFn, options); this._watchers.push(watcher); return watcher.value; } else {