Blogger Information
Blog 47
fans 0
comment 2
visits 102680
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
两级普通list转树形结构
拾一枝樱花的博客
Original
613 people have browsed it
  1. toCascader (ary) {
  2. const array = []
  3. ary.map(item => {
  4. const obj = {}
  5. obj.value = item.className
  6. obj.label = item.className
  7. obj.children = []
  8. item.fieldNamelist.map(field => {
  9. const f = {}
  10. f.value = field
  11. f.label = field
  12. obj.children.push(f)
  13. })
  14. array.push(obj)
  15. })
  16. return array
  17. }
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post