@aplus-frontend/ui
Version:
198 lines (192 loc) • 4.71 kB
text/less
@import '../mixins/mixins.less';
@import '../mixins/config.less';
@import './ap-table-index.less';
@import './setting/index.less';
@import './ap-table-paragraph-ellipsis.less';
// 因为在ApTable里面可能会查询表单因此表单和控件的样式最好直接导入
@import '../ap-form/index.less';
@import '../ap-field/index.less';
@import '../ap-action/item.less';
@import '../ap-action/item-dropdown.less';
@import '../scroll-bar/index.less';
@sw: ~'--@{ns}-ap-table-scroll-bar-width';
.b(ap-table, {
.reset-scrollbar();
&-wrapper {
padding: @spacing;
background-color: #fff;
&:has(.ant-pagination) {
padding-bottom: 0;
}
}
&-adaptive {
height: 100%;
display: flex;
flex-direction: column;
.ant-table-wrapper {
flex: 1;
}
.ant-spin-nested-loading,.ant-spin-container {
height: 100%;
}
.ant-spin-container {
display: flex;
flex-direction: column;
}
.ant-table {
flex: 1;
}
.ant-table-container,.ant-table-content {
height: 100%;
}
.ant-table-content > table {
height: 100%;
}
}
&__search-wrapper {
padding: @spacing;
padding-bottom: 0;
background-color: #fff;
margin-bottom: 10px;
border-radius: @border-radius;
}
&__table-wrapper {
flex: 1;
max-height: 100%;
display: flex;
flex-direction: column;
}
&__table-wrapper-card {
padding: @spacing;
border-radius: @border-radius;
background-color: #fff;
overflow: hidden;
&:has(.ant-pagination) {
padding-bottom: 0;
}
}
&-table {
ul.ant-table-pagination.ant-pagination {
margin-block: @spacing;
align-items: center;
.ant-pagination-total-text {
flex: 1;
height: unset;
line-height: @line-height-base;
display: flex;
align-items: center;
}
}
tr > th.ant-table-cell {
&::before {
background-color: #D8DDE5 ;
}
background-color: var(--ap-table-header-bg, #F2F6F9);
}
}
.ant-table.ant-table-middle .ant-table-row .ant-table-cell:not(.ant-table-selection-column) {
padding: 9px 12px;
}
.ant-table.ant-table-middle .ant-table-thead .ant-table-cell:not(.ant-table-selection-column) {
padding: 9px 12px;
}
.ant-table.ant-table-small .ant-table-row .ant-table-cell:not(.ant-table-selection-column) {
padding: 6px 9px;
}
.ant-table.ant-table-small .ant-table-thead .ant-table-cell:not(.ant-table-selection-column) {
padding: 6px 9px;
}
.ant-table-placeholder .ant-table-expanded-row-fixed {
// 这里不需要滚动的时候显示单边框,因为默认情况下会显示双边框
&::after {
border-inline-end-width: 0px ;
}
}
// 重设当包含排序按钮时表头的样式
.ant-table-column-sorters {
justify-content: unset;
display: inline-flex;
.ant-table-column-title {
flex: unset;
}
}
// 重设当包含筛选按钮时表头的样式
.ant-table-filter-column {
justify-content: unset;
display: inline-flex;
.ant-table-column-title {
flex: unset;
}
.ant-table-filter-trigger {
margin-left: 2px;
padding-left: 2px;
}
}
.ant-table-cell .ant-typography {
margin-bottom: 0;
}
&-pagination-count-text {
color: var(--ap-text-color-2);
}
&-pagination--total-right {
padding-left: 12px;
}
&-pagination-total-wrapper {
color: var(--ap-text-color-1);
}
&-header-wrapper {
}
// ApTable的header区域
&-header {
padding-bottom: @spacing;
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: nowrap;
&__title {
flex: 1;
flex-shrink: 1;
min-width: 0;
}
}
// ApTable中Table的Header区域
&-table-header {
&__title {
display: -webkit-inline-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
white-space: normal;
max-width: 100%;
vertical-align: middle;
word-break: break-all;
flex: 1;
}
}
&-setting-trigger-button {
color: var(--ap-text-color-3);
&:hover {
color: unset;
}
}
// 粘贴布局并且滚动条占据空间
&--sticky-relative {
.ant-table-container{
& > div:last-child {
margin-bottom: calc(var(@sw) * -1);
clip-path: inset(0 0 var(@sw) 0);
}
}
}
// 粘贴布局滚动条不占据空间
&--sticky-absolute {
.ant-table-container{
& > div:last-child {
padding-bottom: 15px;
margin-bottom: -15px;
clip-path: inset(0 0 15px 0);
}
}
}
});