diff --git a/ruoyi-admin/src/main/resources/static/ruoyi/js/common.js b/ruoyi-admin/src/main/resources/static/ruoyi/js/common.js index 56644aa1..0733326d 100644 --- a/ruoyi-admin/src/main/resources/static/ruoyi/js/common.js +++ b/ruoyi-admin/src/main/resources/static/ruoyi/js/common.js @@ -36,6 +36,23 @@ $(function() { }) }) } + + // 气泡弹出框特效(移到元素时) + $(document).on("mouseenter", '.table [data-toggle="popover"]', function() { + var _this = this; + $(this).popover("show"); + $(".popover").on("mouseleave", function() { + $(_this).popover('hide'); + }); + }) + + // 气泡弹出框特效(离开元素时) + $(document).on("mouseleave", '.table [data-toggle="popover"]', function() { + var _this = this; + setTimeout(function() { + if (!$(".popover:hover").length) $(_this).popover("hide"); + }, 100); + }); // laydate 时间控件绑定 if ($(".select-time").length > 0) { @@ -79,6 +96,7 @@ $(function() { }); }); } + // laydate time-input 时间控件绑定 if ($(".time-input").length > 0) { layui.use('laydate', function () { @@ -126,6 +144,7 @@ $(function() { }); }); } + // tree 关键字搜索绑定 if ($("#keyword").length > 0) { $("#keyword").bind("focus", function focusKey(e) { @@ -139,6 +158,7 @@ $(function() { $.tree.searchNode(e); }).bind("input propertychange", $.tree.searchNode); } + // tree表格树 展开/折叠 var expandFlag; $("#expandAllBtn").click(function() { @@ -151,6 +171,7 @@ $(function() { } expandFlag = expandFlag ? false: true; }) + // 按下ESC按钮关闭弹层 $('body', document).on('keyup', function(e) { if (e.which === 27) { diff --git a/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js b/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js index d11d9851..17e0cd05 100644 --- a/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js +++ b/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js @@ -259,23 +259,6 @@ var table = { } // 浮动提示框特效 $(".table [data-toggle='tooltip']").tooltip(); - - // 气泡弹出框特效(移到元素时) - $(document).on("mouseenter", '.table [data-toggle="popover"]', function() { - var _this = this; - $(this).popover("show"); - $(".popover").on("mouseleave", function() { - $(_this).popover('hide'); - }); - }) - - // 气泡弹出框特效(离开元素时) - $(document).on("mouseleave", '.table [data-toggle="popover"]', function() { - var _this = this; - setTimeout(function() { - if (!$(".popover:hover").length) $(_this).popover("hide"); - }, 100); - }); }, // 表格销毁 destroy: function (tableId) {