From 1ee76370835e2aa38a773edbe925f521e070ab10 Mon Sep 17 00:00:00 2001 From: guy Date: Mon, 8 Mar 2021 23:12:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=BB=84=E4=BB=B6=E9=BB=98?= =?UTF-8?q?=E8=AE=A4populate=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- demo.worker.js => examples/demo.worker.js | 2 +- dev.html => examples/dev.html | 15 ++++++++++----- hooks.html => examples/hooks.html | 4 ++-- worker.html => examples/worker.html | 8 +++----- src/base/single/button/buttons/button.js | 4 ---- src/base/single/label/abstract.label.js | 4 ---- src/base/single/single.js | 4 ---- 7 files changed, 16 insertions(+), 25 deletions(-) rename demo.worker.js => examples/demo.worker.js (88%) rename dev.html => examples/dev.html (85%) rename hooks.html => examples/hooks.html (97%) rename worker.html => examples/worker.html (76%) diff --git a/demo.worker.js b/examples/demo.worker.js similarity index 88% rename from demo.worker.js rename to examples/demo.worker.js index 89a22ccb9..fecbf994e 100644 --- a/demo.worker.js +++ b/examples/demo.worker.js @@ -1,5 +1,5 @@ if (this.importScripts) { - importScripts("./dist/fineui_without_jquery_polyfill.js"); + importScripts("../dist/fineui_without_jquery_polyfill.js"); BI.initWorker(); } var Model = BI.inherit(Fix.Model, { diff --git a/dev.html b/examples/dev.html similarity index 85% rename from dev.html rename to examples/dev.html index 650cf45a6..6b6eb4f0c 100644 --- a/dev.html +++ b/examples/dev.html @@ -2,7 +2,8 @@ - + + @@ -37,9 +38,6 @@ BI.model("demo.child_model", ChildModel); var Child = BI.inherit(BI.Widget, { - props: { - updateMode: "auto" - }, setup: function () { var store = BI.useStore(function () { return BI.Models.getModel("demo.child_model"); @@ -67,18 +65,25 @@ updateMode: "auto" }, setup: function () { + var child; var store = BI.useStore(function () { return BI.Models.getModel("demo.model"); }); setInterval(function () { store.toggle(); }, 1000); + BI.watch("text", function () { + child.populate(); + }); return function () { return { type: "bi.vertical", vgap: 20, items: [{ - type: "demo.child" + type: "demo.child", + ref: function (_ref) { + child = _ref; + } }, { type: "demo.child" }] diff --git a/hooks.html b/examples/hooks.html similarity index 97% rename from hooks.html rename to examples/hooks.html index 4953dc389..80b9e880c 100644 --- a/hooks.html +++ b/examples/hooks.html @@ -2,8 +2,8 @@ - - + +
diff --git a/worker.html b/examples/worker.html similarity index 76% rename from worker.html rename to examples/worker.html index 3753d622d..e9045ab56 100644 --- a/worker.html +++ b/examples/worker.html @@ -2,11 +2,9 @@ - - - - - + + + diff --git a/src/base/single/button/buttons/button.js b/src/base/single/button/buttons/button.js index 6db1349a3..c432bc7d0 100644 --- a/src/base/single/button/buttons/button.js +++ b/src/base/single/button/buttons/button.js @@ -145,10 +145,6 @@ BI.Button = BI.inherit(BI.BasicButton, { unHighLight: function () { this.text.unHighLight.apply(this.text, arguments); - }, - - destroy: function () { - BI.Button.superclass.destroy.apply(this, arguments); } }); BI.shortcut("bi.button", BI.Button); diff --git a/src/base/single/label/abstract.label.js b/src/base/single/label/abstract.label.js index 966500cac..9a660c46d 100644 --- a/src/base/single/label/abstract.label.js +++ b/src/base/single/label/abstract.label.js @@ -381,10 +381,6 @@ if (!this.isReadOnly()) { this.text.setValue(v); } - }, - - populate: function () { - BI.AbstractLabel.superclass.populate.apply(this, arguments); } }); }()); diff --git a/src/base/single/single.js b/src/base/single/single.js index 97b2591a7..d6cd92f2c 100644 --- a/src/base/single/single.js +++ b/src/base/single/single.js @@ -138,10 +138,6 @@ BI.Single = BI.inherit(BI.Widget, { this._hoverBinded = false; }, - populate: function (items) { - this.items = items || []; - }, - // opt: {container: '', belowMouse: false} setTitle: function (title, opt) { this.options.title = title;