elementUI表格二级目录展示,自定义图标展开与收起

elementUI表格二级目录展示,自定义图标展开与收起,第1张

收起:

展开:

 

followListData数据格式: 

 

 


        
          
        
        
          
        
        
        
        
        
        
        
         
         
         
        
          
        
      
methods:{
  tableRowClassName() {
      return 'rowBg'
    },
    expend(row) {
      const $table = this.$refs.table
      this.followListData.map((item) => {
        if (row.followUpId !== item.followUpId) {
          $table.toggleRowExpansion(item, false)
          item.expansion = false
        } else {
          item.expansion = !item.expansion
        }
      })
      $table.toggleRowExpansion(row)
    },

}

 

.followStyl {
  ::v-deep .el-drawer {
    width: 900px !important;
  }
  ::v-deep .el-drawer::-webkit-scrollbar {
    display: none !important;
  }
  ::v-deep .el-drawer__header {
    padding: 16px 24px;
    margin-bottom: 0;
    .followTitle {
      font-size: 20px;
      color: #000;
      font-weight: 700;
      text-align: left;
    }
  }
  ::v-deep .el-drawer__body {
    padding: 16px 24px;
  }
  ::v-deep .el-table__expand-column .cell {
    display: none;
  }
  ::v-deep .el-table .rowBg {
    background: #eee;
    box-shadow: inset 0 0 0 0 rgba(0, 0, 0, 0.5);
  }
  ::v-deep .has-gutter th .cell {
    color: #212631;
    font-size: 14px;
    font-weight: 700;
  }
  ::v-deep .el-drawer__body::-webkit-scrollbar {
    display: none;
  }
  ::v-deep .el-table__body-wrapper {
    max-height: 600px;
    overflow: auto;
  }
  ::v-deep .el-table__body-wrapper::-webkit-scrollbar {
    display: none;
  }
}

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1320210.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-11
下一篇 2022-06-11

发表评论

登录后才能评论

评论列表(0条)

保存