Browse Source

修复 radio 标题模板中若存在图标,选中时该图标被强制更改的问题

pull/1307/head
贤心 1 year ago
parent
commit
4f3b9f68e7
  1. 4
      src/modules/form.js

4
src/modules/form.js

@ -807,12 +807,12 @@ layui.define(['lay', 'layer', 'util'], function(exports){
var next = $(this).next('.' + CLASS);
this.checked = false;
next.removeClass(CLASS + 'ed');
next.find('.layui-icon').removeClass(ANIM + ' ' + ICON[0]).addClass(ICON[1]);
next.children('.layui-icon').removeClass(ANIM + ' ' + ICON[0]).addClass(ICON[1]);
});
radio[0].checked = true;
reElem.addClass(CLASS + 'ed');
reElem.find('.layui-icon').addClass(ANIM + ' ' + ICON[0]);
reElem.children('.layui-icon').addClass(ANIM + ' ' + ICON[0]);
layui.event.call(radio[0], MOD_NAME, 'radio('+ filter +')', {
elem: radio[0],

Loading…
Cancel
Save