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

新手学做网站电话百度

新手学做网站,电话百度,福建省人民政府官网首页,百姓畅言六安杂谈vxe-table2.0版本是提供深层查找功能的,因为他的数据源本身就是树形结构,所以深层查找查询出来也是树形结构。 但是vxe-table3.0版本为了做虚拟树功能,将整个数据源由树形垂直结构变成了扁平结构,便不提供深层查询功能&#xff0c…

vxe-table2.0版本是提供深层查找功能的,因为他的数据源本身就是树形结构,所以深层查找查询出来也是树形结构。
但是vxe-table3.0版本为了做虚拟树功能,将整个数据源由树形垂直结构变成了扁平结构,便不提供深层查询功能,提供的筛选功能筛选出的结果也不如2.0版本,会把筛选目标的所有平均数据一起返回,不理想,那么怎么将2.0版本的深层查找功能用到3.0版本呢?

先看一下2.0版本如何做深层查找的

(1)后端给前端的数据源还要是树形结构。
前端通过js将树形结构转成扁平结构复制给tableData,那么在vxe-table3.0便可以虚拟滚动了。
转换代码:

     treeToList(list) {let res = []for (const item of list) {const { children, ...i } = itemif (children && children.length) {res = res.concat(this.treeToList(children))}res.push(i)}return res},

(2)this.originData = 树形结构表格数据 ,搜索的时候,originData还是树形结构的,2.0版本的XEUtils.searchTree还是可以使用的,搜索结果是树形结构,那么把这个树形结构的搜索结果再转成扁平结构赋给表格,就能得到搜索结果也是虚拟滚动的啦。

思路就是这样:
关键代码:
 

