maycur-business
Version:
maycur business react components of web
205 lines (179 loc) • 5.09 kB
text/less
@import "../../../style/variables.less";
.@{prefix}-selectable-tree-view {
border-radius: 0;
position: relative;
.node {
&.disabled {
display: none;
.node-label {
> .fm {
color: @gray-text-color;
}
> .name {
color: @gray-text-color;
}
}
}
&.new {
.node-label {
.node-btns {
.ant-btn {
display: none;
}
.delete-btn {
display: inline-block;
}
}
}
}
&.drag-over {
&.category {
.ant-tree-node-selected {
background-color: @maycur-color ;
}
.ant-tree-node-content-wrapper {
.node-label {
.fm {
color: #fff;
}
}
}
}
&.new,
&.leaf {
> span[draggable] {
background-color: transparent;
color: @primary-font-color;
opacity: 1;
}
.node-label {
> .fm {
color: @maycur-color;
}
}
}
}
}
.node-label {
flex: 1 1 auto;
display: flex;
flex-direction: row;
.fm {
flex: 0 0 auto;
margin-right: 5px;
line-height: 32px;
color: @maycur-color;
}
.name {
flex: 1 1 auto;
line-height: 32px;
text-overflow: ellipsis;
overflow: hidden;
width: 100px;
white-space: nowrap;
> span {
margin-left: 5px;
color: @warning-color;
}
}
.node-btns {
flex: 0 0 auto;
display: none;
.ant-btn {
padding: 0 8px;
border-radius: 0;
background-color: transparent;
border: none;
&:hover {
background-color: @maycur-color;
color: #fff;
.fm {
margin-right: 0;
color: #fff;
}
}
.fm {
margin-right: 0;
}
}
.delete-btn {
&:hover {
background-color: @reject-color;
.fm {
color: #fff;
}
}
}
}
&:hover {
.node-btns {
display: inline-block;
}
}
}
.ant-tree {
li {
padding: 1px 0;
.ant-tree-title {
display: flex;
}
span.ant-tree-switcher {
height: 32px;
width: 20px;
line-height: 32px;
// .anticon {
// display: none !important;
// }
&:after {
display: inline-block;
line-height: 32px;
font-size: 12px;
color: @gray-text-color;
font-family: Maycur;
content: '\e918' ;
}
&.ant-tree-switcher_open {
&:after {
transform: scale(0.9) rotate(90deg);
}
}
&.ant-tree-switcher_close {
&:after {
transform: scale(0.9) rotate(0deg);
}
}
&.ant-tree-switcher-noop {
&:after {
content: none ;
}
}
.ant-tree-switcher-icon{
display: none ;
}
}
.ant-tree-checkbox{
margin: 9px 4px 0 2px;
}
.ant-tree-checkbox-disabled{
display: none;
}
.ant-tree-iconEle {
width: 24px;
height: 32px;
line-height: 32px;
}
.ant-tree-node-content-wrapper {
color: @primary-font-color;
font-size: 14px;
padding: 0 5px;
border-radius: 0;
box-sizing: border-box;
height: 34px;
line-height: 32px;
&.ant-tree-node-selected {
background-color: @selected-background;
}
}
}
}
}