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:
wolfcode
2025-04-28 15:33:50 +08:00
parent 063108a846
commit e7253e7de0
3 changed files with 7 additions and 5 deletions

View File

@@ -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

View File

@@ -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 {

View File

@@ -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);
}
});