首页 > 其他分享 >element-ui el-popover实现面包屑导航展开面板

element-ui el-popover实现面包屑导航展开面板

时间:2024-04-15 14:14:16浏览次数:15  
标签:el index color bottom element radius popover ui border

效果图:

 代码:HTML部分

<el-breadcrumb separator-class="el-icon-arrow-right">
  <el-breadcrumb-item  v-for="(breadItem,index) in breadList" :key="index">
    <el-popover
      placement="bottom-start"
      popper-class="cate-popover"
      width="400"
      trigger="hover"
      :open-delay="10"
      :close-delay="10"
      @show="breadShow(index)"
      @hide="breadHide(index)">
      <div class="cate_box">
        <span v-for="i in 10" :key=i>测试生</span>
      </div>
      <el-button class="bread-pobtn" :class="{active: breadShowIndex == index}" type="text" slot="reference">{{breadItem.name}}<i class="el-icon-arrow-down"></i></el-button>
    </el-popover>
  </el-breadcrumb-item>
</el-breadcrumb>

JS部分:

breadShow(index) {
  this.breadShowIndex = index
},
breadHide() {
  this.breadShowIndex = '-1'
},

CSS部分:

.bread-pobtn{
  color: #656565;
  border: 1px solid #B0B0B0;
  padding: 0 8px;
  height: 28px;
  border-radius: 3px;
  background: #fff;
  &:hover, &.active{
    color: #052BC9 !important;
    border-bottom: 1px solid #fff;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    position: relative;
    z-index: 9999999;
    i{
      transform: rotate(180deg);
    }
  }
  i{
    transition: all 0.3s;
    font-size: 12px;
    margin-left: 3px;
  }
}
.cate-popover{
  margin-top: -1px !important;
  box-shadow: unset;
  border-radius: 3px;
  border-color: #B0B0B0;
  border-top-left-radius: 0;
  .popper__arrow{
    display: none;
  }
  .cate_box{
    display: flex;
    flex-wrap: wrap;
    span{
      width: 80px;
      height: 30px;
      line-height: 30px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      cursor: pointer;
      &:hover{
        color: #052BC9;
      }
    }
  }
}

 

标签:el,index,color,bottom,element,radius,popover,ui,border
From: https://www.cnblogs.com/gteman/p/18135817

相关文章

  • 07 Shell工具【重点】
    cut命令cut命令从文件的每一行剪切字节,字符和字段并将这些字节,字符,字段输出cut[选项参数]filename  说明:默认分隔符是制表符-f列号,提取第几列-d分隔符,按照指定分隔符分割列touchcut.txt(1)切割cut.txt第一列cut-d""-f1cut.txt(2)切割cut.txt第二列,第三......
  • thymeleaf模版引擎
    简介Thymeleaf是一个java流行的模版引擎Thymeleaf是一款现代化的服务器端Java模板引擎,适用于Web和独立应用场景。它具备处理HTML、XML、JavaScript、CSS以及纯文本的能力,其核心目标是为开发者提供一种优雅且自然的模板设计方式,使得开发者能够更加便捷地构建、创建和维护结构化且......
  • el-table-column自定义实现el-tooltip效果
    说明使用el-table-column自定义某列内容为左侧展示商品图片,右侧展示商品标题以及id,商品标题超过两行显示省略号,并且鼠标移入在上方显示完整。界面展示template...<el-table-columnlabel="商品信息"prop="title"min-width="200"><template#default="scope"><div......
  • 4. Kubernetes 之 WebUI管理 Portainer
    1.安装PortainerPortainer是一个轻量级的容器管理工具,可以用来管理Docker和Kubernetes,它提供了一个Web界面来方便我们管理容器,官方网址:https://www.portainer.io/1.使用官方提供的yaml文件安装:在master节点上安装portainer,并将其暴露在NodePort30777上kubectlap......
  • Ubuntu20.04开机黑屏左上角光标闪烁,以及移除Nvidia驱动后造成的无法启动docker容器问
      这几天系统更新,显卡驱动由525.147.05升级到了535.171.04(tested),终端运行watch-n1nvidia-smi实时显示显卡占用情况时,偶尔出现FailedtoinitializeNVML:Driver/libraryversionmismatch问题,于是将驱动切换成openkernal版本,重启后黑屏左上角光标闪烁,于是尝试使用命令......
  • 02 Shell 运算符,条件判断
    Shell运算符(1)"$((运算符))"或"$[运算符]"(2)expr+,-,\*,/,%加,减,乘,除,取余例如:①expr2+3结果:5②expr3-2结果:1③expr`expr2+3`\*4结果:20s=$[(2+3)*4] echo$s结果:20 Shell条件判断[condition]注:condition前后都要空格,条件非空即为true,[atguigu]......
  • VantUI移动端适配
    VantUI的官方设计稿是320px,而设计稿普遍是750px,所以官方推荐配合postcss-pxtorem插件使用://eslint-disable-next-lineno-undefmodule.exports={plugins:[//eslint-disable-next-lineno-undefrequire('postcss-pxtorem')({rootValue({file}){......
  • Electerm安装、配置与卸载教程(Windows版)
    Electerm是一款开源免费的终端模拟器,集终端模拟器、文件管理器、SSH远程连接、SFTP客户端等功能于一体。它可以在Windows、macOS和Linux操作系统上运行,为用户提供一个功能丰富、易于使用的终端环境。通过Electerm,用户可以在同一窗口中运行多个SSH会话,轻松管理远程服务器,并使用各......
  • Pytorch DistributedDataParallel(DDP)教程一:快速入门理论篇
    一、写在前面随着深度学习技术的不断发展,模型的训练成本也越来越高。训练一个高效的通用模型,需要大量的训练数据和算力。在很多非大模型相关的常规任务上,往往也需要使用多卡来进行并行训练。在多卡训练中,最为常用的就是分布式数据并行(DistributedDataParallel,DDP)。但是现有的......
  • element表格自带sortable属性排序错乱问题
       参考:https://blog.csdn.net/qq_40004867/article/details/129835446?spm=1001.2101.3001.6650.1&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-1-129835446-blog-126339196.235%5Ev43%5Epc_blog_bottom_relevance_base4&dept......