/**
 * @author jonasli
 * @module less预定义样式，自动生成 todo
 * @date 2020-04-22
*/
.wp100 {
    width: 100%;
}
.maw150 {
    max-width: '150px';
}
.flex-1 {
    flex: 1;
}
.ml5 {
    margin-left: 5px;
}
.pd20 {
    padding: 20px;
}
.w50 {
    width: 50px;
}

.fs14 {
    font-size: '14px';
}
.fs18 {
    font-size: '18px';
}
// 多行展示 mixin
.text-in-line {
    display: -webkit-box;
	  /*! autoprefixer: off */
    -webkit-box-orient: vertical;
    /*! autoprefixer: on */
    word-break: break-all;
    overflow: hidden;
}
.one-line {
	white-space: nowrap;
	text-overflow: ellipsis;
    overflow: hidden;
}
.three-line {
	  &:extend(.text-in-line);
    -webkit-line-clamp: 3;
}
.two-line {
	  &:extend(.text-in-line);
    -webkit-line-clamp: 2;
}





// el-tree
// 覆盖 el-tree样式 start  TODO 本文件颜色变量？
.el-tree-node__content {
    height: 30px;
    line-height: 30px;
    border-bottom: 1px dashed transparent;
    position: relative;
    .custom-tree-person + .person {
        background: #fff;
    }
    .custom-tree-right {
        position: absolute;
        right: 0;
        top: 0;
        background-color: #f0faff;
    }
}
.aui-tree-nodata {
    font-weight: 500;
    color: rgba(0,0,0,.65);
}
.aui-tree-node-hover {
    position: relative;
    background-color: #f0faff;
    color: @primary-color;
    transition: color .2s ease-in-out;
}
// 这个颜色还是很单调，建议修改为绿色，对比度高些
.el-tree-node__expand-icon {
    // 左侧三角
    &::before {
        font-size: 18px;
        font-family: element-icons !important;
        speak: none;
        font-style: normal;
        font-weight: 400;
        font-variant: normal;
        text-transform: none;
        line-height: 1;
        vertical-align: middle;
        display: inline-block;
        -webkit-font-smoothing: antialiased;
        content: "\E791";
    }
    // 右侧文件夹Icon
    &::after {
        font-size: 16px;
        color: @primary-color;
        display: inline-block;
        font-family: Ionicons!important;
        speak: none;
        font-style: normal;
        font-weight: 400;
        font-variant: normal;
        text-transform: none;
        text-rendering: auto;
        line-height: 1;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        vertical-align: middle;
        content: "\F1D3";
    }

    &.expanded {
        transform: none;
        &::before {
            transition: transform .3s ease-in-out,-webkit-transform .3s ease-in-out;
            transform: rotate(90deg);
            content: "\e791";
        }
        &::after {
            content: "\F1D1";
        }
    }
    // 默认空文件夹
    &.is-leaf {
        &::before {
            content: "\e791";
            color: transparent;
        }
        &::after {
            content: "\F1D2";
            color: @primary-color;
        }
    }
}

// 选中状态下的空文件夹
.is-current {
    .el-tree-node__expand-icon {
        &.is-leaf {
            &::before {
                content: "\e791";
                color: transparent;
            }
            &::after {
                content: "\F1D0";
            }
        }
    }
    // 激活态
    & > .el-tree-node__content {
        &:extend(.aui-tree-node-hover);
        & > .person {
             background-color: #f0faff;
        }
    }
 
    .is-focusable {
        .el-tree-node__content {
            // background-color: #fff;
            color: inherit;
            &:hover {
                &:extend(.aui-tree-node-hover);
                .custom-tree-person + .person {
                    background-color: #f0faff;
                }
            }
        }
    }
    
}
.el-tree-node__content:hover {
    &:extend(.aui-tree-node-hover);
    .custom-tree-person + .person {
        background-color: #f0faff;
    }
}
.el-tree-node:focus > .el-tree-node__content {
    background-color: #edf7ff;
}
.el-tree-node.is-drop-inner > .el-tree-node__content {
    // 默认 .el-tree-node__label,
    // 自定义 .custom-tree-node
    .custom-tree-left span {
        color: #fff;
        background-color: @primary-color;
    }
}
// 覆盖 el-tree样式 end
.aui-tree-search {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding: 13px 10px;
}
.aui-tree-iconset {
    .ivu-poptip-popper {
        min-width: 100px;
    }
}
.aui-tree-bd {
    padding-left: 3px;
    min-height: 400px;
    max-height: calc(~'100vh - 220px');
    overflow-x: hidden;
    overflow-y: auto;
    &::-webkit-scrollbar-thumb {
        background: #c2c2c2;
        border-radius: 10px;
    }
    &::-webkit-scrollbar {
        width: 3px;
        height: 17px;
        background: 0 0;
        border-radius: 9px;
    }
}
.aui-tree-sort {
    transform: rotate(90deg);
    font-size: 20px;
    cursor: pointer;
    margin-left: 5px;
}
.custom-icon {
    cursor: pointer;
    font-size: 20px;
}
.custom-tree-node {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: start;
    .aui-tree-opts-icon {
        font-size: 24px;
        display: none;
        cursor: pointer;
    }
    &:hover .aui-tree-opts-icon {
        display: inline-block;
    }
}
.custom-tree-left {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.aui-tree-icon-sorting {
    color: @primary-color;
}
.aui-tree-sorting {
    .el-tree-node__content {
        position: relative;
        border-bottom: 1px dashed #dcdee2;
        cursor: move;
    }
    .custom-tree-node {
        // 编辑时，隐藏操作栏
        .aui-tree-opts-icon {
            display: none;
        }
    }
}
