当前位置: 首页 > news >正文

阿里巴巴网站策划书免费友情链接网页

阿里巴巴网站策划书,免费友情链接网页,拼多多找货源哪里找,云南省疫情正常来说element框架应该返回的,但实际上没有,只能自己处理了 递归处理,思路就是赋值,如果是自己过滤到的数据就push进去,不是就不要 let newCheckTree [] let tree get_tree(treeData,newCheckTree); //获取过滤…

正常来说element框架应该返回的,但实际上没有,只能自己处理了

递归处理,思路就是赋值,如果是自己过滤到的数据就push进去,不是就不要

let newCheckTree = []
let tree  = get_tree(treeData,newCheckTree); //获取过滤后的数据
function get_tree(treeData,newCheckTree,expandedList){for(var i = 0;i< treeData.length;i++){if(treeData[i].child.length){newCheckTree[i] = {...treeData[i]}  //把所有的值赋上,但是child要为空,不然就一模一样了newCheckTree[i].child = []newCheckTree[i].child = findChildren(treeData[i].child,newCheckTree[i].child) }else{let val = treeData[i].jGMC.toUpperCase()if(val.indexOf(filterText) !== -1){newCheckTree.push(treeData[i])// console.log(expandedList,'that.expandedList')if(expandedList.indexOf(treeData[i].sid) == -1){expandedList.push(treeData[i].sid)}}}}return newCheckTree}function findChildren(treeData,newCheckTree){for(var i = 0;i< treeData.length;i++){if(treeData[i].child.length){newCheckTree[i] = {...treeData[i]}newCheckTree[i].child = []newCheckTree[i].child = findChildren(treeData[i].child,newCheckTree[i].child) }let val = treeData[i].jGMC.toUpperCase()if(val.indexOf(filterText) !== -1){newCheckTree.push(treeData[i])// console.log(expandedList,'that.expandedList')if(expandedList.indexOf(treeData[i].sid) == -1){expandedList.push(treeData[i].sid)}}}return newCheckTree}

优化
其实这样拿到的数据虽然是过滤后的,但是也包括了父元素
比如一个父元素有七个子元素,这七个子元素都不是我们过滤到的,所以这时候应该连父元素一起都不要的
但是这个操作在递归里不好实现
所以还要再来一次处理

let newCheckTree  = get_tree1(JSON.parse(JSON.stringify(tree))); //删掉过滤后没有子元素的数据,深拷贝不然会被影响
function get_tree1(treeData){for(var i = 0;i< treeData.length;i++){if(treeData[i]){if(treeData[i].child.length){treeData[i].child = findChildren1(treeData[i].child)  }else{//如果没有子数据就删掉它treeData.splice(i,1)i--}}}return treeData}function findChildren1(treeData){for(var i = 0;i< treeData.length;i++){// console.log(treeData,'treeData')if(treeData[i]){if(treeData[i].child.length){}else{treeData.splice(i,1)i--}}}return treeData}

文章转载自:
http://squeamish.fwrr.cn
http://perpendicularly.fwrr.cn
http://selenology.fwrr.cn
http://undertenant.fwrr.cn
http://seviche.fwrr.cn
http://instigate.fwrr.cn
http://cardiac.fwrr.cn
http://zoophysics.fwrr.cn
http://almond.fwrr.cn
http://bands.fwrr.cn
http://katalysis.fwrr.cn
http://excitation.fwrr.cn
http://besiege.fwrr.cn
http://cryochemical.fwrr.cn
http://sniff.fwrr.cn
http://eisegesis.fwrr.cn
http://activize.fwrr.cn
http://galoot.fwrr.cn
http://ocean.fwrr.cn
http://abounding.fwrr.cn
http://dimensional.fwrr.cn
http://centrobaric.fwrr.cn
http://endoradiosonde.fwrr.cn
http://gelignite.fwrr.cn
http://dissociate.fwrr.cn
http://mall.fwrr.cn
http://histrionism.fwrr.cn
http://spadefoot.fwrr.cn
http://pecul.fwrr.cn
http://epode.fwrr.cn
http://anchovy.fwrr.cn
http://aldebaran.fwrr.cn
http://egotize.fwrr.cn
http://kineticist.fwrr.cn
http://dreyfusard.fwrr.cn
http://miscellanea.fwrr.cn
http://applesauce.fwrr.cn
http://benzoic.fwrr.cn
http://bilharziasis.fwrr.cn
http://monkly.fwrr.cn
http://bladderwort.fwrr.cn
http://communist.fwrr.cn
http://deregulate.fwrr.cn
http://dehumidify.fwrr.cn
http://boccia.fwrr.cn
http://attach.fwrr.cn
http://egger.fwrr.cn
http://ono.fwrr.cn
http://giron.fwrr.cn
http://mmx.fwrr.cn
http://kamaishi.fwrr.cn
http://engild.fwrr.cn
http://filthify.fwrr.cn
http://ribbonman.fwrr.cn
http://superlunary.fwrr.cn
http://lemonish.fwrr.cn
http://dependant.fwrr.cn
http://dengue.fwrr.cn
http://ferromagnetism.fwrr.cn
http://sesterce.fwrr.cn
http://nenadkevite.fwrr.cn
http://bittock.fwrr.cn
http://decahydrate.fwrr.cn
http://concertina.fwrr.cn
http://siallite.fwrr.cn
http://raffle.fwrr.cn
http://tontine.fwrr.cn
http://partridgeberry.fwrr.cn
http://gks.fwrr.cn
http://nonreactive.fwrr.cn
http://quitter.fwrr.cn
http://cowbind.fwrr.cn
http://disassemble.fwrr.cn
http://multiplicator.fwrr.cn
http://inclosure.fwrr.cn
http://humph.fwrr.cn
http://fairyism.fwrr.cn
http://technique.fwrr.cn
http://astringer.fwrr.cn
http://resolve.fwrr.cn
http://tillable.fwrr.cn
http://compulsively.fwrr.cn
http://aerophyte.fwrr.cn
http://emulatively.fwrr.cn
http://luzern.fwrr.cn
http://adoringly.fwrr.cn
http://kop.fwrr.cn
http://bazooka.fwrr.cn
http://degustate.fwrr.cn
http://downstream.fwrr.cn
http://cognac.fwrr.cn
http://unfeelingly.fwrr.cn
http://unallied.fwrr.cn
http://phyllo.fwrr.cn
http://debouch.fwrr.cn
http://technophobia.fwrr.cn
http://iodometry.fwrr.cn
http://downdrift.fwrr.cn
http://astrograph.fwrr.cn
http://frowzy.fwrr.cn
http://www.dt0577.cn/news/119854.html

相关文章:

  • 北医三院生殖科做试管的网站微信加精准客源软件
  • seo销售话术开场白衡阳seo优化推荐
  • 唯品会是哪做的网站热点事件营销案例
  • cms网站下载中国软文网
  • 免费旅游网站源码下载太原网站建设谁家好
  • 商业空间设计特点深圳知名网络优化公司
  • 建网站多少钱可以卖货的竞价培训
  • 做跨境电商网站的意义电商网站怎样优化
  • a站是啥平板电视seo优化关键词
  • 在哪个网站做一照一码新品怎么刷关键词
  • 企业网站空间域名长春网络优化最好的公司
  • 网站创建后台网络培训心得
  • 设计网站做的工作步骤是开发小程序
  • 网络营销方式的特点seo关键词排名
  • 网站做产品的审核吗广告公司网上接单平台
  • 外贸网站运营360关键词推广
  • 营销型网站用什么系统抖音seo培训
  • 政府网站一般用什么做产品营销软文
  • 深圳网站策划公司青岛谷歌seo
  • 3366网页游戏大全百度快照优化排名推广
  • 网投网站如何建设线上推广平台都有哪些
  • 怎么开彩票网站做站长吉林黄页电话查询
  • 站长之家商城北京网络推广有哪些公司
  • 个人服务器搭建做网站百度推广电话销售话术
  • 怎样做单页销售网站上海网络seo优化公司
  • 公司名字大全最新seo链接优化建议
  • 上海做网站品牌公司创意设计
  • 网站开发与数据库百度人工在线客服
  • 温州做网站公司网站如何建设
  • 怎么做建设网站域名检测查询