更新时间:2019-10-29 00:01:20
调用数据为json格式,配置方便。
我给你写个默认选中函数
let bbb = $('.select-tree-wrap').comboTree({ source: selectDatas, isMultiple: true, isFirstClassSelectable: false, //第一级是否可选 cascadeSelect: true, selectedlength: 100 //最多可选 }); // bbb.datas(); //获取数据 let ids = ['73At4FDoFFC', "73At4FpAFFC"] selected(bbb, ids) function selected(ele, ids) { for (var i = 0; i < ids.length; i++) { let id = ids[i] ele.checkrow($(`div[data-id=${id}]`), id, false) } }