2019-09-05 18:06:01 +08:00
|
|
|
@import './mixins/mixins.scss';
|
2020-02-11 14:44:29 +08:00
|
|
|
|
2019-12-24 21:50:28 +08:00
|
|
|
@include themes-mixin {
|
|
|
|
@include b(tree) {
|
2020-02-26 12:41:24 +08:00
|
|
|
@include once {
|
|
|
|
font-size: 14px;
|
|
|
|
ul, li {
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
|
|
|
list-style: none;
|
|
|
|
}
|
|
|
|
@include b(tree-children-wrapper) {
|
|
|
|
@include fade-in-height-expand-transition(fade-in-height-expand, .15s);
|
|
|
|
margin-left: 16px;
|
2019-12-24 21:50:28 +08:00
|
|
|
}
|
2020-02-26 12:41:24 +08:00
|
|
|
@include b(tree-node) {
|
|
|
|
padding: 3px 0 3px 0;
|
|
|
|
&:first-child {
|
|
|
|
padding-top: 6px;
|
|
|
|
}
|
|
|
|
&:last-child {
|
|
|
|
padding-bottom: 0;
|
|
|
|
}
|
2019-12-24 21:50:28 +08:00
|
|
|
}
|
2019-09-13 22:32:15 +08:00
|
|
|
}
|
2019-12-24 21:50:28 +08:00
|
|
|
@include b(tree-node-switcher) {
|
2020-02-26 12:41:24 +08:00
|
|
|
@include once {
|
|
|
|
cursor: pointer;
|
|
|
|
display: inline-flex;
|
|
|
|
height: 24px;
|
|
|
|
width: 24px;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
transition: transform .15s $--n-ease-in-out-cubic-bezier;
|
|
|
|
vertical-align: bottom;
|
|
|
|
}
|
2020-02-25 18:47:41 +08:00
|
|
|
@include e(icon) {
|
2020-02-26 12:41:24 +08:00
|
|
|
@include once {
|
|
|
|
position: relative;
|
2020-02-25 18:47:41 +08:00
|
|
|
height: 14px;
|
|
|
|
width: 14px;
|
2020-02-26 12:41:24 +08:00
|
|
|
display: flex;
|
|
|
|
}
|
|
|
|
@include b(icon) {
|
|
|
|
@include once {
|
|
|
|
height: 14px;
|
|
|
|
width: 14px;
|
|
|
|
font-size: 14px;
|
|
|
|
@include icon-switch-transition;
|
|
|
|
}
|
2020-02-25 18:47:41 +08:00
|
|
|
fill: $--tree-node-switcher-color;
|
|
|
|
stroke: $--tree-node-switcher-color;
|
|
|
|
}
|
2020-02-26 12:41:24 +08:00
|
|
|
@include once {
|
|
|
|
@include b(base-loading) {
|
|
|
|
position: absolute;
|
|
|
|
left: 1px;
|
|
|
|
top: 1px;
|
|
|
|
height: 12px;
|
|
|
|
width: 12px;
|
|
|
|
@include icon-switch-transition($left: 1px, $top: 1px);
|
|
|
|
}
|
2020-02-25 18:47:41 +08:00
|
|
|
}
|
2019-12-24 21:50:28 +08:00
|
|
|
}
|
2020-02-26 12:41:24 +08:00
|
|
|
@include once {
|
|
|
|
@include m(hide) {
|
|
|
|
visibility: hidden
|
|
|
|
}
|
|
|
|
@include m(expanded) {
|
|
|
|
transform: rotate(90deg);
|
|
|
|
}
|
2019-09-13 22:32:15 +08:00
|
|
|
}
|
|
|
|
}
|
2019-12-24 21:50:28 +08:00
|
|
|
@include b(tree-node-checkbox) {
|
|
|
|
display: inline-flex;
|
|
|
|
height: 24px;
|
|
|
|
width: 16px;
|
|
|
|
vertical-align: bottom;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
margin-right: 4px;
|
2019-09-15 10:45:34 +08:00
|
|
|
}
|
2019-12-24 21:50:28 +08:00
|
|
|
@include b(tree-node-content) {
|
2020-02-26 12:41:24 +08:00
|
|
|
@include once {
|
|
|
|
position: relative;
|
|
|
|
display: inline-flex;
|
|
|
|
height: 24px;
|
|
|
|
box-sizing: border-box;
|
|
|
|
border-bottom: 3px solid transparent;
|
|
|
|
border-top: 3px solid transparent;
|
|
|
|
line-height: 24px;
|
|
|
|
align-items: center;
|
|
|
|
vertical-align: bottom;
|
|
|
|
padding: 0 6px;
|
|
|
|
cursor: pointer;
|
2020-02-29 14:55:52 +08:00
|
|
|
border-radius: $--n-tree-node-border-radius;
|
2020-02-26 12:41:24 +08:00
|
|
|
text-decoration-color: transparent;
|
|
|
|
text-decoration-line: underline;
|
|
|
|
transition:
|
|
|
|
color .3s $--n-ease-in-out-cubic-bezier,
|
|
|
|
text-decoration-color .3s $--n-ease-in-out-cubic-bezier,
|
|
|
|
background-color .3s $--n-ease-in-out-cubic-bezier,
|
|
|
|
border-color .3s $--n-ease-in-out-cubic-bezier;
|
|
|
|
&:last-child {
|
|
|
|
margin-bottom: 0;
|
|
|
|
}
|
|
|
|
@include e(padding-box) {
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
bottom: 0;
|
|
|
|
left: 0;
|
|
|
|
right: 0;
|
|
|
|
background-color: transparent;
|
|
|
|
}
|
|
|
|
@include e(text) {
|
2020-03-26 19:22:59 +08:00
|
|
|
line-height: 1.25;
|
2020-02-26 12:41:24 +08:00
|
|
|
border-bottom: 1px solid transparent;
|
|
|
|
transition: border-color .3s $--n-ease-in-out-cubic-bezier;
|
|
|
|
}
|
|
|
|
@include m(block) {
|
|
|
|
width: calc(100% - 24px);
|
|
|
|
@include m(checkable) {
|
|
|
|
width: calc(100% - 48px);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
color: map-get($--tree-node-content-text-color, 'default');
|
2019-09-15 15:47:56 +08:00
|
|
|
&:hover {
|
2019-12-24 21:50:28 +08:00
|
|
|
background-color: map-get($--tree-node-background-color, 'hover');
|
|
|
|
}
|
|
|
|
&:active {
|
|
|
|
background-color: map-get($--tree-node-background-color, 'active');
|
|
|
|
}
|
2020-02-25 22:32:05 +08:00
|
|
|
@include m(hightlight) {
|
|
|
|
@include e(text) {
|
2020-02-26 12:41:24 +08:00
|
|
|
border-bottom-color: map-get($--tree-node-content-text-color, 'default');
|
2020-02-25 22:32:05 +08:00
|
|
|
}
|
|
|
|
}
|
2019-12-24 21:50:28 +08:00
|
|
|
@include m(pending) {
|
2020-02-26 12:41:24 +08:00
|
|
|
@include once {
|
|
|
|
&:hover {
|
|
|
|
background-color: transparent;
|
|
|
|
}
|
2019-12-24 21:50:28 +08:00
|
|
|
}
|
|
|
|
@include m(pending-bottom) {
|
|
|
|
border-bottom: 3px solid map-get($--tree-node-background-color, 'hover');
|
|
|
|
}
|
|
|
|
@include m(pending-top) {
|
|
|
|
border-top: 3px solid map-get($--tree-node-background-color, 'hover');
|
|
|
|
}
|
|
|
|
@include m(pending-body) {
|
|
|
|
background-color: map-get($--tree-node-background-color, 'hover');
|
|
|
|
}
|
2019-09-15 10:45:34 +08:00
|
|
|
}
|
2019-12-24 21:50:28 +08:00
|
|
|
@include m(selected) {
|
|
|
|
background-color: map-get($--tree-node-background-color, 'selected');
|
2019-09-15 10:45:34 +08:00
|
|
|
}
|
2019-09-13 22:32:15 +08:00
|
|
|
}
|
2019-09-12 11:58:46 +08:00
|
|
|
}
|
2019-09-05 18:06:01 +08:00
|
|
|
}
|