Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
yswenli committed Aug 28, 2019
1 parent dd5bcdb commit a2fc982
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 4 deletions.
18 changes: 15 additions & 3 deletions SAEA.WebRedisManager/wwwroot/Content/css/layui.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
21 changes: 21 additions & 0 deletions SAEA.WebRedisManager/wwwroot/Content/js/redis.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,27 @@
</dd>`;
$("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 () {
Expand Down
5 changes: 4 additions & 1 deletion SAEA.WebRedisManager/wwwroot/Index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<span style="font-size:15px;">
v5.1.7.1
</span>
</a>
</a>
<ul class="layui-nav">
<li class="layui-nav-item ">
<a id="add_link" href="javascript:;">
Expand All @@ -49,6 +49,9 @@
<i class="layui-icon layui-icon-component"></i>
<cite>Redis Server List</cite>
</a>
<div class="search-list">
<input type="text" id="search_list" autocomplete="off" class="layui-input search-list-input" placeholder="请输入项名称">
</div>
<dl class="layui-nav-child redis-dbs"></dl>
</li>
</ul>
Expand Down

0 comments on commit a2fc982

Please sign in to comment.