diff --git a/public/assets/js/fast.js b/public/assets/js/fast.js index f963e9b4..88f8b573 100644 --- a/public/assets/js/fast.js +++ b/public/assets/js/fast.js @@ -103,7 +103,7 @@ define(['jquery', 'bootstrap', 'toastr', 'layer', 'lang'], function ($, undefine //获取修复后可访问的cdn链接 cdnurl: function (url, domain) { var rule = new RegExp("^((?:[a-z]+:)?\\/\\/|data:image\\/)", "i"); - if(typeof domain === 'undefined'){ + if(typeof domain === 'undefined' || domain === true){ var cdnurl = Config.upload.cdnurl; url = rule.test(url) || (cdnurl && url.indexOf(cdnurl) === 0) ? url : cdnurl + url; } diff --git a/public/assets/js/require-table.js b/public/assets/js/require-table.js index a4c9bf9f..f320521b 100644 --- a/public/assets/js/require-table.js +++ b/public/assets/js/require-table.js @@ -559,11 +559,20 @@ define(['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstrap-table $(".autocontent-caret", this).remove(); } }); - table.on("click", ".autocontent-caret", function () { + table.on("click mouseenter", ".autocontent-caret", function (e) { + var hover = $(this).prev().hasClass("autocontent-hover"); + if (!hover && e.type === 'mouseenter') { + return; + } var text = $(this).prev().text(); var tdrect = $(this).parent().get(0).getBoundingClientRect(); var index = Layer.open({id: 'autocontent', skin: 'layui-layer-fast layui-layer-autocontent', title: false, content: text, btn: false, anim: false, shade: 0, isOutAnim: false, area: 'auto', maxWidth: 450, maxHeight: 350, offset: [tdrect.y, tdrect.x]}); + if (hover) { + $(document).one("mouseleave", "#layui-layer" + index, function () { + Layer.close(index); + }); + } var mousedown = function (e) { if ($(e.target).closest(".layui-layer").length === 0) { Layer.close(index); @@ -754,7 +763,8 @@ define(['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstrap-table }, content: function (value, row, index) { var width = this.width != undefined ? (this.width.toString().match(/^\d+$/) ? this.width + "px" : this.width) : "250px"; - return "
" + value + "
"; + var hover = this.hover != undefined && this.hover ? "autocontent-hover" : ""; + return "
" + value + "
"; }, status: function (value, row, index) { var custom = {normal: 'success', hidden: 'gray', deleted: 'danger', locked: 'info'};