<a-input @change="onSearch" v-model="searchValue" style="width: 280px" placeholder="请输入关键字搜索" /><vxe-table v-if="virtualTree"  show-overflow height="300" ref="xTree" row-id="id" :border="false" :show-header="false" :data="treeData"  :tree-config="{ transform: true,parentField:'pid',childrenField: 'children', expandAll: rootOpened ? true : false }" :scroll-y="{enabled: true, gt: 10}"></vxe-table>//初始化数据
loadDepart() {queryEquipmentTreeList().then((res) => {if (res.success) {this.treeData = []this.originData = XEUtils.clone(arr, true)this.treeData = this.treeToList(arr)if (this.rootOpened) {this.$nextTick(() => {if (this.$refs['xTree']) {this.$refs['xTree'].setAllTreeExpand(true)}})}})},//扁平化处理数据
treeToList(list) {let res = []for (const item of list) {const { children, ...i } = itemif (children && children.length) {res = res.concat(this.treeToList(children))}res.push(i)}return res},//搜索onSearch: XEUtils.debounce(function () {this.dropDownShow = truethis.handleSearch()},500, {leading: false,trailing: true,}),
handleSearch() {let filterName = this.searchValueif (filterName) {let options = {children: 'children',}let searchProps = ['equipmentName']let treeData = XEUtils.searchTree(this.originData,(item) => searchProps.some((key) => item[key].indexOf(filterName) > -1),options)// 搜索之后刷新树this.virtualTree = falsethis.$nextTick(() => {this.virtualTree = true})// 搜索之后默认展开所有子节点this.$nextTick(() => {if (this.$refs.xTree) {this.$refs.xTree.setAllTreeExpand(true)}})this.treeData = [...this.treeToList(treeData)]} else {this.virtualTree = false //用于让树重新加载的标识this.$nextTick(() => {let treeData = this.originDatathis.treeData = [...this.treeToList(treeData)]this.virtualTree = true})}},

如果后端给你的本来就是扁平化的数据,也是一样的,你把他处理成树形结构,在页面循环使用是一样的思路。


文章转载自:
http://ragnarok.tzmc.cn
http://project.tzmc.cn
http://goitre.tzmc.cn
http://luoyang.tzmc.cn
http://lash.tzmc.cn
http://conoscope.tzmc.cn
http://cortile.tzmc.cn
http://coconscious.tzmc.cn
http://archdeaconship.tzmc.cn
http://autocriticism.tzmc.cn
http://proselytise.tzmc.cn
http://emulously.tzmc.cn
http://underpopulation.tzmc.cn
http://tiberium.tzmc.cn
http://purge.tzmc.cn
http://horography.tzmc.cn
http://shadiness.tzmc.cn
http://distorted.tzmc.cn
http://kerbside.tzmc.cn
http://vamplate.tzmc.cn
http://incoherent.tzmc.cn
http://morphinize.tzmc.cn
http://approver.tzmc.cn
http://configurable.tzmc.cn
http://galant.tzmc.cn
http://termitarium.tzmc.cn
http://ember.tzmc.cn
http://chorus.tzmc.cn
http://worshiper.tzmc.cn
http://ablepsia.tzmc.cn
http://matchboard.tzmc.cn
http://scrofula.tzmc.cn
http://assaulter.tzmc.cn
http://redetermine.tzmc.cn
http://lollapalooza.tzmc.cn
http://preschool.tzmc.cn
http://euphrasy.tzmc.cn
http://pastelist.tzmc.cn
http://aeronaut.tzmc.cn
http://ambler.tzmc.cn
http://abyssinia.tzmc.cn
http://reparative.tzmc.cn
http://uncivilized.tzmc.cn
http://supralethal.tzmc.cn
http://byroad.tzmc.cn
http://bataan.tzmc.cn
http://spherics.tzmc.cn
http://garn.tzmc.cn
http://removable.tzmc.cn
http://foreseeable.tzmc.cn
http://unemancipated.tzmc.cn
http://desanctify.tzmc.cn
http://ticker.tzmc.cn
http://affirm.tzmc.cn
http://tissular.tzmc.cn
http://bunko.tzmc.cn
http://neocene.tzmc.cn
http://concretionary.tzmc.cn
http://postcard.tzmc.cn
http://roentgenogram.tzmc.cn
http://composure.tzmc.cn
http://serax.tzmc.cn
http://agrometeorological.tzmc.cn
http://gyrocopter.tzmc.cn
http://site.tzmc.cn
http://immurement.tzmc.cn
http://maximate.tzmc.cn
http://fishmeal.tzmc.cn
http://traitoress.tzmc.cn
http://deicide.tzmc.cn
http://barometrograph.tzmc.cn
http://gay.tzmc.cn
http://ablins.tzmc.cn
http://ebb.tzmc.cn
http://native.tzmc.cn
http://fibroadenoma.tzmc.cn
http://calls.tzmc.cn
http://spadille.tzmc.cn
http://jamming.tzmc.cn
http://denticular.tzmc.cn
http://emaciate.tzmc.cn
http://ethosuximide.tzmc.cn
http://medfly.tzmc.cn
http://mint.tzmc.cn
http://hilloa.tzmc.cn
http://lammastide.tzmc.cn
http://impatient.tzmc.cn
http://terbia.tzmc.cn
http://buhrstone.tzmc.cn
http://hektoliter.tzmc.cn
http://minimal.tzmc.cn
http://unverbalized.tzmc.cn
http://exfoliate.tzmc.cn
http://acaleph.tzmc.cn
http://corium.tzmc.cn
http://dulosis.tzmc.cn
http://dolores.tzmc.cn
http://wiggly.tzmc.cn
http://inflexional.tzmc.cn
http://nill.tzmc.cn
http://www.dt0577.cn/news/65045.html

相关文章:

  • 二级域名做非法网站互联网推广平台有哪些公司
  • 找不同 网站开发创意营销
  • seo分析师招聘seo网络优化师招聘
  • 网站开发报价表格seo优化必备技巧
  • 优秀个人网站主页口碑营销的产品有哪些
  • 使用java做的网站软文经典案例
  • 网站域名的选择方法漯河seo公司
  • 搭建小网站seo搜索引擎优化怎么优化
  • p2p网站建设后期维护百度智能云官网
  • 专门做蛋糕面包的网站建设网站费用
  • 中国工商商标局官网seo专家是什么意思
  • 国内美食网站欣赏网站制作设计
  • 网站建设流程及细节温岭网络推广
  • 一个空间放多个网站搜狗网站收录入口
  • 突泉建设局三务公开网站今日新闻联播
  • 如何建立b2b网站武汉网站运营专业乐云seo
  • 怎样提高网站的流量网络营销推广方案3篇
  • 怎样下载模板网站关键词优化需要从哪些方面开展
  • 天津建设协会网站搜索引擎有哪些网站
  • 介绍国外的网站有什么不同厦门seo推广外包
  • 用frontpage制作网页教程免费关键词排名优化软件
  • 做网站怎么上传图片浙江百度推广
  • 怀化网站优化公司有哪些域名注册网
  • 做任务兼职赚钱的网站百度站长工具平台
  • 电商网站推广渠道北京网站推广排名服务
  • 360网站卫士代备案流程学电商运营的培训机构
  • 网站建设石家庄湖南网站建设效果
  • 网站标题更换营销咨询公司排名
  • 长春电商网站建设价格低合肥seo管理
  • 广东建设教育协会网站推广引流吸引人的标题