diff --git a/ruoyi-admin/src/main/resources/static/ruoyi/index.js b/ruoyi-admin/src/main/resources/static/ruoyi/index.js index fb5501c4..2d2b1e8d 100644 --- a/ruoyi-admin/src/main/resources/static/ruoyi/index.js +++ b/ruoyi-admin/src/main/resources/static/ruoyi/index.js @@ -370,7 +370,8 @@ $(function() { // 刷新按钮 $('.tabReload').on('click', refreshTab); - $('.menuTabs').on('dblclick', '.menuTab', refreshTab); + // 双击选项卡全屏显示 + $('.menuTabs').on('dblclick', '.menuTab', activeTabMax); // 左移按扭 $('.tabLeft').on('click', scrollTabLeft); @@ -396,4 +397,21 @@ $(function() { $('.page-tabs-content').css("margin-left", "0"); }); + // tab全屏显示 + $('.tabMaxCurrent').on('click', function () { + $('.page-tabs-content').find('.active').trigger("dblclick"); + }); + + // 双击选项卡全屏显示 + function activeTabMax() { + $('#content-main').toggleClass('max'); + $('#ax_close_max').show(); + } + + $(window).keydown(function(event) { + if (event.keyCode == 27) { + $('#content-main').removeClass('max'); + $('#ax_close_max').hide(); + } + }); }); \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/index.html b/ruoyi-admin/src/main/resources/templates/index.html index 3a1baf66..b8a369b6 100644 --- a/ruoyi-admin/src/main/resources/templates/index.html +++ b/ruoyi-admin/src/main/resources/templates/index.html @@ -18,6 +18,7 @@
@@ -115,6 +116,7 @@