2019-04-30 11:11:25 +08:00
|
|
|
.#{$ns}TreeControl {
|
2020-12-21 10:08:40 +08:00
|
|
|
border: 1px solid var(--Form-input-borderColor);
|
2019-12-06 09:58:08 +08:00
|
|
|
padding: 6px 12px;
|
|
|
|
border-radius: 2px;
|
|
|
|
max-height: 300px;
|
|
|
|
overflow: auto;
|
|
|
|
|
|
|
|
&.h-full {
|
|
|
|
max-height: none;
|
|
|
|
overflow: visible;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.no-border {
|
|
|
|
border: 0;
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.#{$ns}Tree {
|
2019-12-06 09:58:08 +08:00
|
|
|
&-list,
|
|
|
|
&-sublist {
|
|
|
|
list-style: none;
|
|
|
|
padding: 0;
|
|
|
|
margin: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-sublist.is-folded {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-item {
|
2020-12-21 10:08:40 +08:00
|
|
|
line-height: var(--Tree-itemHeight);
|
2019-12-06 09:58:08 +08:00
|
|
|
position: relative;
|
|
|
|
|
|
|
|
> div {
|
|
|
|
&:hover {
|
|
|
|
text-decoration: none;
|
|
|
|
|
|
|
|
> .#{$ns}Tree-item-icons {
|
|
|
|
visibility: visible;
|
2019-05-15 16:10:20 +08:00
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
2019-11-10 11:18:22 +08:00
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
> span > svg {
|
2019-11-09 17:04:48 +08:00
|
|
|
display: inline-block;
|
|
|
|
cursor: pointer;
|
2019-12-06 09:58:08 +08:00
|
|
|
position: relative;
|
|
|
|
top: 2px;
|
|
|
|
width: px2rem(16px);
|
|
|
|
height: px2rem(16px);
|
|
|
|
margin-left: px2rem(5px);
|
|
|
|
}
|
2019-11-09 17:04:48 +08:00
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
2019-11-09 17:04:48 +08:00
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
&-rootItem {
|
2020-12-21 10:08:40 +08:00
|
|
|
line-height: var(--Tree-itemHeight);
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
2019-05-15 16:10:20 +08:00
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
&-item > div:hover > .#{$ns}Tree-item-icons,
|
|
|
|
&-rootItem > div:hover > .#{$ns}Tree-item-icons {
|
|
|
|
visibility: visible;
|
|
|
|
}
|
2019-05-15 16:10:20 +08:00
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
&-itemLabel {
|
2020-02-28 13:23:17 +08:00
|
|
|
display: flex;
|
2020-08-07 14:20:18 +08:00
|
|
|
align-items: center;
|
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
&:hover {
|
2020-12-21 10:08:40 +08:00
|
|
|
background: var(--Tree-item-onHover-bg);
|
2019-04-30 11:11:25 +08:00
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&-item-icons {
|
|
|
|
visibility: hidden;
|
|
|
|
transition: visibility 0.1s ease;
|
|
|
|
display: inline-block;
|
|
|
|
vertical-align: top;
|
2020-12-21 10:08:40 +08:00
|
|
|
height: var(--Tree-itemHeight);
|
|
|
|
line-height: var(--Tree-itemHeight);
|
2020-06-09 14:44:38 +08:00
|
|
|
padding-right: px2rem(5px);
|
2019-12-06 09:58:08 +08:00
|
|
|
|
|
|
|
> a {
|
|
|
|
display: inline-block;
|
|
|
|
vertical-align: middle;
|
2020-12-21 10:08:40 +08:00
|
|
|
margin-left: var(--gap-xs);
|
2019-12-06 09:58:08 +08:00
|
|
|
cursor: pointer;
|
|
|
|
|
|
|
|
> svg {
|
2020-06-09 14:44:38 +08:00
|
|
|
$svgSize: px2rem(12px);
|
2019-12-06 09:58:08 +08:00
|
|
|
width: $svgSize;
|
|
|
|
height: $svgSize;
|
2020-06-09 14:44:38 +08:00
|
|
|
top: 0;
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
2019-11-09 17:04:48 +08:00
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
2019-11-09 17:04:48 +08:00
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
&-itemInput {
|
2020-12-21 10:08:40 +08:00
|
|
|
padding-left: var(--Tree-itemArrowWidth);
|
2020-08-20 18:14:05 +08:00
|
|
|
display: flex;
|
|
|
|
flex-direction: row;
|
|
|
|
flex-wrap: nowrap;
|
2019-05-15 16:10:20 +08:00
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
> a {
|
|
|
|
display: inline-block;
|
|
|
|
cursor: pointer;
|
2020-12-21 10:08:40 +08:00
|
|
|
margin-left: var(--gap-sm);
|
|
|
|
color: var(--icon-color);
|
2019-04-30 11:11:25 +08:00
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
&:hover {
|
2020-12-21 10:08:40 +08:00
|
|
|
color: var(--icon-onHover-color);
|
2019-12-06 09:58:08 +08:00
|
|
|
text-decoration: none;
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
}
|
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
> input {
|
2020-08-20 18:14:05 +08:00
|
|
|
flex-grow: 1;
|
|
|
|
width: 100%;
|
2019-12-06 09:58:08 +08:00
|
|
|
outline: none;
|
2020-12-21 10:08:40 +08:00
|
|
|
background: var(--Form-input-bg);
|
|
|
|
border: var(--Form-input-borderWidth) solid var(--Form-input-borderColor);
|
|
|
|
border-radius: var(--Form-input-borderRadius);
|
|
|
|
line-height: var(--Form-input-lineHeight);
|
|
|
|
padding: calc(
|
|
|
|
(
|
|
|
|
var(--Tree-inputHeight) - var(--Form-input-lineHeight) *
|
|
|
|
var(--Form-input-fontSize) - #{px2rem(2px)}
|
|
|
|
) / 2
|
|
|
|
)
|
|
|
|
var(--Form-input-paddingX);
|
|
|
|
font-size: var(--Form-input-fontSize);
|
2019-12-06 09:58:08 +08:00
|
|
|
|
|
|
|
&::placeholder {
|
2020-12-21 10:08:40 +08:00
|
|
|
color: var(--Form-input-placeholderColor);
|
2019-05-15 16:10:20 +08:00
|
|
|
user-select: none;
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
&:focus {
|
2020-12-21 10:08:40 +08:00
|
|
|
border-color: var(--Form-input-onFocused-borderColor);
|
|
|
|
box-shadow: var(--Form-input-boxShadow);
|
|
|
|
background: var(--Form-input-onFocused-bg);
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
&-addTopBtn {
|
|
|
|
cursor: pointer;
|
2020-12-21 10:08:40 +08:00
|
|
|
height: var(--Tree-itemHeight);
|
|
|
|
line-height: var(--Tree-itemHeight);
|
2019-12-06 09:58:08 +08:00
|
|
|
display: block;
|
2019-11-10 11:18:22 +08:00
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
&:hover {
|
|
|
|
text-decoration: none;
|
2019-05-15 16:10:20 +08:00
|
|
|
}
|
2019-11-09 17:04:48 +08:00
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
&.is-disabled {
|
|
|
|
pointer-events: none;
|
2020-12-21 10:08:40 +08:00
|
|
|
color: var(--text--muted-color);
|
2019-11-09 17:04:48 +08:00
|
|
|
}
|
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
> svg {
|
|
|
|
$svgSize: px2rem(14px);
|
|
|
|
width: $svgSize;
|
|
|
|
height: $svgSize;
|
|
|
|
top: $svgSize * 0.125;
|
2020-12-21 10:08:40 +08:00
|
|
|
margin-right: var(--gap-xs);
|
2019-11-09 17:04:48 +08:00
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&-itemArrow {
|
|
|
|
cursor: pointer;
|
2020-12-21 10:08:40 +08:00
|
|
|
width: var(--Tree-itemArrowWidth);
|
2020-12-25 00:13:14 +08:00
|
|
|
display: inline-flex;
|
2020-06-11 13:37:17 +08:00
|
|
|
margin-right: px2rem(5px);
|
2019-12-06 09:58:08 +08:00
|
|
|
|
2020-06-09 14:44:38 +08:00
|
|
|
// &:before {
|
|
|
|
// font-style: normal;
|
|
|
|
// font-family: $Tree-arrowVendor;
|
|
|
|
// content: $Tree-unfoldedArrowContent;
|
|
|
|
// }
|
|
|
|
> svg {
|
2020-12-21 10:08:40 +08:00
|
|
|
width: var(--Tree-itemArrowWidth);
|
|
|
|
height: var(--Tree-itemArrowWidth);
|
2020-12-25 00:13:14 +08:00
|
|
|
display: block;
|
2020-06-09 14:44:38 +08:00
|
|
|
transition: transform 0.2s;
|
|
|
|
top: 0;
|
2020-06-11 18:31:02 +08:00
|
|
|
transform: rotate(90deg);
|
2019-11-09 17:04:48 +08:00
|
|
|
}
|
|
|
|
|
2020-06-09 14:44:38 +08:00
|
|
|
&.is-folded > svg {
|
2020-06-11 18:31:02 +08:00
|
|
|
transform: rotate(0deg);
|
2019-11-09 17:04:48 +08:00
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&-itemArrowPlaceholder {
|
|
|
|
display: inline-block;
|
2020-12-21 10:08:40 +08:00
|
|
|
width: calc(var(--Tree-itemArrowWidth) + #{px2rem(5px)});
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&-itemIcon {
|
2020-12-25 00:13:14 +08:00
|
|
|
display: inline-flex;
|
2020-06-11 13:37:17 +08:00
|
|
|
margin-right: px2rem(5px);
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
|
|
|
|
2020-06-09 14:44:38 +08:00
|
|
|
&-rootIcon,
|
|
|
|
&-folderIcon,
|
2019-12-06 09:58:08 +08:00
|
|
|
&-leafIcon {
|
2020-06-09 14:44:38 +08:00
|
|
|
> svg {
|
2020-12-25 00:13:14 +08:00
|
|
|
top: 0;
|
2020-06-09 14:44:38 +08:00
|
|
|
width: px2rem(14px);
|
|
|
|
height: px2rem(14px);
|
2019-11-09 17:04:48 +08:00
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
2019-11-09 17:04:48 +08:00
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
&-itemLabel {
|
|
|
|
user-select: none;
|
2019-11-09 17:04:48 +08:00
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
&.is-checked,
|
|
|
|
&.is-children-checked {
|
2020-12-21 10:08:40 +08:00
|
|
|
color: var(--Tree-itemLabel--onChecked-color);
|
2019-11-09 17:04:48 +08:00
|
|
|
}
|
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
&.is-disabled {
|
2020-12-21 10:08:40 +08:00
|
|
|
color: var(--text--muted-color);
|
2019-11-09 17:04:48 +08:00
|
|
|
}
|
2020-06-09 14:44:38 +08:00
|
|
|
|
|
|
|
> .#{$ns}Checkbox {
|
2020-12-25 00:13:14 +08:00
|
|
|
display: inline-flex;
|
|
|
|
align-self: center;
|
2020-06-09 14:44:38 +08:00
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&-itemText {
|
|
|
|
cursor: pointer;
|
2020-02-28 13:23:17 +08:00
|
|
|
flex: 1 auto;
|
2020-12-21 10:08:40 +08:00
|
|
|
line-height: var(--lineHeightBase);
|
2020-06-11 13:37:17 +08:00
|
|
|
padding: px2rem(4px) 0;
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&-placeholder {
|
2020-12-21 10:08:40 +08:00
|
|
|
color: var(--text--muted-color);
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&-item &-item > &-itemLabel,
|
|
|
|
&-item &-item > &-placeholder {
|
2020-12-21 10:08:40 +08:00
|
|
|
padding-left: var(--Tree-indent);
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&-item &-item &-item > &-itemLabel,
|
|
|
|
&-item &-item &-item > &-placeholder {
|
2020-12-21 10:08:40 +08:00
|
|
|
padding-left: calc(var(--Tree-indent) * 2);
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&-item &-item &-item &-item > &-itemLabel {
|
2020-12-21 10:08:40 +08:00
|
|
|
padding-left: calc(var(--Tree-indent) * 3);
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&-item &-item &-item &-item &-item > &-itemLabel {
|
2020-12-21 10:08:40 +08:00
|
|
|
padding-left: calc(var(--Tree-indent) * 4);
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&-item &-item &-item &-item &-item &-item > &-itemLabel {
|
2020-12-21 10:08:40 +08:00
|
|
|
padding-left: calc(var(--Tree-indent) * 5);
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&-item &-item &-item &-item &-item &-item &-item > &-itemLabel {
|
2020-12-21 10:08:40 +08:00
|
|
|
padding-left: calc(var(--Tree-indent) * 6);
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&-item &-item &-item &-item &-item &-item &-item &-item > &-itemLabel {
|
2020-12-21 10:08:40 +08:00
|
|
|
padding-left: calc(var(--Tree-indent) * 7);
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&-item &-item &-item &-item &-item &-item &-item &-item &-item > &-itemLabel {
|
2020-12-21 10:08:40 +08:00
|
|
|
padding-left: calc(var(--Tree-indent) * 8);
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&-item
|
|
|
|
&-item
|
|
|
|
&-item
|
|
|
|
&-item
|
|
|
|
&-item
|
|
|
|
&-item
|
|
|
|
&-item
|
|
|
|
&-item
|
|
|
|
&-item
|
|
|
|
&-item
|
|
|
|
> &-itemLabel {
|
2020-12-21 10:08:40 +08:00
|
|
|
padding-left: calc(var(--Tree-indent) * 9);
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&-item
|
|
|
|
&-item
|
|
|
|
&-item
|
|
|
|
&-item
|
|
|
|
&-item
|
|
|
|
&-item
|
|
|
|
&-item
|
|
|
|
&-item
|
|
|
|
&-item
|
|
|
|
&-item
|
|
|
|
&-item
|
|
|
|
> &-itemLabel {
|
2020-12-21 10:08:40 +08:00
|
|
|
padding-left: calc(var(--Tree-indent) * 10);
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
|
|
|
}
|