From c27ea9d3f48c04856a28d62b4e61fb1ea5ff7c54 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Wed, 11 Nov 2020 12:17:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=A4=9A=E9=A1=B5=E7=AD=BE?= =?UTF-8?q?=E5=85=B3=E9=97=AD=E9=9D=9E=E5=BD=93=E5=89=8D=E9=80=89=E9=A1=B9?= =?UTF-8?q?=E5=87=BA=E7=8E=B0=E7=A9=BA=E7=99=BD=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/static/ruoyi/index.js | 24 +++++-------------- 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/ruoyi-admin/src/main/resources/static/ruoyi/index.js b/ruoyi-admin/src/main/resources/static/ruoyi/index.js index 29f21242..e21e3334 100644 --- a/ruoyi-admin/src/main/resources/static/ruoyi/index.js +++ b/ruoyi-admin/src/main/resources/static/ruoyi/index.js @@ -174,10 +174,7 @@ $(function() { } else if (marginLeftVal > (visibleWidth - $(element).outerWidth(true) - $(element).prev().outerWidth(true))) { scrollVal = marginLeftVal - $(element).prev().outerWidth(true); } - $('.page-tabs-content').animate({ - marginLeft: 0 - scrollVal + 'px' - }, - "fast"); + $('.page-tabs-content').animate({ marginLeft: 0 - scrollVal + 'px' }, "fast"); } //查看左侧隐藏的选项卡 @@ -207,10 +204,7 @@ $(function() { scrollVal = calSumWidth($(tabElement).prevAll()); } } - $('.page-tabs-content').animate({ - marginLeft: 0 - scrollVal + 'px' - }, - "fast"); + $('.page-tabs-content').animate({ marginLeft: 0 - scrollVal + 'px' }, "fast"); } //查看右侧隐藏的选项卡 @@ -238,10 +232,7 @@ $(function() { } scrollVal = calSumWidth($(tabElement).prevAll()); if (scrollVal > 0) { - $('.page-tabs-content').animate({ - marginLeft: 0 - scrollVal + 'px' - }, - "fast"); + $('.page-tabs-content').animate({ marginLeft: 0 - scrollVal + 'px' }, "fast"); } } } @@ -347,10 +338,7 @@ $(function() { var marginLeftVal = parseInt($('.page-tabs-content').css('margin-left')); if (marginLeftVal < 0) { - $('.page-tabs-content').animate({ - marginLeft: (marginLeftVal + currentWidth) + 'px' - }, - "fast"); + $('.page-tabs-content').animate({ marginLeft: (marginLeftVal + currentWidth) + 'px' }, "fast"); } // 移除当前选项卡 @@ -470,7 +458,7 @@ $(function() { $('.RuoYi_iframe[data-id="' + $(this).data('id') + '"]').remove(); $(this).remove(); }); - $('.page-tabs-content').css("margin-left", "0"); + $('.page-tabs-content').animate({ marginLeft: '0px' }, "fast"); } // 关闭全部选项卡 @@ -591,7 +579,7 @@ $(function() { $('.RuoYi_iframe[data-id="' + $(this).data('id') + '"]').remove(); $(this).remove(); }); - $('.page-tabs-content').css("margin-left", "0"); + $('.page-tabs-content').animate({ marginLeft: '0px' }, "fast"); } }, "close_right": {