Element UI组件Cascader 级联选择器 最后一级children为0时bug
我的4级组织机构,后台返回的数据,最后一层有children,但是没有数据。Cascader bug,最后一层会显示一个空的面板。
因此只能手动处理,最后一层children = undefined;
//4层组织机构,最后一级children数量为零的空旷bug。 let nums = this.organizationList.length; for(var i = 0; i < nums; i++){ for(var i2 = 0; i2 < this.organizationList[i].children.length; i2++){ for(var i3 = 0; i3 < this.organizationList[i].children[i2].children.length; i3++){ for(var i4 = 0; i4 < this.organizationList[i].children[i2].children[i3].children.length; i4++){ if(this.organizationList[i].children[i2].children[i3].children[i4].children <= 0){ this.organizationList[i].children[i2].children[i3].children[i4].children = undefined; } } } } }
相关推荐
wikiwater 2020-10-27
IdeaElements 2020-08-19
Sophiego 2020-08-16
Kakoola 2020-08-01
Kakoola 2020-07-29
ELEMENTS爱乐冬雨 2020-07-18
ELEMENTS爱乐小超 2020-07-04
ELEMENTS爱乐小超 2020-07-04
Kakoola 2020-06-28
Feastaw 2020-06-18
Wmeng0 2020-06-14
ELEMENTS爱乐冬雨 2020-06-14
云之高水之远 2020-06-14
哈喽elements 2020-06-14
Feastaw 2020-06-11