diff --git a/ruoyi-admin/src/main/resources/static/ruoyi/index.js b/ruoyi-admin/src/main/resources/static/ruoyi/index.js index d6addefa8..5a60670cf 100644 --- a/ruoyi-admin/src/main/resources/static/ruoyi/index.js +++ b/ruoyi-admin/src/main/resources/static/ruoyi/index.js @@ -440,7 +440,7 @@ $(function() { $('.mainContent .RuoYi_iframe').each(function() { if ($(this).data('id') == currentId) { $(this).show().siblings('.RuoYi_iframe').hide(); - isRefresh = $(this).data('refresh'); + isRefresh = $.common.nullToDefault($(this).data('refresh'), false); return false; } }); 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 88df2a1e2..cdcd0fb5d 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 @@ -1563,6 +1563,10 @@ var table = { isNotEmpty: function (value) { return !$.common.isEmpty(value); }, + // 如果值是空,则返回指定默认字符串,否则返回字符串本身 + nullToDefault: function (value, defaultValue) { + return $.common.isEmpty(value) ? defaultValue : value; + }, // 空对象转字符串 nullToStr: function(value) { if ($.common.isEmpty(value)) {