elementUI树形组件添加连接线(附效果图)

2023-11-05 02:40

本文主要是介绍elementUI树形组件添加连接线(附效果图),希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

先看效果图: 

 

 

<div class="tree-container"><el-tree:data="treeData2":highlight-current="true"node-key="lc_id"default-expand-alldraggable:allow-drop="allowDrop"@node-drag-end="handleDragEnd"@node-click="handleNodeClick"class="tree"ref="tree"><template v-slot:default="{ node }"><div class="flex-tree"><div><el-icon v-show="node.data.children && node.data.children.length"><l-calendar /></el-icon>{{ node.label }}</div><div v-show="node.data.lc_id !== 'container'"><el-icon @click.stop="delNode(node)"><l-delete /></el-icon></div></div></template></el-tree></div>

/* 树形结构节点添加连线 css */
.tree .el-tree-node {position: relative;// padding-left: 16px;
}.tree .el-tree-node__children {padding-left: 16px;
}.tree .el-tree-node :last-child:before {height: 38px;
}.tree .el-tree > .el-tree-node:before {border-left: none;
}
.tree-container .el-tree > .el-tree-node:after {border-top: none;
}.tree .el-tree-node__children .el-tree-node:before {content: "";left: -4px;position: absolute;right: auto;border-width: 1px;
}.tree .el-tree-node:after {content: "";left: -4px;position: absolute;right: auto;border-width: 1px;
}
.tree .el-tree-node__expand-icon.is-leaf {display: none;
}.tree .el-tree-node:before {border-left: 1px dashed #dddddd;bottom: 0px;height: 100%;top: -26px;width: 1px;
}.tree .el-tree-node:after {border-top: 1px dashed #dddddd;height: 20px;top: 12px;width: 24px;
}
.tree .custom-tree-node {padding-left: 10px;
}

这篇关于elementUI树形组件添加连接线(附效果图)的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/346881

相关文章

Spring组件实例化扩展点之InstantiationAwareBeanPostProcessor使用场景解析

《Spring组件实例化扩展点之InstantiationAwareBeanPostProcessor使用场景解析》InstantiationAwareBeanPostProcessor是Spring... 目录一、什么是InstantiationAwareBeanPostProcessor?二、核心方法解

C++ RabbitMq消息队列组件详解

《C++RabbitMq消息队列组件详解》:本文主要介绍C++RabbitMq消息队列组件的相关知识,本文给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友参考下吧... 目录1. RabbitMq介绍2. 安装RabbitMQ3. 安装 RabbitMQ 的 C++客户端库4. A

PyQt6中QMainWindow组件的使用详解

《PyQt6中QMainWindow组件的使用详解》QMainWindow是PyQt6中用于构建桌面应用程序的基础组件,本文主要介绍了PyQt6中QMainWindow组件的使用,具有一定的参考价值,... 目录1. QMainWindow 组php件概述2. 使用 QMainWindow3. QMainW

Vue3组件中getCurrentInstance()获取App实例,但是返回null的解决方案

《Vue3组件中getCurrentInstance()获取App实例,但是返回null的解决方案》:本文主要介绍Vue3组件中getCurrentInstance()获取App实例,但是返回nu... 目录vue3组件中getCurrentInstajavascriptnce()获取App实例,但是返回n

SpringQuartz定时任务核心组件JobDetail与Trigger配置

《SpringQuartz定时任务核心组件JobDetail与Trigger配置》Spring框架与Quartz调度器的集成提供了强大而灵活的定时任务解决方案,本文主要介绍了SpringQuartz定... 目录引言一、Spring Quartz基础架构1.1 核心组件概述1.2 Spring集成优势二、J

使用Java实现通用树形结构构建工具类

《使用Java实现通用树形结构构建工具类》这篇文章主要为大家详细介绍了如何使用Java实现通用树形结构构建工具类,文中的示例代码讲解详细,感兴趣的小伙伴可以跟随小编一起学习一下... 目录完整代码一、设计思想与核心功能二、核心实现原理1. 数据结构准备阶段2. 循环依赖检测算法3. 树形结构构建4. 搜索子

Vue中组件之间传值的六种方式(完整版)

《Vue中组件之间传值的六种方式(完整版)》组件是vue.js最强大的功能之一,而组件实例的作用域是相互独立的,这就意味着不同组件之间的数据无法相互引用,针对不同的使用场景,如何选择行之有效的通信方式... 目录前言方法一、props/$emit1.父组件向子组件传值2.子组件向父组件传值(通过事件形式)方

Spring组件初始化扩展点BeanPostProcessor的作用详解

《Spring组件初始化扩展点BeanPostProcessor的作用详解》本文通过实战案例和常见应用场景详细介绍了BeanPostProcessor的使用,并强调了其在Spring扩展中的重要性,感... 目录一、概述二、BeanPostProcessor的作用三、核心方法解析1、postProcessB

kotlin中的行为组件及高级用法

《kotlin中的行为组件及高级用法》Jetpack中的四大行为组件:WorkManager、DataBinding、Coroutines和Lifecycle,分别解决了后台任务调度、数据驱动UI、异... 目录WorkManager工作原理最佳实践Data Binding工作原理进阶技巧Coroutine

Vue项目的甘特图组件之dhtmlx-gantt使用教程和实现效果展示(推荐)

《Vue项目的甘特图组件之dhtmlx-gantt使用教程和实现效果展示(推荐)》文章介绍了如何使用dhtmlx-gantt组件来实现公司的甘特图需求,并提供了一个简单的Vue组件示例,文章还分享了一... 目录一、首先 npm 安装插件二、创建一个vue组件三、业务页面内 引用自定义组件:四、dhtmlx