commit
4f60ca085f
|
@ -7,6 +7,19 @@
|
|||
</div>
|
||||
<div class="modal-body">
|
||||
<form class="form-inline">
|
||||
<div class="row" id="useFilter">
|
||||
<div class="form-group col-12">
|
||||
<div class="input-group flex-fill">
|
||||
<div class="input-group-prepend d-none d-sm-flex">
|
||||
<span class="input-group-text">过滤条件</span>
|
||||
</div>
|
||||
<input class="form-control" type="text" />
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-primary" type="button">查询</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" id="userForm"></div>
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
@ -172,4 +172,13 @@ $(function () {
|
|||
$nestMenu.find('[data-category="1"]').removeClass('d-none');
|
||||
}
|
||||
});
|
||||
|
||||
// 用户列表过滤
|
||||
var $userFilter = $('#useFilter').on('input', 'input', function (e) {
|
||||
var userName = $(this).val();
|
||||
$userFilter.next().find('.checkbox-label').each(function (index, element) {
|
||||
if ($(element).text().toLocaleLowerCase().indexOf(userName.toLocaleLowerCase()) === -1) $(element).parents(".form-group").hide();
|
||||
else $(element).parents(".form-group").show();
|
||||
});
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue