Browse Source

Pull request #1576: 无JIRA任务 父子组件名的命名优化下

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

* commit '60f78eae776e352a56d1c3b193966e07c3ce111b':
  父子组件名的命名优化下
master
guy 4 years ago
parent
commit
8d27ef48df
  1. 2
      src/core/wrapper/layout/layout.card.js
  2. 2
      src/core/wrapper/layout/layout.tape.js

2
src/core/wrapper/layout/layout.card.js

@ -76,7 +76,7 @@ BI.CardLayout = BI.inherit(BI.Layout, {
},
_deleteCardByName: function (cardName) {
delete this._children[this.getName() + "_" + cardName];
delete this._children[this._getChildName(cardName)];
var index = BI.findIndex(this.options.items, function (i, item) {
return item.cardName == cardName;
});

2
src/core/wrapper/layout/layout.tape.js

@ -46,7 +46,7 @@ BI.HTapeLayout = BI.inherit(BI.Layout, {
var self = this, o = this.options;
items = BI.compact(items);
BI.each(items, function (i, item) {
if (!self.hasWidget(self.getName() + "_" + i)) {
if (!self.hasWidget(self._getChildName(i))) {
var w = BI._lazyCreateWidget(item);
self.addWidget(self._getChildName(i), w);
} else {

Loading…
Cancel
Save