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 5ead68fb..273a64d1 100644 --- a/ruoyi-admin/src/main/resources/static/ruoyi/js/common.js +++ b/ruoyi-admin/src/main/resources/static/ruoyi/js/common.js @@ -55,9 +55,11 @@ $(function() { }); // 取消回车自动提交表单 - $(document).on("keypress", "form", function(event) { - return event.keyCode != 13; - }); + $(document).on("keypress", ":input:not(textarea):not([type=submit])", function(event) { + if (event.keyCode == 13) { + event.preventDefault(); + } + }); // laydate 时间控件绑定 if ($(".select-time").length > 0) { 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 273c5bea..d24fade2 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 @@ -289,7 +289,7 @@ var table = { _value = _value.replace(/\'/g,"'"); _value = _value.replace(/\"/g,"""); var actions = []; - actions.push($.common.sprintf('', _value)); + actions.push($.common.sprintf('', _value)); actions.push($.common.sprintf('%s', _target, _value, _text)); return actions.join(''); } else {