fix(layuimini): improve tab context menu positioning and behavior
- Update tab context menu CSS to use fixed positioning with higher z-index - Modify JavaScript to prevent default context menu and use correct left position
This commit is contained in:
@@ -146,7 +146,7 @@ define(["jquery", "easy-admin", "echarts", "echarts-theme", "miniAdmin", "miniTh
|
||||
showComposerInfo: function () {
|
||||
// <div style="padding: 25px;">12313</div>
|
||||
let html = ``
|
||||
ea.request.post({
|
||||
ea.request.get({
|
||||
url: ea.url('ajax/composerInfo'),
|
||||
}, function (success) {
|
||||
let data = success.data
|
||||
|
||||
@@ -637,9 +637,10 @@
|
||||
.layuimini-tab-mousedown {
|
||||
display: none;
|
||||
width: 80px;
|
||||
position: absolute;
|
||||
top: 0px !important;
|
||||
left: 0px !important;
|
||||
position: fixed;
|
||||
top: 55px !important;
|
||||
left: 0 !important;
|
||||
z-index: 99999;
|
||||
}
|
||||
|
||||
.layuimini-tab-mousedown dd a {
|
||||
|
||||
@@ -313,9 +313,10 @@ define(["jquery"], function ($) {
|
||||
* 注册鼠标右键
|
||||
*/
|
||||
$('body').on('mousedown', '.layuimini-tab .layui-tabs-header li', function (e) {
|
||||
var left = $(this).offset().left - $('.layuimini-tab ').offset().left + ($(this).width() / 2),
|
||||
var left = e.pageX ,
|
||||
tabId = $(this).attr('lay-id');
|
||||
if (e.which === 3) {
|
||||
e.preventDefault();
|
||||
miniTab.openTabRignMenu(tabId, left);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user