Browse Source

Pull request #2013: 无JIRA任务 bugfix

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

* commit 'fa6e0bc231a1b1599f82664b516f809679e96efc':
  add
es6
guy 3 years ago
parent
commit
ddaac55444
  1. 4
      src/core/4.widget.js
  2. 2
      src/core/element2Snabbdom.js

4
src/core/4.widget.js

@ -29,6 +29,7 @@
tagName: "div", tagName: "div",
attributes: null, attributes: null,
data: null, data: null,
key: null,
tag: null, tag: null,
disabled: false, disabled: false,
@ -135,6 +136,9 @@
if (o._baseCls || o.baseCls || o.extraCls || o.cls) { if (o._baseCls || o.baseCls || o.extraCls || o.cls) {
this.element.addClass((o._baseCls || "") + " " + (o.baseCls || "") + " " + (o.extraCls || "") + " " + (o.cls || "")); this.element.addClass((o._baseCls || "") + " " + (o.baseCls || "") + " " + (o.extraCls || "") + " " + (o.cls || ""));
} }
if (o.key != null) {
this.element.attr("key", o.key);
}
if (o.attributes) { if (o.attributes) {
this.element.attr(o.attributes); this.element.attr(o.attributes);
} }

2
src/core/element2Snabbdom.js

@ -15,12 +15,14 @@
}; };
}); });
var style = parentNode.getAttribute("style"); var style = parentNode.getAttribute("style");
var key = parentNode.getAttribute("key");
// var claz = parentNode.getAttribute("class"); // var claz = parentNode.getAttribute("class");
var vnode = BI.Snabbdom.h(parentNode.nodeName, { var vnode = BI.Snabbdom.h(parentNode.nodeName, {
class: BI.makeObject(parentNode.classList), class: BI.makeObject(parentNode.classList),
props: { props: {
style: style style: style
}, },
key: key,
on: on, on: on,
hook: { hook: {
create: function () { create: function () {

Loading…
Cancel
Save