UNPKG

react-dyn-tabs

Version:
18 lines 397 B
import Helper from '../helper.js'; export default Helper.module(function () { this.tabsId = []; }, { reset: function reset() { this.tabsId = []; }, add: function add(id) { if (id) this.tabsId.push(id); }, remove: function remove(id) { var tabIDs = this.tabsId; while (tabIDs.indexOf(id) >= 0) { tabIDs.splice(tabIDs.indexOf(id), 1); } return this; } });