列表页面回车键搜索

This commit is contained in:
-LiaNg- 2019-08-26 14:59:44 +08:00
parent a1d9354de7
commit 7c2ab47429
1 changed files with 12 additions and 0 deletions

View File

@ -1360,4 +1360,16 @@ modal_status = {
SUCCESS: "success",
FAIL: "error",
WARNING: "warning"
};
document.onkeydown = function (event) {
var e = event ? event : (window.event ? window.event : null);
if (e.keyCode === 13) {
var hasTable = document.getElementById("bootstrap-table");
if (hasTable == null) {
return true;
}
$.table.search();
return false;
}
};