vue+element:tree 树状选择插件更改样式

                <!-- 树状结构图 -->
                <el-tree
                  :data="partmentdate"
                  :props="defaultProps"
                  @node-click="handleNodeClick2"
                  highlight-current="true"
                  default-expand-all
                ></el-tree></div

可以更改默认样式:

背景色-选中后的显示
>>> .el-tree-node:focus>.el-tree-node__content {
  background-color: #5daaf0;
}
 鼠标移动上去效果
>>> .el-tree-node__content {
  &:hover {
    // background: #89c2f7; 
    background: #eff7ff;
  }
}

具体字体样式修改:

>>> .el-tree-node__label {
  width: auto;
  margin-top: 12px;
  font-size: 18px;
  color: #999;
  line-height: 35px;
  height:50px;
  letter-spacing: 1px;
}

posted @ 2021-07-21 16:46  少哨兵  阅读(2174)  评论(0编辑  收藏  举报