Browse Source

加个删除tab项的方法

master
windy 8 years ago
parent
commit
eafb35e742
  1. 11
      bi/base.js
  2. 11
      docs/base.js
  3. 11
      src/base/combination/tab.js

11
bi/base.js

@ -4825,6 +4825,17 @@ BI.Tab = BI.inherit(BI.Widget, {
}
},
removeTab: function (cardname) {
var self = this, o = this.options;
BI.any(this.cardMap, function (name, card) {
if (BI.isEqual(name, (cardname + ""))) {
self.layout.deleteCardByName(name);
delete self.cardMap[name];
return true;
}
});
},
getSelect: function () {
return this.curr;
},

11
docs/base.js

@ -4825,6 +4825,17 @@ BI.Tab = BI.inherit(BI.Widget, {
}
},
removeTab: function (cardname) {
var self = this, o = this.options;
BI.any(this.cardMap, function (name, card) {
if (BI.isEqual(name, (cardname + ""))) {
self.layout.deleteCardByName(name);
delete self.cardMap[name];
return true;
}
});
},
getSelect: function () {
return this.curr;
},

11
src/base/combination/tab.js

@ -93,6 +93,17 @@ BI.Tab = BI.inherit(BI.Widget, {
}
},
removeTab: function (cardname) {
var self = this, o = this.options;
BI.any(this.cardMap, function (name, card) {
if (BI.isEqual(name, (cardname + ""))) {
self.layout.deleteCardByName(name);
delete self.cardMap[name];
return true;
}
});
},
getSelect: function () {
return this.curr;
},

Loading…
Cancel
Save