amis/scss/components/_table.scss

861 lines
19 KiB
SCSS
Raw Normal View History

2019-04-30 11:11:25 +08:00
.#{$ns}Table {
2019-12-06 09:58:08 +08:00
position: relative;
background: var(--Table-bg);
border: var(--Table-borderWidth) solid var(--Table-borderColor);
border-radius: var(--Table-borderRadius);
margin-bottom: var(--gap-md);
2019-12-06 09:58:08 +08:00
2020-04-08 10:34:16 +08:00
.#{$ns}Form-control > & {
margin-bottom: var(--gap-sm);
2020-04-08 10:34:16 +08:00
}
2019-12-06 09:58:08 +08:00
&-fixedLeft,
&-fixedRight {
position: absolute;
background: var(--Table-bg);
z-index: var(--Table-fixed-zIndex);
2020-11-20 15:57:36 +08:00
top: auto;
box-shadow: 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
&-fixedLeft {
// 还是改成默认不显示footable 展示的时候,配置 固定列还没修复
2019-12-06 09:58:08 +08:00
left: 0;
top: -99999px;
2020-11-20 15:57:36 +08:00
&.in {
box-shadow: var(--Table-fixedLeft-boxShadow);
2020-12-08 13:04:21 +08:00
top: auto;
2020-11-20 15:57:36 +08:00
}
2020-12-01 15:00:29 +08:00
& > .#{$ns}Table-table {
> thead > tr > th:last-child,
> tbody > tr > td:last-child {
padding-right: var(--TableCell-paddingX);
2020-12-01 15:00:29 +08:00
}
// > thead > tr > th:last-child {
// border-right: var(--Table-thead-borderWidth) solid var(--Table-thead-borderColor);
2020-12-01 15:00:29 +08:00
// }
2020-11-20 15:57:36 +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
&-fixedRight {
// 还是改成默认不显示footable 展示的时候,配置 固定列还没修复
2019-12-06 09:58:08 +08:00
right: 0;
top: -99999px;
2019-12-06 21:20:23 +08:00
2020-11-20 15:57:36 +08:00
&.in {
box-shadow: var(--Table-fixedRight-boxShadow);
2020-12-08 13:04:21 +08:00
top: auto;
2020-11-20 15:57:36 +08:00
}
2020-12-01 15:00:29 +08:00
& > .#{$ns}Table-table {
2020-11-20 15:57:36 +08:00
> thead > tr > th:first-child,
> tbody > tr > td:first-child {
padding-left: var(--TableCell-paddingX);
2020-11-20 15:57:36 +08:00
}
2020-12-01 15:00:29 +08:00
// > thead > tr > th:first-child {
// border-left: var(--Table-thead-borderWidth) solid var(--Table-thead-borderColor);
2020-12-01 15:00:29 +08:00
// }
2020-11-20 15:57:36 +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
&-fixedTop {
position: absolute;
background: var(--Table-bg);
2019-12-06 09:58:08 +08:00
z-index: -1;
opacity: 0;
box-shadow: var(--Table-fixedTop-boxShadow);
2019-12-06 09:58:08 +08:00
&.in {
position: fixed;
opacity: 1;
z-index: $zindex-affix;
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
> .#{$ns}Table-fixedLeft,
> .#{$ns}Table-fixedRight {
z-index: $zindex-affix + 10;
// box-shadow: none;
background: transparent;
border-top: var(--Table-borderWidth) solid var(--Table-borderColor);
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
> table {
margin-bottom: var(--gap-xs);
2019-12-06 09:58:08 +08:00
}
2019-04-30 11:11:25 +08:00
}
2019-12-24 20:11:26 +08:00
> .#{$ns}Table-heading {
border-bottom: none;
}
2019-12-06 09:58:08 +08:00
> .#{$ns}Table-wrapper {
border-top: var(--Table-borderWidth) solid var(--Table-borderColor);
2019-04-30 11:11:25 +08:00
}
&.is-fakeHide {
> .#{$ns}Table-fixedLeft,
> .#{$ns}Table-fixedRight,
> .#{$ns}Table-wrapper {
visibility: hidden;
position: absolute;
}
}
2019-12-06 09:58:08 +08:00
}
&-heading {
background: var(--Table-heading-bg);
border-bottom: var(--Table-borderWidth) solid var(--Table-borderColor);
padding: calc(
(
var(--Table-heading-height) - var(--Table-fontSize) *
var(--lineHeightBase)
) / 2
)
var(--Table-toolbar-paddingX);
2019-12-06 09:58:08 +08:00
}
&--unsaved &-heading {
background: var(--Table--unsaved-heading-bg);
color: var(--Table--unsaved-heading-color);
2019-12-06 09:58:08 +08:00
}
&-wrapper {
overflow: hidden;
}
&-placeholder {
color: var(--text--muted-color);
2019-12-06 09:58:08 +08:00
text-align: center;
height: var(--Table-placeholder-height);
background: transparent !important;
2019-12-06 09:58:08 +08:00
&:hover {
color: var(--text--muted-color);
background: transparent !important;
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
> td {
vertical-align: middle !important;
text-align: center;
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
&-header {
padding: var(--Table-toolbar-paddingY) var(--Table-toolbar-paddingX);
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
> * + .#{$ns}Button,
> * + .#{$ns}ButtonGroup,
> * + .#{$ns}ButtonToolbar {
margin-left: var(--Crud-toolbar-gap);
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
&-toolbar {
@include clearfix();
display: flex;
padding: var(--Table-toolbar-paddingY) var(--Table-toolbar-paddingX);
2020-06-08 10:17:28 +08:00
flex-wrap: wrap;
2019-12-19 15:21:23 +08:00
.#{$ns}DropDown {
&-menuItem {
height: auto;
.#{$ns}Checkbox {
display: flex;
align-items: center;
}
}
}
2019-12-06 09:58:08 +08:00
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
&-header + &-toolbar {
padding-top: 0;
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
&-contentWrap {
position: relative;
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
&-header + &-contentWrap,
&-toolbar + &-contentWrap {
border-top: var(--Table-borderWidth) solid var(--Table-borderColor);
2019-12-06 09:58:08 +08:00
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
&-footToolbar {
border-top: var(--Table-borderWidth) solid var(--Table-borderColor);
2019-12-06 09:58:08 +08:00
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
&-actions {
display: inline-block;
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
> * {
margin-right: var(--Crud-toolbar-gap);
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
&-content {
min-height: 0.01%;
overflow-x: auto;
transform: translateZ(0);
}
2019-12-06 09:58:08 +08:00
&-table {
width: 100%;
2020-11-20 15:57:36 +08:00
min-width: 100%;
2019-12-06 09:58:08 +08:00
margin-bottom: 0;
font-size: var(--Table-fontSize);
color: var(--Table-color);
background: var(--Table-bg);
border-spacing: 0;
border-collapse: collapse;
2019-12-06 09:58:08 +08:00
&--withCombine {
> thead > tr > th,
> tbody > tr > td {
&:first-child {
padding-left: var(--TableCell-paddingX) !important;
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
&:last-child {
padding-right: var(--TableCell-paddingX) !important;
2019-08-13 20:06:41 +08:00
}
2019-12-06 09:58:08 +08:00
}
2019-08-13 20:06:41 +08:00
2019-12-06 09:58:08 +08:00
// reset
> tbody > tr {
@if $Table-strip-bg !=transparent {
&.#{$ns}Table-tr--odd {
background: transparent;
2019-12-06 09:58:08 +08:00
}
}
2019-12-06 09:58:08 +08:00
&:hover {
background: transparent;
2019-12-06 09:58:08 +08:00
}
2019-05-27 17:27:17 +08:00
2019-12-06 09:58:08 +08:00
> td {
vertical-align: middle;
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
> td:not(:last-child) {
border-right: var(--Table-borderWidth) solid var(--Table-borderColor);
2019-12-06 09:58:08 +08:00
}
}
}
2019-04-30 11:11:25 +08:00
2020-06-23 13:32:21 +08:00
> thead > tr {
2019-12-06 09:58:08 +08:00
> th {
background: var(--Table-thead-bg);
2020-06-23 13:32:21 +08:00
text-align: left;
2019-12-06 09:58:08 +08:00
&[colspan] {
text-align: center;
}
padding: var(--TableCell-paddingY) var(--TableCell-paddingX);
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
&:first-child {
padding-left: var(--TableCell--edge-paddingX);
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
&:last-child {
padding-right: var(--TableCell--edge-paddingX);
2019-05-27 17:27:17 +08:00
}
2019-12-06 09:58:08 +08:00
&:not(:last-child) {
border-right: var(--Table-thead-borderWidth) solid
var(--Table-thead-borderColor);
2019-04-30 11:11:25 +08:00
}
border-bottom: var(--Table-thead-borderWidth) solid
var(--Table-thead-borderColor);
2019-04-30 11:11:25 +08:00
font-size: var(--Table-thead-fontSize);
color: var(--Table-thead-color);
font-weight: var(--fontWeightNormal);
2019-12-06 09:58:08 +08:00
white-space: nowrap;
2019-11-11 19:31:22 +08:00
2020-08-18 10:50:06 +08:00
// .#{$ns}TableCell--title {
// display: flex;
// align-items: center;
// }
2019-12-06 09:58:08 +08:00
.#{$ns}Remark {
margin-left: var(--gap-xs);
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
> thead > tr + tr {
border-top: var(--Table-borderWidth) solid var(--Table-borderColor);
2019-12-06 09:58:08 +08:00
}
2020-06-23 13:32:21 +08:00
> thead > tr {
border-bottom: var(--Table-borderWidth) solid var(--Table-borderColor);
2020-06-23 13:32:21 +08:00
}
2019-12-06 09:58:08 +08:00
> tbody > tr {
2020-06-23 13:32:21 +08:00
& + tr {
border-top: var(--Table-borderWidth) solid var(--Table-borderColor);
2020-06-23 13:32:21 +08:00
> th {
border-top: var(--Table-thead-borderWidth) solid
var(--Table-thead-borderColor);
2020-06-23 13:32:21 +08:00
}
}
2019-04-30 11:11:25 +08:00
> th {
2020-08-20 19:52:24 +08:00
text-align: left;
background: var(--Table-thead-bg);
// font-size: var(--Table-thead-fontSize);
color: var(--Table-thead-color);
font-weight: var(--fontWeightNormal);
2020-06-23 13:32:21 +08:00
white-space: nowrap;
border-right: var(--Table-thead-borderWidth) solid
var(--Table-thead-borderColor);
}
2020-06-23 13:32:21 +08:00
> td,
> th {
padding: var(--TableCell-paddingY) var(--TableCell-paddingX);
2019-08-13 20:06:41 +08:00
2019-12-06 09:58:08 +08:00
&:first-child {
padding-left: var(--TableCell--edge-paddingX);
2019-08-14 16:55:12 +08:00
}
2019-12-06 09:58:08 +08:00
&:last-child {
padding-right: var(--TableCell--edge-paddingX);
2019-08-13 20:06:41 +08:00
}
2019-12-06 09:58:08 +08:00
}
2019-08-13 20:06:41 +08:00
@if var(--Table-strip-bg) !=transparent {
background: transparent;
2019-08-13 20:06:41 +08:00
2019-12-06 09:58:08 +08:00
&.#{$ns}Table-tr--odd {
background: var(--Table-strip-bg);
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
&:hover,
&.is-hovered {
background: var(--Table-onHover-bg);
border-color: var(--Table-onHover-borderColor);
color: var(--Table-onHover-color);
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
& + tr {
border-color: var(--Table-onHover-borderColor);
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
&.is-checked {
background: var(--Table-onChecked-bg);
border-color: var(--Table-onChecked-borderColor);
color: var(--Table-onChecked-color);
2019-11-11 19:31:22 +08:00
2019-12-06 09:58:08 +08:00
& + tr {
border-color: var(--Table-onChecked-borderColor);
2019-12-06 09:58:08 +08:00
}
}
&.is-moved,
&.is-modified {
background: var(--Table-onModified-bg);
border-color: var(--Table-onModified-borderColor);
color: var(--Table-onModified-color);
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
& + tr {
border-color: var(--Table-onModified-borderColor);
2019-04-30 11:11:25 +08:00
}
2019-12-12 19:30:46 +08:00
}
2019-04-30 11:11:25 +08:00
&.is-summary {
background: var(--Table-thead-bg);
color: var(--Table-thead-color);
font-weight: var(--fontWeightNormal);
}
2019-12-12 19:30:46 +08:00
&.bg-light {
@include color-variant($light, 2%, 3%, 3%, 5%);
color: $text-color;
}
2019-12-06 09:58:08 +08:00
2019-12-12 19:30:46 +08:00
&.bg-dark {
@include color-variant($dark, 5%, 10%, 5%, 10%);
@include font-variant($dark);
}
&.bg-black {
@include color-variant($black, 5%, 10%, 5%, 10%);
@include font-variant($black);
}
&.bg-primary {
@include color-variant($primary, 5%, 10%, 5%, 10%);
@include font-variant($primary);
}
&.bg-success {
@include color-variant($success, 5%, 10%, 5%, 10%);
@include font-variant($success);
}
&.bg-info {
@include color-variant($info, 5%, 10%, 5%, 10%);
@include font-variant($info);
}
&.bg-warning {
@include color-variant($warning, 5%, 10%, 5%, 10%);
@include font-variant($warning);
}
&.bg-danger {
@include color-variant($danger, 5%, 10%, 5%, 10%);
@include font-variant($danger);
2019-12-06 09:58:08 +08:00
}
2019-12-06 09:58:08 +08:00
&.is-dragging {
opacity: var(--Table-onDragging-opacity);
2019-12-06 09:58:08 +08:00
}
}
@for $i from 2 through 10 {
tr.#{$ns}Table-tr--#{$i}th.is-expanded {
.#{$ns}Table-expandCell:before {
right: px2rem(7px) + px2rem(-18px) * ($i - 1);
2019-12-06 09:58:08 +08:00
}
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
tr.#{$ns}Table-tr--#{$i}th {
.#{$ns}Table-expandBtn {
position: relative;
right: -(px2rem(18px)) * ($i - 1);
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
.#{$ns}Table-expandCell + td {
position: relative;
&::before {
2020-04-08 10:34:16 +08:00
content: '';
2019-04-30 11:11:25 +08:00
position: absolute;
2019-12-06 09:58:08 +08:00
width: px2rem(1px);
2019-04-30 11:11:25 +08:00
top: 0;
2019-12-06 09:58:08 +08:00
bottom: 0;
left: px2rem(-8px) + px2rem(18px) * ($i - 2);
2019-12-06 09:58:08 +08:00
height: auto;
background: var(--Table-tree-borderColor);
2019-12-06 09:58:08 +08:00
}
&::after {
2020-04-08 10:34:16 +08:00
content: '';
2019-12-06 09:58:08 +08:00
position: absolute;
height: px2rem(1px);
2020-05-26 20:28:09 +08:00
top: px2rem(18px);
left: px2rem(-8px) + px2rem(18px) * ($i - 2);
2019-12-06 09:58:08 +08:00
width: px2rem(10px);
background: var(--Table-tree-borderColor);
2019-12-06 09:58:08 +08:00
}
2019-04-30 11:11:25 +08:00
padding-left: px2rem(18px) * $i - px2rem(18px);
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
tr.#{$ns}Table-tr--#{$i}th.is-expandable {
.#{$ns}Table-expandCell + td {
padding-left: px2rem(18px) * ($i - 1);
2019-12-06 09:58:08 +08:00
}
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
tr.#{$ns}Table-tr--#{$i}th.is-last:not(.is-expanded) {
.#{$ns}Table-expandCell + td {
&::before {
2020-05-26 20:28:09 +08:00
height: px2rem(18px);
2019-12-06 09:58:08 +08:00
bottom: auto;
}
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
> thead > tr > th.#{$ns}Table-checkCell,
> tbody > tr > td.#{$ns}Table-checkCell {
border-right: 0;
width: px2rem(1px);
padding-right: var(--TableCell-paddingX);
2019-12-06 09:58:08 +08:00
.#{$ns}Checkbox {
margin: 0;
}
}
> thead > tr > th.#{$ns}Table-expandCell,
> tbody > tr > td.#{$ns}Table-expandCell {
border-right: 0;
width: px2rem(1px);
padding-right: 0;
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
> thead > tr > th.#{$ns}Table-dragCell,
> tbody > tr > td.#{$ns}Table-dragCell {
border-right: 0;
width: px2rem(1px);
padding-right: 0;
2020-06-08 10:17:28 +08:00
cursor: move;
2019-12-06 09:58:08 +08:00
}
> tbody > tr > td.#{$ns}Table-expandCell {
position: relative;
@for $i from 1 through 7 {
.#{$ns}Table-divider-#{$i} {
position: absolute;
width: px2rem(1px);
top: 0;
bottom: 0;
height: 100%;
background: var(--Table-tree-borderColor);
right: px2rem(7px) + px2rem(-18px) * ($i - 1);
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
> tbody > tr.is-expanded > td.#{$ns}Table-expandCell {
// position: relative;
&::before {
2020-04-08 10:34:16 +08:00
content: '';
2019-04-30 11:11:25 +08:00
position: absolute;
2019-12-06 09:58:08 +08:00
width: px2rem(1px);
2020-05-26 20:28:09 +08:00
top: px2rem(28px);
2019-12-06 09:58:08 +08:00
bottom: 0;
2020-05-26 20:28:09 +08:00
right: px2rem(7px);
2019-12-06 09:58:08 +08:00
height: auto;
background: var(--Table-tree-borderColor);
2019-12-06 09:58:08 +08:00
}
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
> thead > tr > th.#{$ns}TableCell--sortable {
padding-right: calc(
var(--TableCell-paddingX) + var(--TableCell-sortBtn-width)
);
2019-12-06 09:58:08 +08:00
position: relative;
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
> thead > tr > th.#{$ns}TableCell--searchable {
padding-right: calc(
var(--TableCell-paddingX) + var(--TableCell-searchBtn-width)
);
2019-12-06 09:58:08 +08:00
position: relative;
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
> thead > tr > th.#{$ns}TableCell--filterable {
padding-right: calc(
var(--TableCell-paddingX) + var(--TableCell-filterBtn-width)
);
2019-12-06 09:58:08 +08:00
position: relative;
}
}
&Cell-sortBtn {
cursor: pointer;
width: var(--TableCell-sortBtn-width);
height: var(--gap-md);
2020-06-09 14:44:38 +08:00
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
2019-12-06 09:58:08 +08:00
position: absolute;
right: calc(var(--TableCell-paddingX) - var(--TableCell-sortBtn-width) / 2);
2019-12-19 15:21:23 +08:00
top: 50%;
transform: translateY(-50%);
color: var(--icon-color);
2019-04-30 11:11:25 +08:00
2020-06-09 14:44:38 +08:00
&:hover {
color: var(--icon-onHover-color);
2019-04-30 11:11:25 +08:00
}
2020-06-09 14:44:38 +08:00
&--up > svg,
&--down > svg,
&--default > svg {
color: inherit;
width: 12x;
height: 12px;
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
&--up,
2020-06-09 14:44:38 +08:00
&--down,
&--default {
2019-12-06 09:58:08 +08:00
display: none;
2019-12-19 15:21:23 +08:00
position: absolute;
2019-12-06 09:58:08 +08:00
z-index: 2;
font-style: normal;
&.is-active {
display: inline-block;
}
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
&--default {
&.is-active {
color: var(--text--muted-color);
2020-06-09 17:02:30 +08:00
&:hover {
color: var(--text-color);
2020-06-09 17:02:30 +08:00
}
2019-12-06 09:58:08 +08:00
}
}
&--up,
&--down {
&.is-active {
color: var(--TableCell-sortBtn--onActive-color);
}
}
2019-12-06 09:58:08 +08:00
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
&Cell-searchBtn {
cursor: pointer;
// width: var(--TableCell-searchBtn-width);
2019-12-06 09:58:08 +08:00
position: absolute;
right: var(--gap-xs);
2019-12-19 15:21:23 +08:00
top: 50%;
transform: translateY(-50%);
color: var(--text--muted-color);
2019-04-30 11:11:25 +08:00
2020-06-09 17:02:30 +08:00
svg.icon {
width: 12px;
height: 12px;
}
2019-12-06 09:58:08 +08:00
&:hover {
color: var(--text-color);
2019-12-06 09:58:08 +08:00
}
&.is-active {
color: var(--TableCell-searchBtn--onActive-color);
}
2019-12-06 09:58:08 +08:00
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
&Cell-searchPopOver {
border: none;
min-width: px2rem(320px);
max-width: px2rem(640px);
.#{$ns}Panel {
margin: 0;
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
}
&Cell-filterBtn {
cursor: pointer;
width: var(--TableCell-filterBtn-width);
2019-12-06 09:58:08 +08:00
position: absolute;
right: calc(
var(--TableCell-paddingX) - var(--TableCell-filterBtn-width) / 2
);
2019-12-19 15:21:23 +08:00
top: 50%;
transform: translateY(-50%);
color: var(--text--muted-color);
2019-11-11 19:31:22 +08:00
2020-06-09 17:02:30 +08:00
svg.icon {
width: 12px;
height: 12px;
}
2019-12-06 09:58:08 +08:00
&:hover {
color: var(--text-color);
2019-12-06 09:58:08 +08:00
}
&.is-active {
color: var(--TableCell-filterBtn--onActive-color);
}
2019-12-06 09:58:08 +08:00
.#{$ns}Remark {
display: inline;
}
}
2019-11-11 19:31:22 +08:00
2019-12-06 09:58:08 +08:00
&Cell-filterPopOver {
border: none;
width: px2rem(160px);
2019-12-06 09:58:08 +08:00
.#{$ns}DropDown-menu {
margin: 0;
padding: 0;
border-radius: 0;
.#{$ns}DropDown-divider {
height: var(--TableCell-filterPopOver-dropDownItem-height);
line-height: var(--TableCell-filterPopOver-dropDownItem-height);
padding: var(--TableCell-filterPopOver-dropDownItem-padding);
background: var(--white);
2019-12-06 09:58:08 +08:00
margin: 0;
&:hover {
background: var(--light);
color: var(--primary);
}
2019-12-06 09:58:08 +08:00
&.is-selected {
background: var(--light);
color: var(--primary);
}
2019-12-06 09:58:08 +08:00
.#{$ns}Checkbox {
width: 100%;
margin: 0;
}
}
}
}
&-itemActions-wrap {
position: absolute;
width: 100%;
z-index: calc(var(--Table-fixed-zIndex) + 1);
2019-12-06 09:58:08 +08:00
left: 0;
top: 0;
min-height: 30px;
pointer-events: none;
box-shadow: var(--Table-onHover-boxShadow);
2019-12-06 09:58:08 +08:00
}
&-itemActions {
pointer-events: all;
position: absolute;
// background: var(--Table-onHover-bg);
2019-12-06 09:58:08 +08:00
background: linear-gradient(
90deg,
rgba(var(--Table-onHover-bg-rgb), 0) 0%,
rgba(var(--Table-onHover-bg-rgb), 1) 20%,
rgba(var(--Table-onHover-bg-rgb), 1) 100%
2019-12-06 09:58:08 +08:00
);
top: var(--Table-borderWidth);
2019-12-06 09:58:08 +08:00
bottom: 0;
right: 0;
padding-left: px2rem(50px);
padding-right: var(--TableCell-paddingX);
2019-12-06 09:58:08 +08:00
display: flex;
align-items: center;
a {
cursor: pointer;
padding: var(--gap-xs) var(--gap-sm);
color: var(--link-color);
text-decoration: var(--link-decoration);
2019-12-06 09:58:08 +08:00
&:hover {
color: var(--link-onHover-color);
text-decoration: var(--link-onHover-decoration);
2019-12-06 09:58:08 +08:00
}
&.is-disabled {
pointer-events: none;
opacity: var(--Button-onDisabled-opacity);
color: var(--text--muted-color);
2019-12-06 09:58:08 +08:00
}
}
}
&-dragTip {
color: var(--text--loud-color);
2019-12-06 09:58:08 +08:00
clear: both;
margin-top: var(--gap-xs);
2020-06-08 10:17:28 +08:00
width: 100%;
color: var(--info);
2019-12-06 09:58:08 +08:00
}
&-footTable {
position: relative;
width: 100%;
border-spacing: 0;
border-collapse: collapse;
margin-bottom: 0;
background: transparent;
> tbody > tr > th {
width: px2rem(120px);
text-align: right;
padding: var(--TableCell-paddingY) var(--TableCell-paddingX);
2019-12-06 09:58:08 +08:00
}
> tbody > tr > td {
word-break: break-all;
padding: var(--TableCell-paddingY) var(--TableCell-paddingX);
}
2019-08-14 14:21:21 +08:00
2019-12-06 09:58:08 +08:00
> tbody > tr:not(:first-child) {
border-top: var(--Table-borderWidth) solid
var(--Table-tbody-borderTopColor);
2019-12-06 09:58:08 +08:00
}
}
&-expandBtn {
position: relative;
z-index: 1;
color: var(--Table-expandBtn-color);
2020-05-26 20:28:09 +08:00
display: inline-flex;
justify-content: center;
align-items: center;
width: px2rem(14px);
line-height: 1;
height: 16px;
2019-12-06 09:58:08 +08:00
2020-06-08 18:23:56 +08:00
> svg {
2019-12-06 09:58:08 +08:00
display: inline-block;
text-align: center;
cursor: pointer;
transition: transform ease-in-out var(--animation-duration),
top ease-in-out var(--animation-duration);
2020-05-26 20:28:09 +08:00
position: relative;
transform-origin: 50% 50%;
2019-08-14 14:21:21 +08:00
}
2020-06-08 18:23:56 +08:00
&.is-active > svg {
2019-12-06 09:58:08 +08:00
transform: rotate(90deg);
2019-08-14 14:21:21 +08:00
}
2020-05-27 13:52:25 +08:00
&:hover {
text-decoration: none;
}
2019-12-06 09:58:08 +08:00
}
&-dragBtn {
margin-right: var(--gap-xs);
2019-12-06 09:58:08 +08:00
display: inline-block;
visibility: hidden;
cursor: move;
color: var(--icon-color);
2020-06-08 18:23:56 +08:00
&:hover {
text-decoration: none;
color: var(--icon-onHover-color);
2020-06-08 18:23:56 +08:00
}
2019-12-06 09:58:08 +08:00
}
&-table > tbody > tr:hover .#{$ns}Table-dragBtn,
&-table > tbody > tr.is-dragging .#{$ns}Table-dragBtn,
&-table > tbody > tr.is-drop-allowed .#{$ns}Table-dragBtn {
visibility: visible;
}
.fake-hide {
visibility: hidden;
position: absolute;
}
2019-04-30 11:11:25 +08:00
}
.#{$ns}OperationField {
2019-12-06 09:58:08 +08:00
margin: px2rem(-3px);
2019-04-30 11:11:25 +08:00
> .#{$ns}Button,
> .#{$ns}Button--disabled-wrap > .#{$ns}Button {
2019-12-06 09:58:08 +08:00
margin: px2rem(3px);
2020-08-20 20:16:08 +08:00
}
2020-10-23 15:49:17 +08:00
> .#{$ns}Button--disabled-wrap > .#{$ns}Button--link {
2020-08-20 13:51:47 +08:00
padding: 0;
2019-12-06 09:58:08 +08:00
}
2020-06-08 16:53:52 +08:00
> .#{$ns}Button--link {
padding: 0;
margin-right: px2rem(10px);
}
2019-12-06 09:58:08 +08:00
}