amis/scss/components/form/_tree.scss

180 lines
3.8 KiB
SCSS
Raw Normal View History

2019-04-30 11:11:25 +08:00
// todo
.#{$ns}TreeControl {
border: 1px solid $Form-input-borderColor;
padding: 6px 12px;
border-radius: 2px;
max-height: 300px;
overflow: auto;
&.h-full {
max-height: none;
}
&.no-border {
border: 0;
}
}
.#{$ns}Tree {
&-list,
&-sublist {
list-style: none;
padding: 0;
margin: 0;
}
2019-04-30 11:11:25 +08:00
&-sublist {
padding-left: $Tree-indent;
2019-04-30 11:11:25 +08:00
&.is-folded {
display: none;
}
2019-09-10 14:10:03 +08:00
> li {
> i {
display: inline-block;
cursor: pointer;
margin-left: 5px;
}
> input {
margin-left: 15px;
padding: px2rem(5px);
width: px2rem(150px);
height: px2rem(25px);
color: $Form-input-color;
//height: $Form-input-lineHeight * $Form-input-fontSize;
&::placeholder {
color: $Form-input-placeholderColor;
user-select: none;
}
&:focus {
outline: none;
border: $borderWidth solid $info;
}
}
}
2019-04-30 11:11:25 +08:00
}
&-item {
line-height: px2rem(30px);
position: relative;
2019-04-30 11:11:25 +08:00
> a {
color: inherit;
2019-04-30 11:11:25 +08:00
&:hover {
text-decoration: none;
}
2019-09-10 14:10:03 +08:00
> span > i {
display: inline-block;
cursor: pointer;
margin-left: 5px;
}
}
&--isLeaf > a {
padding-left: $Tree-itemArrowWidth + $gap-xs;
}
2019-09-10 14:10:03 +08:00
&--isEdit {
display: inline-block;
> i {
display: inline-block;
cursor: pointer;
margin-left: 5px;
}
> input {
margin-left: 15px;
padding: px2rem(5px);
width: px2rem(150px);
height: px2rem(25px);
color: $Form-input-color;
//height: $Form-input-lineHeight * $Form-input-fontSize;
&::placeholder {
color: $Form-input-placeholderColor;
user-select: none;
}
&:focus {
outline: none;
border: $borderWidth solid $info;
}
}
}
2019-04-30 11:11:25 +08:00
}
&-rootItem > a > i {
margin-left: 0 !important;
2019-04-30 11:11:25 +08:00
}
&-itemArrow {
cursor: pointer;
width: $Tree-itemArrowWidth;
margin-right: $gap-xs;
display: inline-block;
&:before {
font-style: normal;
font-family: $Tree-arrowVendor;
content: $Tree-unfoldedArrowContent;
}
&.is-folded:before {
content: $Tree-foldedArrowContent;
}
2019-04-30 11:11:25 +08:00
}
&-itemIcon {
display: inline-block;
margin-right: $gap-xs;
2019-04-30 11:11:25 +08:00
}
&-rootIcon {
&:before {
font-style: normal;
font-family: $Tree-rootIconVendor;
content: $Tree-rootIconContent;
}
2019-04-30 11:11:25 +08:00
}
&-leafIcon {
&:before {
font-style: normal;
font-family: $Tree-leafIconVendor;
content: $Tree-leafIconContent;
}
2019-04-30 11:11:25 +08:00
}
&-folderIcon {
&:before {
font-style: normal;
font-family: $Tree-folderIconVendor;
content: $Tree-folderIconContent;
}
2019-04-30 11:11:25 +08:00
}
&-itemText {
user-select: none;
cursor: pointer;
2019-04-30 11:11:25 +08:00
&.is-checked,
&.is-children-checked {
color: $Tree-itemText--onChecked-color;
}
2019-04-30 11:11:25 +08:00
&.is-disabled {
color: $text--muted-color;
}
2019-04-30 11:11:25 +08:00
}
&-placeholder {
color: $text--muted-color;
}
}