fixed: okTab
parent
c9fe1daf3c
commit
0e63b711fd
|
|
@ -51,6 +51,7 @@ layui.define(["element", "jquery"], function (exports) {
|
||||||
* @param ele 当前tab
|
* @param ele 当前tab
|
||||||
*/
|
*/
|
||||||
okTab.prototype.positionTab = function (contEle, ele) {
|
okTab.prototype.positionTab = function (contEle, ele) {
|
||||||
|
|
||||||
var superEle = $(".ok-tab");//父级元素
|
var superEle = $(".ok-tab");//父级元素
|
||||||
contEle = $(contEle);//tab内容存放的父元素
|
contEle = $(contEle);//tab内容存放的父元素
|
||||||
ele = $(ele);//当前的tab
|
ele = $(ele);//当前的tab
|
||||||
|
|
@ -69,6 +70,7 @@ layui.define(["element", "jquery"], function (exports) {
|
||||||
/*console.log("maxMoveWidth:" + maxMoveWidth);
|
/*console.log("maxMoveWidth:" + maxMoveWidth);
|
||||||
console.log("superWidth:" + superWidth);
|
console.log("superWidth:" + superWidth);
|
||||||
console.log("contWidth:" + contWidth);*/
|
console.log("contWidth:" + contWidth);*/
|
||||||
|
// console.log(contEle);
|
||||||
for (let i = 0; i < elePrevAll.length; i++) {
|
for (let i = 0; i < elePrevAll.length; i++) {
|
||||||
leftWidth += $(elePrevAll[i]).outerWidth() * 1;
|
leftWidth += $(elePrevAll[i]).outerWidth() * 1;
|
||||||
}
|
}
|
||||||
|
|
@ -88,7 +90,6 @@ layui.define(["element", "jquery"], function (exports) {
|
||||||
left: -tempMove
|
left: -tempMove
|
||||||
}, 50);
|
}, 50);
|
||||||
} else {//从左往右移动
|
} else {//从左往右移动
|
||||||
console.log("从左往右移动");
|
|
||||||
var tempMove = leftWidth - halfPlace;//预留一部分距离
|
var tempMove = leftWidth - halfPlace;//预留一部分距离
|
||||||
if (tempMove < 0) {
|
if (tempMove < 0) {
|
||||||
tempMove = 0;
|
tempMove = 0;
|
||||||
|
|
@ -292,7 +293,7 @@ layui.define(["element", "jquery"], function (exports) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
temp += ('<cite>{0}</cite></a>').format(data.title);
|
temp += ('<cite>{0}</cite></a>').format(data.title);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -379,6 +380,7 @@ layui.define(["element", "jquery"], function (exports) {
|
||||||
element.tabDelete(filter, $(j).attr("lay-id"));
|
element.tabDelete(filter, $(j).attr("lay-id"));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
this.navMove('leftmax');
|
||||||
} else {
|
} else {
|
||||||
layer.msg("您好!当前没有可关闭的窗口了 (๑╹◡╹)ノ");
|
layer.msg("您好!当前没有可关闭的窗口了 (๑╹◡╹)ノ");
|
||||||
return;
|
return;
|
||||||
|
|
@ -388,6 +390,7 @@ layui.define(["element", "jquery"], function (exports) {
|
||||||
openTabs.each(function (i, j) {
|
openTabs.each(function (i, j) {
|
||||||
element.tabDelete(filter, $(j).attr("lay-id"));
|
element.tabDelete(filter, $(j).attr("lay-id"));
|
||||||
});
|
});
|
||||||
|
this.navMove('leftmax');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
element.render("tab", filter);
|
element.render("tab", filter);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue