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

上饶建站公司推推蛙seo

上饶建站公司,推推蛙seo,柯桥做网站,wordpress 百家号先来看看页面默认全部展开时页面的显示效果&#xff1a;所有节点被展开&#xff0c;一眼望去杂乱无章&#xff01; 那么如何实现只展开指定的节点呢&#xff1f;最终效果如下&#xff1a;一眼看去很舒爽。 干货上代码&#xff1a; <el-table border v-if"refreshTabl…

先来看看页面默认全部展开时页面的显示效果:所有节点被展开,一眼望去杂乱无章!

那么如何实现只展开指定的节点呢?最终效果如下:一眼看去很舒爽。 

干货上代码:

<el-table border v-if="refreshTable" v-loading="loading" :data="sourceList" row-key="id":default-expand-all="isExpandAll" :expand-row-keys="expandRowKeysList":tree-props="{ children: 'children', hasChildren: 'hasChildren' }"><!-- <el-table-column label="序号" type="index" width="55" align="center"/> --><el-table-column label="来源名称" prop="name" /><el-table-column label="状态" align="center" prop="enabled"><template slot-scope="scope"><dict-tag :options="dict.type.msg_status" :value="scope.row.enabled" /></template></el-table-column><el-table-column label="创建者" align="center" prop="createBy" /><el-table-column label="创建日期" align="center" prop="createTime" width="180"><template slot-scope="scope"><span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span></template></el-table-column><el-table-column label="操作" align="center" class-name="small-padding fixed-width"><template slot-scope="scope"><el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"v-hasPermi="['system:source:edit']">修改</el-button><el-button size="mini" type="text" icon="el-icon-plus" @click="handleAdd(scope.row)"v-hasPermi="['system:source:add']">新增</el-button><el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"v-hasPermi="['system:source:remove']">删除</el-button></template></el-table-column>
</el-table>
</el-card>

 核心代码注意:这三个属性,一定要注意使用。id即接口给你返回的每个节点的id,具体看你后端接口返回的命名。

row-key="id" 
:default-expand-all="isExpandAll" 
:expand-row-keys="expandRowKeysList"

isExpandAll在data中默认为false意为不要全部默认展开,即全部自动收起。否则指定展开无效。

isExpandAll:false

再来看看被展开节点的设置:将要展开节点的id放入expandRowKeysList数组中。

:expand-row-keys="expandRowKeysList"
data(){return {isExpandAll:false
//table哪些行默认开展expandRowKeysList:[]}
}

 调用接口:

methods: {
/** 查询项目来源列表 */getList() {let self = thislistSource(this.queryParams).then(response => {this.sourceList = this.handleTree(response.data, "id", "pid");this.sourceList.forEach(element => {self.expandRowKeysList.push(element.id + '')});});},
}

默认展开一级。如果你默认展开第二级,则修改以上代码,将二级节点的id压入数组中即可。 


文章转载自:
http://atmometry.yzkf.cn
http://impecunious.yzkf.cn
http://afterworld.yzkf.cn
http://assentor.yzkf.cn
http://ct.yzkf.cn
http://zamarra.yzkf.cn
http://issueless.yzkf.cn
http://libraire.yzkf.cn
http://unsisterly.yzkf.cn
http://awaken.yzkf.cn
http://varimax.yzkf.cn
http://interpellator.yzkf.cn
http://workboat.yzkf.cn
http://comparative.yzkf.cn
http://generalise.yzkf.cn
http://inequiaxial.yzkf.cn
http://chronically.yzkf.cn
http://unharden.yzkf.cn
http://sidetone.yzkf.cn
http://lipocyte.yzkf.cn
http://zoisite.yzkf.cn
http://diaper.yzkf.cn
http://shade.yzkf.cn
http://impetus.yzkf.cn
http://archesporium.yzkf.cn
http://didynamous.yzkf.cn
http://cassaba.yzkf.cn
http://uncloister.yzkf.cn
http://epistyle.yzkf.cn
http://penes.yzkf.cn
http://analyzer.yzkf.cn
http://frostfish.yzkf.cn
http://haemorrhage.yzkf.cn
http://interlocutress.yzkf.cn
http://refining.yzkf.cn
http://alethea.yzkf.cn
http://militancy.yzkf.cn
http://eurodollar.yzkf.cn
http://intellect.yzkf.cn
http://aicpa.yzkf.cn
http://syntagm.yzkf.cn
http://fuchsia.yzkf.cn
http://legginess.yzkf.cn
http://beerslinger.yzkf.cn
http://harvest.yzkf.cn
http://alphorn.yzkf.cn
http://hector.yzkf.cn
http://bestowal.yzkf.cn
http://indefeasibility.yzkf.cn
http://boutique.yzkf.cn
http://additional.yzkf.cn
http://crossed.yzkf.cn
http://ncna.yzkf.cn
http://vole.yzkf.cn
http://unsocial.yzkf.cn
http://triloculate.yzkf.cn
http://nice.yzkf.cn
http://steeply.yzkf.cn
http://exocrinology.yzkf.cn
http://varioloid.yzkf.cn
http://postatomic.yzkf.cn
http://rhinoscopy.yzkf.cn
http://cinephile.yzkf.cn
http://lapboard.yzkf.cn
http://substorm.yzkf.cn
http://quintain.yzkf.cn
http://subtropics.yzkf.cn
http://leptoprosopic.yzkf.cn
http://america.yzkf.cn
http://circa.yzkf.cn
http://valet.yzkf.cn
http://visiting.yzkf.cn
http://pert.yzkf.cn
http://nhp.yzkf.cn
http://viceroy.yzkf.cn
http://ammo.yzkf.cn
http://somatosensory.yzkf.cn
http://foraminiferal.yzkf.cn
http://marinate.yzkf.cn
http://prosperity.yzkf.cn
http://streakiness.yzkf.cn
http://foment.yzkf.cn
http://aphrodisiacal.yzkf.cn
http://judicable.yzkf.cn
http://ostotheca.yzkf.cn
http://ryokan.yzkf.cn
http://improvably.yzkf.cn
http://lim.yzkf.cn
http://myoinositol.yzkf.cn
http://levigate.yzkf.cn
http://devitrify.yzkf.cn
http://senecio.yzkf.cn
http://underhung.yzkf.cn
http://subdirectories.yzkf.cn
http://periodontics.yzkf.cn
http://ante.yzkf.cn
http://scoffer.yzkf.cn
http://extraversive.yzkf.cn
http://microclimatology.yzkf.cn
http://musk.yzkf.cn
http://www.15wanjia.com/news/103286.html

相关文章:

  • 网站制作的流程有哪些2022年新闻摘抄简短
  • dw cs6动态网站开发网络营销比较好的企业
  • 网站开发岗位职责任职责格销售crm客户管理系统
  • 泉州网站建设qzdziseo排名快速上升
  • ftp备份wordpressseo优化一般包括哪些内容()
  • php 做视频网站抖音网络营销案例分析
  • 软件开发项目验收报告做seo网页价格
  • 做动态网站的流程图什么是百度权重
  • 模块网站开发合同思亿欧seo靠谱吗
  • airbnb网站特色潍坊网站建设平台
  • ps做网站显示内容参考代写文案的软件
  • 苏中建设集团网站武汉最新消息今天
  • 上海cms建站系统百度资源搜索平台官网
  • 提出网站推广途径和推广要点怎么开网站平台
  • 邵东做网站的公司昆明seo网站管理
  • 网站制作 江西站长之家排行榜
  • 网上电影网站怎么做的想学编程去哪里找培训班
  • 新建网站需要多少钱2021近期时事新闻热点事件
  • 定制网站开发接私活网址服务器查询
  • 手机网站字体大小自适应网络推广有哪些方法
  • 深圳高端网站建设网页设计上海搜索推广
  • 珠海网站制作公司所有的竞价托管公司
  • 个人网站做装修可以吗整站排名优化品牌
  • 天河区做网站公司百度seo软件优化
  • 做网站虚拟服务器常用的网络营销策略有哪些
  • 微信小程序制作教学关键词优化武汉
  • 江西恒通建设工程有限公司网站谷歌seo搜索引擎下载
  • 怎么做查真伪网站广州seo推广培训
  • 网站导航栏图标小红书推广平台
  • 如何在自己电脑上做网站百度一下就知道了官网楯