| | |
| | | ,view = layui.view |
| | | |
| | | //打开标签页 |
| | | ,openTabsPage = function(url, text){ |
| | | ,openTabsPage = function(url, text, i18nKey){ |
| | | //遍历页签选项卡 |
| | | var matchTo |
| | | ,tabs = $('#LAY_app_tabsheader>li') |
| | |
| | | |
| | | text = text || '新标签页'; |
| | | |
| | | if(i18nKey && typeof I18n !== 'undefined'){ |
| | | text = I18n.t(i18nKey); |
| | | } |
| | | |
| | | if(setter.pageTabs){ |
| | | //如果未在选项卡中匹配到,则追加选项卡 |
| | | if(!matchTo){ |
| | |
| | | ].join('')); |
| | | tabsPage.index = tabs.length; |
| | | element.tabAdd(FILTER_TAB_TBAS, { |
| | | title: '<span>'+ text +'</span>' |
| | | title: (i18nKey ? '<span data-i18n="'+ i18nKey +'">' : '<span>') + text + '</span>' |
| | | ,id: url |
| | | ,attr: path |
| | | }); |