diff --git a/src/admin/Bootstrap.Admin/Views/Shared/UserConfig.cshtml b/src/admin/Bootstrap.Admin/Views/Shared/UserConfig.cshtml index ef22b0d0..d1c0fd51 100644 --- a/src/admin/Bootstrap.Admin/Views/Shared/UserConfig.cshtml +++ b/src/admin/Bootstrap.Admin/Views/Shared/UserConfig.cshtml @@ -7,6 +7,19 @@ diff --git a/src/admin/Bootstrap.Admin/wwwroot/js/roles.js b/src/admin/Bootstrap.Admin/wwwroot/js/roles.js index f549aca8..534e980b 100644 --- a/src/admin/Bootstrap.Admin/wwwroot/js/roles.js +++ b/src/admin/Bootstrap.Admin/wwwroot/js/roles.js @@ -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(); + }); + }); }); \ No newline at end of file