content/ui/base/scripts/bootstrap-tab.js
(开头部分) 9KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
var addTabs = function(options) {
var url = window.location.protocol + '//' + window.location.host + "/";
options.url = url + options.url;
id = "tab_" + options.id;
var title = "", content = "";
//如果TAB不存在,创建一个新的TAB
if (!$("#" + id)[0]) {
var mainHeight = App.getViewPort().height - $('.page-footer').outerHeight() - $('.page-header').outerHeight() - $(".content-tabs").height();
//固定TAB中IFRAME高度
// mainHeight = $(document.body).height() - 90;
//创建新TAB的title
title = '<a href="javascript:void(0);" id="tab_' + id + '" data-id="' + id + '" class="menu_tab" >' + options.title;
//是否允许关闭
if (options.close) {
title += ' <i class="fa fa-remove page_tab_close" style="cursor: pointer;" data-id="' + id + '" onclick="closeTab(this)"></i>';
}
title += '</a>';
var loadIframe = "";
//是否指定TAB内容
if (options.content) {
content = '<div role="tabpanel" class="tab-pane" id="' + id + '">' + options.content + '</div>';
} else { //没有内容,使用IFRAME打开链接
// App.startPageLoading({ message: '加载中......' });
// App.stopPageLoading();
App.blockUI({
target: '#tab-content',
boxed: true,
message: '加载中......'//,
// animate: true
});
content = '<div role="tabpanel" class="tab-pane" id="' + id + '">';
loadIframe = '<iframe onload="javascript:App.unblockUI(\'#tab-content\');" src="' + options.url + '" width="100%" height="100%" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="yes" allowtransparency="yes" id="iframe_' + id + '" class=" tab_iframe"></iframe>';
content += loadIframe;
content += '</div>';
}
////添加访问记录
//$.ajax({
// url: "/Home/VisitModule",
// data: { moduleId: options.id, moduleName: options.title, moduleUrl: options.url },
// type: "post",
// dataType: "text"
//});
Cookies.set('currentmoduleName', options.title, { path: '/' });
Cookies.set('currentmoduleId', options.id, { path: '/' });
//加入TABS
$(".page-tabs-content").append(title);
$("#tab-content").append(content);
}
$(".page-tabs-content > a.active").removeClass("active");
$("#tab-content > .active").removeClass("active");
后面还有 180 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。