Browse Source

Update transfer.js

按照 options.value 顺序排列右侧数据
pull/1235/head
charwin 2 years ago committed by GitHub
parent
commit
2904dc9535
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      src/modules/transfer.js

9
src/modules/transfer.js

@ -214,7 +214,14 @@ layui.define(['laytpl', 'form'], function(exports){
,listElem = ['<li>' ,listElem = ['<li>'
,'<input type="checkbox" name="'+ arr[_index].checkName +'" lay-skin="primary" lay-filter="layTransferCheckbox" title="'+ item.title +'"'+ (item.disabled ? ' disabled' : '') + (item.checked ? ' checked' : '') +' value="'+ item.value +'">' ,'<input type="checkbox" name="'+ arr[_index].checkName +'" lay-skin="primary" lay-filter="layTransferCheckbox" title="'+ item.title +'"'+ (item.disabled ? ' disabled' : '') + (item.checked ? ' checked' : '') +' value="'+ item.value +'">'
,'</li>'].join(''); ,'</li>'].join('');
arr[_index].views.push(listElem); //按照options.value顺序排列右侧数据
if(_index){
for(let key in options.value) {
if(options.value[key] == item.value && item.selected) arr[_index].views[key] = listElem;
}
}else{
arr[_index].views.push(listElem);
}
delete item.selected; delete item.selected;
}); });

Loading…
Cancel
Save