diff --git a/src/admin/Bootstrap.Admin/wwwroot/js/ba.blazor.js b/src/admin/Bootstrap.Admin/wwwroot/js/ba.blazor.js
index eae5c8cc..71678b2e 100644
--- a/src/admin/Bootstrap.Admin/wwwroot/js/ba.blazor.js
+++ b/src/admin/Bootstrap.Admin/wwwroot/js/ba.blazor.js
@@ -207,6 +207,21 @@
title: '
输入任意字符串全局搜索 Enter 搜索 ESC 清除搜索
',
html: true
});
+
+ // 支持键盘回车搜索
+ $searchInput.on('keyup', function (event) {
+ if (event.keyCode === 13 || event.keyCode === 27) {
+ // ENTER
+ var $buttons = $(this).next();
+ var $search = $buttons.find(':first');
+ if ($search.length === 1) {
+ if (event.keyCode === 13) {
+ $search.trigger('click');
+ }
+ else $search.next().trigger('click');
+ }
+ }
+ });
}
}
}