From 5d2017352652348f198d2bc53685bb1c045ab0ba Mon Sep 17 00:00:00 2001 From: guy Date: Sun, 6 Mar 2022 15:04:22 +0800 Subject: [PATCH] =?UTF-8?q?feature:=20items=E5=92=8Cvalue=E6=94=AF?= =?UTF-8?q?=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 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/4.widget.js b/src/core/4.widget.js index 025447d68..693702e9d 100644 --- a/src/core/4.widget.js +++ b/src/core/4.widget.js @@ -241,7 +241,9 @@ }, (handler && function (v) { handler.call(self, self, v); }) || BI.emptyFn, BI.extend({deep: true}, options)); - this._watchers.push(watcher); + this._watchers.push(function unwatchFn() { + watcher.teardown(); + }); return watcher.value; } else { return getter();