fastlion-amis
Version:
一种MIS页面生成工具
397 lines (377 loc) • 11.5 kB
text/typescript
import styled from 'styled-components';
const WrapperLionTableContainer = styled.div`
flex: 1;
overflow: auto;
box-sizing: border-box;
position: relative;
/* .lion-table-main {
height: 100%; */
.lion-table-loading {
position: absolute;
z-index: 8;
background-color: hsla(0, 0%, 100%, 0.9);
margin: 0;
top: 0;
right: 0;
bottom: 0;
left: 0;
transition: opacity 0.3s;
.lion-table-loading-wrapper {
top: 50%;
margin-top: -21px;
width: 100%;
text-align: center;
position: absolute;
}
}
.lion-table-container {
height: 100%;
background-color: #fff;
max-height: 100vh;
overflow: hidden;
box-shadow: 0 2px 4px 0 rgb(0 0 0 / 15%);
.lion-talbe-container-pagination {
background-color: inherit;
padding: 6px 16px;
text-align: right;
min-width: inherit;
.lion-talbe-container-pagination-wrapper {
white-space: nowrap;
padding: 0px 5px;
color: #303133;
font-weight: 700;
height:34px;
position:relative;
.ant-pagination-total-text {
margin-right: 10px;
font-weight: 400;
color: #606266;
}
.ant-pagination-prev {
margin: 0 5px;
min-width: 30px;
border-radius: 2px;
padding: 0;
.ant-pagination-item-link {
background-color: #f4f4f5;
}
}
.ant-pagination-item-active {
background-color: #3582fb;
color: #fff;
a {
color: #fff;
}
}
.ant-pagination-item {
margin: 0 3px;
border-radius: 2px;
}
.ant-pagination-next {
margin: 0 3px;
min-width: 30px;
border-radius: 2px;
padding: 0;
.ant-pagination-item-link {
background-color: #f4f4f5;
}
}
.ant-pagination-options {
.ant-pagination-options-size-changer {
display: inline-block;
font-size: 14px;
margin: 0 3px;
min-width: 35.5px;
height: 28px;
line-height: 28px;
vertical-align: top;
box-sizing: border-box;
margin: 0 10px 0 0;
font-weight: 400;
color: #606266;
.ant-select-selector {
height: 28px;
.ant-select-selection-search {
line-height: 25px;
}
.ant-select-selection-item {
line-height: 25px;
}
}
}
.ant-pagination-options-quick-jumper {
margin-left: 8px;
font-weight: 400;
color: #606266;
height: 28px;
line-height: 28px;
input {
height: 28px;
padding: 0 3px;
&:focus {
border-color: #3582fb;
}
}
}
.ant-select-item-option-content {
text-align: center;
}
}
}
}
.lion-table-container-body {
/* .lion-table-container-body-main { */
.lion-table-container-body-wrapper {
// border:0px !important;
border-top: 1px solid #f0f0f0;
border-right: 0;
border-bottom: 0;
font-size: 14px;
position: relative;
min-width: 700px;
.lion-table-header {
border-right: 1px solid #f0f0f0;
overflow: hidden;
overflow-y: scroll;
min-width: inherit;
::-webkit-scrollbar {
/*滚动条整体样式*/
width: 7px !important; /*高宽分别对应横竖滚动条的尺寸*/
height: 7px !important;
/* border-radius : 10px; */
}
::-webkit-scrollbar-corner {
background-color: #f6f6f6;
}
::-webkit-scrollbar-thumb {
/*滚动条里面小方块*/
border-radius: 2px;
background-color: #cdcdcd;
background-image: -webkit-linear-gradient(
45deg,
rgba(255, 255, 255, 0.2) 25%,
transparent 25%,
transparent 50%,
rgba(255, 255, 255, 0.2) 50%,
rgba(255, 255, 255, 0.2) 75%,
transparent 75%,
transparent
);
}
&::-webkit-scrollbar-track {
/*滚动条里面轨道*/
background: transparent;
border-radius: 2px;
}
}
.lion-table-body {
min-width: inherit;
overflow: auto scroll;
// border-bottom: 1px solid #f0f0f0;
// // border-right: 1px solid #f0f0f0;
::-webkit-scrollbar {
/*滚动条整体样式*/
width: 7px !important; /*高宽分别对应横竖滚动条的尺寸*/
height: 7px !important;
/* border-radius : 10px; */
}
::-webkit-scrollbar-corner {
background-color: #f6f6f6;
}
::-webkit-scrollbar-thumb {
/*滚动条里面小方块*/
border-radius: 2px;
background-color: #cdcdcd;
background-image: -webkit-linear-gradient(
45deg,
rgba(255, 255, 255, 0.2) 25%,
transparent 25%,
transparent 50%,
rgba(255, 255, 255, 0.2) 50%,
rgba(255, 255, 255, 0.2) 75%,
transparent 75%,
transparent
);
}
&::-webkit-scrollbar-track {
/*滚动条里面轨道*/
box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
background: #f6f6f6;
border-radius: 2px;
}
.lion-table-empty{
display:flex;
justify-content: center;
align-items:center;
top:40px;
padding-top:10px;
height:unset !important;
min-height:40px;
text-align:center;
overflow:hidden;
pointer-events: none;
.lion-table-empty-body{
display:block;
pointer-events: none;
// width:50%;
.lion-table-empty-container{
display:flex;
justify-content: center;
align-items:center;
>div{
padding:10px;
text-align:center;
>span{
color:#a5afb5;
font-size:14px;
top:-10px;
position: relative;
}
}
}
.empty-placeholder{
color:#888;
font-size:13px;
}
}
}
}
}
}
}
`;
const WrapperLionTableFix = styled.div`
.lion-talbe--fix--right--shadow {
box-shadow: -4px 0 6px -2px rgb(0 0 0 / 12%);
}
.lion-talbe--fix--left--shadow {
box-shadow: 4px 0 6px -2px rgb(0 0 0 / 12%);
}
.lion-table-container-fixed-wrapper--left {
width: 50px;
background: #fff;
left: 0;
position: absolute;
top: 0;
z-index: 5;
overflow: hidden;
transition: box-shadow 0.3s;
border-top:1px solid #f0f0f0;
/* box-shadow: 4px 0 6px -2px rgb(0 0 0 / 12%); */
.lion-table-container-fixed-header {
border-right: 1px solid #f0f0f0;
overflow: hidden;
min-width: inherit;
position: absolute;
border-radius:4px 0 0 0;
background-color: #f8f8f9;
top:0px;
left: 0px;
}
.lion-table-container-fixed-body {
min-width: inherit;
overflow: hidden;
top:40px;
left: 0px;
position: absolute;
border-radius:4px 0 0 0;
background-color: #fff;
// border-bottom: 1px solid #f0f0f0;
// // border-right: 1px solid #f0f0f0;
::-webkit-scrollbar {
/*滚动条整体样式*/
width: 0px !important; /*高宽分别对应横竖滚动条的尺寸*/
height: 0px !important;
/* border-radius : 10px; */
}
::-webkit-scrollbar-corner {
background-color: #f6f6f6;
}
::-webkit-scrollbar-thumb {
/*滚动条里面小方块*/
border-radius: 0px;
background-color: #cdcdcd;
background-image: -webkit-linear-gradient(
45deg,
rgba(255, 255, 255, 0.2) 25%,
transparent 25%,
transparent 50%,
rgba(255, 255, 255, 0.2) 50%,
rgba(255, 255, 255, 0.2) 75%,
transparent 75%,
transparent
);
}
::-webkit-scrollbar-track {
/*滚动条里面轨道*/
box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
background: #f6f6f6;
border-radius: 0px;
}
}
.fix--hidden {
visibility: hidden;
}
}
.lion-table-container-fixed-wrapper--right {
width: 200px;
background: #fff;
/* box-shadow: -4px 0 6px -2px rgb(0 0 0 / 12%); */
right: 5px;
position: absolute;
top: 0px;
z-index: 5;
overflow: hidden;
transition: box-shadow 0.3s;
border-top: 1px solid #f0f0f0;
/* border-left:1px solid #f0f0f0; */
.lion-table-container-fixed-header {
min-width: inherit;
overflow-x: hidden;
overflow-y: auto;
position: absolute;
top:0px;
right:0px;
}
.lion-table-container-fixed-body {
min-width: inherit;
overflow: hidden;
right:0px;
top:40px;
position: absolute;
// border-bottom: 1px solid #f0f0f0;
// // border-right: 1px solid #f0f0f0;
::-webkit-scrollbar {
/*滚动条整体样式*/
width: 0px !important; /*高宽分别对应横竖滚动条的尺寸*/
height: 0px !important;
/* border-radius : 10px; */
}
::-webkit-scrollbar-corner {
background-color: #f6f6f6;
}
::-webkit-scrollbar-thumb {
/*滚动条里面小方块*/
border-radius: 2px;
background-color: #cdcdcd;
background-image: -webkit-linear-gradient(
45deg,
rgba(255, 255, 255, 0.2) 25%,
transparent 25%,
transparent 50%,
rgba(255, 255, 255, 0.2) 50%,
rgba(255, 255, 255, 0.2) 75%,
transparent 75%,
transparent
);
}
::-webkit-scrollbar-track {
/*滚动条里面轨道*/
box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
background: #f6f6f6;
border-radius: 2px;
}
}
}
`;
export { WrapperLionTableContainer, WrapperLionTableFix };