hnzzmsf/layui-formSelects

移除多级联动的某个选项,方法貌似有错误

Opened this issue · 0 comments

Common.prototype.linkageDel = function(id, val){ let dl = $(dl[xid="${id}"]); let vs = val.value.split('/'); let pid, li, index = vs.length - 1; do{ pid = vs[index]; li = dl.find(.xm-select-linkage-group${index + 1} li[xm-value="${pid}"]); if(!li.parent().next().find(li[pid=${pid}].xm-select-this).length){ li.removeClass('xm-select-this'); } index --; }while(li.length && pid != undefined); }

这里应该是 li[pid="${pid}"],
或者是将pid= vs[index]改为pid= vs[index-1]

个人微信号:cuimoman
望探讨