气泡弹出框特效移至通用js

master
RuoYi 5 years ago committed by Limy
parent 9133d64829
commit 410a590646

@ -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 时间控件绑定 // laydate 时间控件绑定
if ($(".select-time").length > 0) { if ($(".select-time").length > 0) {
@ -79,6 +96,7 @@ $(function() {
}); });
}); });
} }
// laydate time-input 时间控件绑定 // laydate time-input 时间控件绑定
if ($(".time-input").length > 0) { if ($(".time-input").length > 0) {
layui.use('laydate', function () { layui.use('laydate', function () {
@ -126,6 +144,7 @@ $(function() {
}); });
}); });
} }
// tree 关键字搜索绑定 // tree 关键字搜索绑定
if ($("#keyword").length > 0) { if ($("#keyword").length > 0) {
$("#keyword").bind("focus", function focusKey(e) { $("#keyword").bind("focus", function focusKey(e) {
@ -139,6 +158,7 @@ $(function() {
$.tree.searchNode(e); $.tree.searchNode(e);
}).bind("input propertychange", $.tree.searchNode); }).bind("input propertychange", $.tree.searchNode);
} }
// tree表格树 展开/折叠 // tree表格树 展开/折叠
var expandFlag; var expandFlag;
$("#expandAllBtn").click(function() { $("#expandAllBtn").click(function() {
@ -151,6 +171,7 @@ $(function() {
} }
expandFlag = expandFlag ? false: true; expandFlag = expandFlag ? false: true;
}) })
// 按下ESC按钮关闭弹层 // 按下ESC按钮关闭弹层
$('body', document).on('keyup', function(e) { $('body', document).on('keyup', function(e) {
if (e.which === 27) { if (e.which === 27) {

@ -259,23 +259,6 @@ var table = {
} }
// 浮动提示框特效 // 浮动提示框特效
$(".table [data-toggle='tooltip']").tooltip(); $(".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) { destroy: function (tableId) {

Loading…
Cancel
Save