From 1c39df903957dbf4bf99386b94d101d8aa587f56 Mon Sep 17 00:00:00 2001 From: guy Date: Thu, 2 Sep 2021 21:25:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B4=E7=90=86=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/4.widget.js | 6 +++--- src/core/wrapper/layout/adapt/adapt.leftrightvertical.js | 1 - src/{core => snabbdom}/element2Snabbdom.js | 2 +- src/{core/8.snabdom.js => snabbdom/snabbdom.js} | 0 4 files changed, 4 insertions(+), 5 deletions(-) rename src/{core => snabbdom}/element2Snabbdom.js (96%) rename src/{core/8.snabdom.js => snabbdom/snabbdom.js} (100%) diff --git a/src/core/4.widget.js b/src/core/4.widget.js index 933324548..be5f23f81 100644 --- a/src/core/4.widget.js +++ b/src/core/4.widget.js @@ -270,10 +270,10 @@ BI.patchVNode(div, this.vnode); // 去除这个临时的div BI.DOM.hang([div]); - element.attr("style", self.vnode.elm.getAttribute("style")); - element.addClass(self.vnode.elm.getAttribute("class")); + element.attr("style", this.vnode.elm.getAttribute("style")); + element.addClass(this.vnode.elm.getAttribute("class")); element.empty(); - BI.each(BI.jQuery(self.vnode.elm).children(), function (i, node) { + BI.each(BI.jQuery(this.vnode.elm).children(), function (i, node) { element.append(node); }); return true; diff --git a/src/core/wrapper/layout/adapt/adapt.leftrightvertical.js b/src/core/wrapper/layout/adapt/adapt.leftrightvertical.js index 166728ab3..7591c71cd 100644 --- a/src/core/wrapper/layout/adapt/adapt.leftrightvertical.js +++ b/src/core/wrapper/layout/adapt/adapt.leftrightvertical.js @@ -77,7 +77,6 @@ BI.LeftRightVerticalAdaptLayout = BI.inherit(BI.Layout, { }, _getLeftRight: function (items) { - var o = this.options; var left, right; if (BI.isArray(items)) { BI.each(items, function (i, item) { diff --git a/src/core/element2Snabbdom.js b/src/snabbdom/element2Snabbdom.js similarity index 96% rename from src/core/element2Snabbdom.js rename to src/snabbdom/element2Snabbdom.js index f4efcaaa0..1a99bdc53 100644 --- a/src/core/element2Snabbdom.js +++ b/src/snabbdom/element2Snabbdom.js @@ -18,7 +18,7 @@ var elmAttrs = parentNode.attributes; var elmChildren = parentNode.childNodes; var key = parentNode.getAttribute("key"); - for (i = 0, n = elmAttrs.length; i < n; i++) { + for (var i = 0, n = elmAttrs.length; i < n; i++) { var name = elmAttrs[i].nodeName; if (name !== "id" && name !== "class") { attrs[name] = elmAttrs[i].nodeValue; diff --git a/src/core/8.snabdom.js b/src/snabbdom/snabbdom.js similarity index 100% rename from src/core/8.snabdom.js rename to src/snabbdom/snabbdom.js