Browse Source

Pull request #2149: 无JIAR任务 整理代码

Merge in VISUAL/fineui from ~GUY/fineui:master to master

* commit '1c39df903957dbf4bf99386b94d101d8aa587f56':
  整理代码
es6
guy 3 years ago
parent
commit
4b4d2535c6
  1. 6
      src/core/4.widget.js
  2. 1
      src/core/wrapper/layout/adapt/adapt.leftrightvertical.js
  3. 2
      src/snabbdom/element2Snabbdom.js
  4. 0
      src/snabbdom/snabbdom.js

6
src/core/4.widget.js

@ -270,10 +270,10 @@
BI.patchVNode(div, this.vnode); BI.patchVNode(div, this.vnode);
// 去除这个临时的div // 去除这个临时的div
BI.DOM.hang([div]); BI.DOM.hang([div]);
element.attr("style", self.vnode.elm.getAttribute("style")); element.attr("style", this.vnode.elm.getAttribute("style"));
element.addClass(self.vnode.elm.getAttribute("class")); element.addClass(this.vnode.elm.getAttribute("class"));
element.empty(); 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); element.append(node);
}); });
return true; return true;

1
src/core/wrapper/layout/adapt/adapt.leftrightvertical.js

@ -77,7 +77,6 @@ BI.LeftRightVerticalAdaptLayout = BI.inherit(BI.Layout, {
}, },
_getLeftRight: function (items) { _getLeftRight: function (items) {
var o = this.options;
var left, right; var left, right;
if (BI.isArray(items)) { if (BI.isArray(items)) {
BI.each(items, function (i, item) { BI.each(items, function (i, item) {

2
src/core/element2Snabbdom.js → src/snabbdom/element2Snabbdom.js

@ -18,7 +18,7 @@
var elmAttrs = parentNode.attributes; var elmAttrs = parentNode.attributes;
var elmChildren = parentNode.childNodes; var elmChildren = parentNode.childNodes;
var key = parentNode.getAttribute("key"); 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; var name = elmAttrs[i].nodeName;
if (name !== "id" && name !== "class") { if (name !== "id" && name !== "class") {
attrs[name] = elmAttrs[i].nodeValue; attrs[name] = elmAttrs[i].nodeValue;

0
src/core/8.snabdom.js → src/snabbdom/snabbdom.js

Loading…
Cancel
Save