2019-04-30 11:11:25 +08:00
|
|
|
.#{$ns}Collapse {
|
2021-11-03 16:31:49 +08:00
|
|
|
border: var(--Collapse-border);
|
2019-12-06 09:58:08 +08:00
|
|
|
padding: 0;
|
2021-11-23 10:51:33 +08:00
|
|
|
line-height: px2rem(20px);
|
2022-05-18 10:03:56 +08:00
|
|
|
border-radius: 4px;
|
2022-07-27 19:42:59 +08:00
|
|
|
// overflow: hidden;
|
2019-04-30 11:11:25 +08:00
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
&-header {
|
2021-11-03 16:31:49 +08:00
|
|
|
font-size: var(--Collapse-header-fontSize);
|
|
|
|
font-weight: var(--Collapse-header-fontWeight);
|
2020-12-21 10:08:40 +08:00
|
|
|
color: var(--text--loud-color);
|
2021-11-03 16:31:49 +08:00
|
|
|
padding: var(--Collapse-header-padding);
|
|
|
|
margin: 0;
|
2021-11-23 10:51:33 +08:00
|
|
|
cursor: pointer;
|
2021-11-03 16:31:49 +08:00
|
|
|
background: var(--Collapse-header-bg);
|
|
|
|
|
2021-11-12 12:36:32 +08:00
|
|
|
&-wrapper {
|
|
|
|
display: inline-flex;
|
|
|
|
flex-direction: var(--Collapse-header-wrapper-direction);
|
|
|
|
}
|
|
|
|
|
|
|
|
&-tpl {
|
|
|
|
margin-right: px2rem(8px);
|
|
|
|
}
|
|
|
|
|
2021-11-03 16:31:49 +08:00
|
|
|
&:hover {
|
|
|
|
background: var(--Collapse-header-onHover-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
|
|
|
&-arrow {
|
|
|
|
display: inline-block;
|
|
|
|
width: px2rem(16px);
|
2022-07-26 21:05:36 +08:00
|
|
|
height: px2rem(16px);
|
2019-12-06 09:58:08 +08:00
|
|
|
text-align: center;
|
2021-11-25 21:06:47 +08:00
|
|
|
margin-right: var(--gap-sm);
|
2019-05-15 16:10:20 +08:00
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
&:before {
|
|
|
|
content: '';
|
|
|
|
position: relative;
|
|
|
|
display: inline-block;
|
|
|
|
width: px2rem(6px);
|
|
|
|
height: px2rem(6px);
|
2021-11-23 10:51:33 +08:00
|
|
|
top: px2rem(-2px);
|
2022-07-27 19:42:59 +08:00
|
|
|
border-color: #84868c;
|
2019-12-06 09:58:08 +08:00
|
|
|
border-style: solid;
|
|
|
|
border-width: px2rem(1px) px2rem(1px) 0 0;
|
2021-11-23 10:51:33 +08:00
|
|
|
transform: rotate(45deg);
|
2019-12-06 09:58:08 +08:00
|
|
|
transform-origin: 50% 50%;
|
2019-04-30 11:11:25 +08:00
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
2021-11-23 10:51:33 +08:00
|
|
|
&-icon-tranform {
|
2021-11-04 18:06:12 +08:00
|
|
|
display: inline-block;
|
2021-11-23 10:51:33 +08:00
|
|
|
width: px2rem(16px);
|
|
|
|
text-align: center;
|
|
|
|
margin-right: var(--gap-xs);
|
2021-11-04 18:06:12 +08:00
|
|
|
}
|
|
|
|
|
2021-11-23 10:51:33 +08:00
|
|
|
.#{$ns}TplField {
|
|
|
|
display: inline-block;
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
2021-11-23 10:51:33 +08:00
|
|
|
|
2022-09-30 09:44:07 +08:00
|
|
|
&.is-active > * > &-arrow:before {
|
2021-11-23 10:51:33 +08:00
|
|
|
transform: rotate(135deg);
|
|
|
|
transform-origin: 50% 30%;
|
|
|
|
}
|
2022-09-30 09:44:07 +08:00
|
|
|
&.is-active > * > &-icon-tranform {
|
2021-11-23 10:51:33 +08:00
|
|
|
transform: rotate(90deg);
|
2021-11-03 16:31:49 +08:00
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
2022-09-30 09:44:07 +08:00
|
|
|
&--disabled > &-header {
|
2021-11-23 10:51:33 +08:00
|
|
|
cursor: not-allowed;
|
2019-12-06 09:58:08 +08:00
|
|
|
user-select: none;
|
2021-11-23 10:51:33 +08:00
|
|
|
color: var(--text--muted-color);
|
|
|
|
&:hover {
|
|
|
|
background-color: var(--Collapse-header-bg-disabled-color);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-09-30 09:44:07 +08:00
|
|
|
&--disabled > * > &-arrow:before {
|
2021-11-23 10:51:33 +08:00
|
|
|
border-color: var(--text--muted-color);
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
2019-08-13 18:50:53 +08:00
|
|
|
|
2020-11-18 21:52:50 +08:00
|
|
|
// title 显示在底部的模式
|
|
|
|
&--title-bottom &-header {
|
|
|
|
text-align: center;
|
2020-12-21 10:08:40 +08:00
|
|
|
font-size: var(--fontSizeBase);
|
2021-11-12 12:36:32 +08:00
|
|
|
border-top: var(--Collapse-header-collapsed-borderTop);
|
|
|
|
border-bottom: var(--Collapse-header-collapsed-borderBottom);
|
|
|
|
}
|
|
|
|
|
|
|
|
&--title-bottom.is-collapsed &-header {
|
|
|
|
border-top: none;
|
2020-11-18 21:52:50 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&--title-bottom &-arrow:before {
|
2021-11-23 10:51:33 +08:00
|
|
|
top: px2rem(-4px);
|
|
|
|
transform: rotate(135deg);
|
2020-11-18 21:52:50 +08:00
|
|
|
}
|
|
|
|
|
2021-11-23 10:51:33 +08:00
|
|
|
&--title-bottom.is-active &-arrow:before {
|
|
|
|
top: 0;
|
|
|
|
transform: rotate(-45deg);
|
2020-11-18 21:52:50 +08:00
|
|
|
}
|
|
|
|
|
2021-11-03 16:31:49 +08:00
|
|
|
&-contentWrapper {
|
2021-01-04 16:45:43 +08:00
|
|
|
transition: height var(--animation-duration) ease;
|
2019-12-06 09:58:08 +08:00
|
|
|
&.in,
|
|
|
|
&.out {
|
|
|
|
height: 0;
|
|
|
|
overflow: hidden;
|
2019-08-13 18:50:53 +08:00
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
2021-11-03 16:31:49 +08:00
|
|
|
&-content {
|
|
|
|
padding: var(--Collapse-content-padding);
|
|
|
|
color: var(--body-color);
|
|
|
|
font-size: var(--Collapse-content-fontSize);
|
|
|
|
font-weight: var(--Collapse-content-fontWeight);
|
|
|
|
}
|
2020-11-18 21:52:50 +08:00
|
|
|
}
|
2022-10-19 10:38:52 +08:00
|
|
|
|
|
|
|
//FieldSet Form + Collapse
|
|
|
|
.#{$ns}Form {
|
|
|
|
.#{$ns}Collapse {
|
|
|
|
border: none;
|
|
|
|
&-header {
|
|
|
|
background-color: var(--white);
|
|
|
|
display: inline-flex;
|
|
|
|
justify-content: flex-end;
|
|
|
|
flex-direction: row-reverse;
|
|
|
|
border-radius: 0;
|
|
|
|
}
|
|
|
|
&-content {
|
|
|
|
padding: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|