From 3d08a0fae59b9f2357324476ee07bf63f0e64b4e Mon Sep 17 00:00:00 2001 From: guy Date: Sun, 12 Dec 2021 17:37:22 +0800 Subject: [PATCH] =?UTF-8?q?worker=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/fix/fix.compact.js | 8 ++++++-- dist/fix/worker.compact.js | 2 +- examples/worker.html | 1 - 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/dist/fix/fix.compact.js b/dist/fix/fix.compact.js index 35a642878..abe505d96 100644 --- a/dist/fix/fix.compact.js +++ b/dist/fix/fix.compact.js @@ -115,7 +115,7 @@ function createStore () { var needPop = false; - if (_global.Fix && this._store) { + if (this._store) { var store = findStore(this.options.context || this._parent || this.options.element || this._context); if (store) { pushTarget(store); @@ -151,7 +151,11 @@ var __initWatch = BI.Widget.prototype.__initWatch; BI.Widget.prototype.__initWatch = function () { __initWatch.apply(this, arguments); - if (_global.Fix && this._store) { + var workerMode = BI.Providers.getProvider("bi.provider.system").getWorkerMode(); + if (workerMode && this._worker) { + return; + } + if (this._store) { initWatch(this, this.watch); } }; diff --git a/dist/fix/worker.compact.js b/dist/fix/worker.compact.js index f178f37bf..e537706ad 100644 --- a/dist/fix/worker.compact.js +++ b/dist/fix/worker.compact.js @@ -88,7 +88,7 @@ name: name, eventType: "create", options: options, - watches: BI.map(this.watch, function (key) { + watches: BI.map(this.$watch || this.watch, function (key) { return key; }) }); diff --git a/examples/worker.html b/examples/worker.html index 03cdc5be6..759f0eac4 100644 --- a/examples/worker.html +++ b/examples/worker.html @@ -6,7 +6,6 @@ --> -