修改BUG:jQuery升级导致设置checkbox是否选中prop方法失效,改用attr

This commit is contained in:
Argo-MacBookPro 2018-09-09 01:59:43 +08:00
parent d2784fec55
commit 408dca0eb4
1 changed files with 2 additions and 2 deletions

View File

@ -61,10 +61,10 @@
$btnSubmitMenu.data('type', 'menu');
// set checkbox status
var menus = $nestMenu.find('input:checkbox');
menus.removeProp('checked');
menus.attr('checked', false);
$.each(result, function (index, item) {
var selector = $.format('[value={0}]', item.Id);
menus.filter(selector).prop('checked', 'checked');
menus.filter(selector).attr('checked', true);
});
$dialogSubMenu.show();
$dialogMenu.modal('show');