diff --git a/SAEA.WebRedisManager/wwwroot/Content/css/layui.css b/SAEA.WebRedisManager/wwwroot/Content/css/layui.css index aa546d8..7e658aa 100644 --- a/SAEA.WebRedisManager/wwwroot/Content/css/layui.css +++ b/SAEA.WebRedisManager/wwwroot/Content/css/layui.css @@ -4451,11 +4451,23 @@ body .layui-util-face { animation-name: layui-fadeout } -#add_form{ - display:block; - height:312px; +#add_form { + display: block; + height: 312px; } #edit_form { padding-right: 15px; } + + +.search-list { + margin-top: 3px; +} + +.search-list-input { + border-radius: 12px; + -webkit-border-radius: 12px; + height: 30px; + font-size: 14px; +} diff --git a/SAEA.WebRedisManager/wwwroot/Content/js/redis.js b/SAEA.WebRedisManager/wwwroot/Content/js/redis.js index e3111ae..7744484 100644 --- a/SAEA.WebRedisManager/wwwroot/Content/js/redis.js +++ b/SAEA.WebRedisManager/wwwroot/Content/js/redis.js @@ -21,6 +21,27 @@ `; $("dl.redis-dbs").append(html); } + //搜索 + + $("#search_list").keyup(function () { + + var searchText = $(this).val(); + + if (searchText === "") { + $(".redis_link").each(function (index) { + $(this).parent().show(); + }); + } + + $(".redis_link").each(function (index) { + if ($(this).text().indexOf(searchText) === -1) { + $(this).parent().hide(); + } + else { + $(this).parent().show(); + } + }); + }); //点击redis实例 $("a.redis_link").on("click", function () { diff --git a/SAEA.WebRedisManager/wwwroot/Index.html b/SAEA.WebRedisManager/wwwroot/Index.html index a1f3e19..71a4fcd 100644 --- a/SAEA.WebRedisManager/wwwroot/Index.html +++ b/SAEA.WebRedisManager/wwwroot/Index.html @@ -23,7 +23,7 @@ v5.1.7.1 - +