fish-ui icon indicating copy to clipboard operation
fish-ui copied to clipboard

Cascader组件有个BUG

Open walirt opened this issue 4 years ago • 0 comments
trafficstars

https://github.com/myliang/fish-ui/blob/24864023a384db9cdbf2ddecc90bc97b820a5196/src/components/Cascader.vue#L98-L116
当Cascader有初始值的时候不会显示, 因为parseSelectedItems函数的while循环里面使用了for ... in ..., for ... in ...返回的是索引, 修改成for ... of ... 之后就没有问题了👇

           for (let ele of os) { 
             if (this.value[vIndex] === ele[0]) { 
               ret.push(ele) 
               os = this.itemChildren(ele) 
               break 
             } 
           } 

walirt avatar Jun 29 '21 08:06 walirt