递归删除最后一级的children,解决elementj级联最后一级多出children的问题
// 过滤掉级联选择器空的childrenList
formatData (data) {
for (var i = 0; i < data.length; i++) {
if (data[i].children == null || data[i].children.length == 0) {
data[i].children = undefined;
} else if (data[i].children.length > 0) {
this.formatData(data[i].children);
}
}
return data;
},