You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

296 lines
5.0 KiB

@import "../mixins/index";
9 years ago
@table-prefix-cls: ~"@{css-prefix}table";
@table-border-color: #e9e9e9;
@table-head-background-color: #f3f3f3;
.@{table-prefix-cls} {
font-size: @font-size-base;
color: @text-color;
&-body {
transition: opacity 0.3s ease;
}
table {
width: 100%;
max-width: 100%;
border-collapse: separate;
text-align: left;
border-radius: @border-radius-base;
}
th {
background: @table-head-background-color;
font-weight: bold;
transition: background .3s ease;
.anticon-filter {
9 years ago
margin-left: 4px;
.iconfont-size-under-12px(10px);
cursor: pointer;
color: #aaa;
transition: all 0.3s ease;
&:hover {
color: #666;
}
}
10 years ago
.@{table-prefix-cls}-filter-selected.anticon-filter {
10 years ago
color: @primary-color;
}
&:first-child {
9 years ago
border-radius: @border-radius-base 0 0 0;
}
&:last-child {
9 years ago
border-radius: 0 @border-radius-base 0 0;
}
}
td {
border-bottom: 1px solid @table-border-color;
}
tr {
transition: all .3s ease;
&:hover {
background: tint(@primary-color, 90%);
}
}
tr.@{table-prefix-cls}-row-selected {
background: #fafafa;
}
th.@{table-prefix-cls}-column-sort {
background: #eaeaea;
}
th,
td {
padding: 16px 8px;
}
th.@{table-prefix-cls}-selection-column,
td.@{table-prefix-cls}-selection-column {
text-align: center;
width: 60px;
}
&-loading {
position: relative;
.@{table-prefix-cls}-body {
background: #fff;
opacity: 0.5;
9 years ago
}
.@{table-prefix-cls}-spin-holder {
9 years ago
height: 20px;
line-height: 20px;
left: 50%;
top: 50%;
margin-left: -30px;
position: absolute;
}
.@{table-prefix-cls}-with-pagination {
margin-top: -20px;
}
.@{table-prefix-cls}-without-pagination {
margin-top: 10px;
9 years ago
}
}
10 years ago
&-middle {
9 years ago
th,
td {
padding: 10px 8px;
}
}
10 years ago
&-small {
table {
border: 1px solid #e9e9e9;
padding: 0 8px;
}
10 years ago
th {
padding: 10px 8px;
background: #fff;
border-bottom: 1px solid #e9e9e9;
}
10 years ago
10 years ago
td {
padding: 6px 8px;
}
.ant-table-row:last-child td {
border-bottom: 0;
}
}
&-column-sorter {
9 years ago
margin-left: 4px;
display: inline-block;
width: 12px;
height: 14px;
vertical-align: middle;
text-align: center;
&-up,
&-down {
line-height: 4px;
height: 6px;
display: block;
width: 12px;
cursor: pointer;
&:hover .anticon {
color: #666;
}
&.on {
.anticon-caret-up,
.anticon-caret-down {
color: @primary-color;
}
}
}
.anticon-caret-up,
.anticon-caret-down {
.iconfont-size-under-12px(6px);
line-height: 6px;
height: 6px;
color: #aaa;
&:before {
-moz-transform-origin: 53% 50%; /* fix firefox position */
}
}
}
9 years ago
&.@{table-prefix-cls}-bordered {
table {
border: 1px solid #e9e9e9;
}
9 years ago
th {
border-bottom: 1px solid #e9e9e9;
9 years ago
}
tr:last-child {
td {
border-bottom: 0;
}
}
th,
td {
border-right: 1px solid #e9e9e9;
9 years ago
&:last-child {
border-right: 0;
}
}
}
&-empty {
position: relative;
margin-bottom: 16px;
}
&-empty &-body {
height: 150px;
}
&-placeholder {
height: 100px;
line-height: 100px;
text-align: center;
font-size: 12px;
color: #999;
border-bottom: 1px solid #e9e9e9;
position: absolute;
top: 50px;
left: 0;
width: 100%;
.anticon {
margin-right: 4px;
}
}
}
.@{table-prefix-cls}-pagination {
margin: 16px 0;
float: right;
}
.@{table-prefix-cls}-filter-dropdown {
min-width: 96px;
margin-left: -8px;
background: #fff;
border-radius: @border-radius-base;
border: 1px solid @border-color-base;
box-shadow: @box-shadow-base;
.ant-dropdown-menu {
max-height: 220px;
overflow: auto;
border: 0;
box-shadow: none;
border-radius: @border-radius-base @border-radius-base 0 0;
}
.ant-dropdown-menu-item {
overflow: hidden;
}
&-btns {
overflow: hidden;
padding: 7px 15px;
border-top: 1px solid @border-color-split;
}
&-link {
color: @link-color;
&:hover {
color: @link-hover-color;
}
&:active {
color: @link-active-color;
}
&.confirm {
float: left;
}
&.clear {
float: right;
}
}
}
9 years ago
.@{table-prefix-cls} {
&-row {
9 years ago
&-expand-icon {
cursor: pointer;
display: inline-block;
width: 18px;
height: 18px;
text-align: center;
line-height: 15px;
border: 1px solid #e9e9e9;
9 years ago
user-select: none;
background: #fff;
9 years ago
&-cell {
width: 18px;
}
}
&-expanded:after {
content: '-';
9 years ago
}
&-collapsed:after {
content: '+';
9 years ago
}
}
tr&-expanded-row {
&,
&:hover {
background: #fbfbfb;
}
}
9 years ago
}