fastlion-amis
Version:
一种MIS页面生成工具
348 lines (334 loc) • 8.8 kB
text/typescript
import styled from 'styled-components';
import Modal from 'antd/lib/Modal';
export const WrapperFileItem = styled.div`
.ant-upload-span{
::before{
display: ${(props: any) => props?.status === 'done' ? 'block' : 'none !important'};
}
.ant-upload-text-icon{
color: ${(props: any) => props?.status === 'error' ? '#ff4d4f !important' : 'normal'};
}
.ant-upload-list-item-name{
color: ${(props: any) => props?.status === 'error' ? '#ff4d4f !important' : 'normal'};
}
}
`
export const WrapperFileUpload = styled.div`
span {
display: flex;
flex-direction: column;
align-items: flex-start;
.ant-upload-select {
padding-left: 4px;
}
.ant-upload-list{
width:100%;
}
.ant-upload-list-text-container {
transition: all 0.5s cubic-bezier(0.55, 0, 0.1, 1);
.lion-upload-itemrender--container{
display: flex;
margin-top:8px;
.ant-upload-list-item{
margin: 0;
}
.lion-upload-itemrender--notiy{
cursor: pointer;
overflow: hidden;
white-space: pre-wrap;
text-overflow: ellipsis;
}
}
:first-child {
margin-top: 5px;
}
:hover {
.lion-upload-itemrender--container{
background: #f5f7fa;
}
.ant-upload-span {
/* background: #f5f7fa; */
.ant-upload-list-item-name {
color: #3582fb !important;
}
:before {
transition: color 0.3s;
display: none;
}
}
.lion-upload-itemrender--notiy{
/* background: #f5f7fa; */
/* color: #3582fb !important; */
}
}
}
.ant-upload-span {
display: -webkit-box !important;
padding: 2px 0;
box-sizing: content-box;
position: relative;
transition: all 0.5s cubic-bezier(0.55, 0, 0.1, 1);
font-size: 14px;
color: #606266;
line-height: 1.8;
position: relative;
box-sizing: border-box;
border-radius: 4px;
width: 100%;
background: transparent;
list-style: none;
cursor: pointer;
.ant-upload-text-icon {
height: 100%;
margin-right: 7px;
color: #909399;
line-height: inherit;
font-family: element-icons !important;
font-style: normal;
font-weight: 400;
font-variant: normal;
text-transform: none;
vertical-align: baseline;
display: flex;
justify-content: center;
align-items: center;
.anticon-file-text {
font-size: 13px;
}
}
.ant-upload-list-item-name {
color: #606266;
width: 120px;
display: block;
margin-right: 40px;
background: inherit;
overflow: hidden;
padding-left: 4px;
text-overflow: ellipsis;
transition: color 0.3s;
white-space: pre-wrap;
line-height: 1.3;
font-size: 13px;
}
.ant-upload-list-item-card-actions {
position: absolute;
height: 100%;
top: 0px;
text-align: center;
background: transparent !important;
button {
height: 100%;
display: flex;
justify-content: center;
align-items: center;
background: transparent !important;
.anticon-close {
top: unset;
right: unset;
}
}
}
}
}
`;
export const WrapperBtn = styled.button.attrs({
className: 'import-btn-click'
})`
font-size: 13px;
background-color: #3574ee;
box-shadow: none;
margin-bottom: 0px !important;
border-color: #2a87eb;
text-shadow: none;
color: #fff !important;
font-weight: 400;
white-space: nowrap;
text-align: center;
border: 1px solid #d9d9d9;
border-radius: 4px;
line-height: 1.499 !important;
cursor: pointer;
font-family: Arial, Helvetica, sans-serif !important;
padding: 4px 12px;
height: 31px;
&:hover {
background-color: #007df1;
border-color: #0076e4;
color: #fff;
}
`;
export const WrapperModal = styled(Modal).attrs({
className: 'lion-cell-import'
})`
.ant-modal-content {
width: 500px;
.ant-modal-close {
.ant-modal-close-x {
width: 28px;
height: 28px;
line-height: 40px;
}
}
.ant-modal-header {
border-bottom: 1px solid #e8e8e8;
padding: 0 20px;
height: 40px;
min-height: 40px;
max-height: 40px;
color: #444;
font-size: 14px;
font-weight: 700;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: space-between;
.ant-modal-title {
font-weight: 700;
}
}
.ant-modal-body {
flex: 1;
overflow: auto;
padding: 10px;
color: #606266;
font-size: 14px;
word-break: break-all;
.import-body {
width: 100%;
position: relative;
.import-Upload {
color: #606266;
font-size: 14px;
word-break: break-all;
margin: 5px 0 15px;
font-family: Verdana, PingFangSC-Regular, PingFang SC, -apple-system,
BlinkMacSystemFont, Segoe UI, Hiragino Sans GB, Microsoft YaHei,
Helvetica Neue, Helvetica, Arial, sans-serif, Apple Color Emoji,
Segoe UI Emoji, Segoe UI Symbol;
.import-reload-btn {
display: none;
}
.import-btn {
height: 32px;
box-shadow: none;
margin-bottom: 0px;
background-color: #2a87eb;
border-color: #2a87eb;
text-shadow: none;
color: #fff;
font-weight: 400;
white-space: nowrap;
text-align: center;
padding: 0 15px;
border: 1px solid #d9d9d9;
border-radius: 4px;
line-height: 1.499;
cursor: pointer;
&:hover {
background-color: #5d9bfc;
border-color: #5d9bfc;
color: #fff;
}
}
.download-model {
height: 32px;
box-shadow: none;
margin-left: 10px;
margin-bottom: 0px;
background-color: #2a87eb;
border-color: #2a87eb;
text-shadow: none;
color: #fff;
font-weight: 400;
white-space: nowrap;
text-align: center;
padding: 0 15px;
border: 1px solid #d9d9d9;
border-radius: 4px;
line-height: 1.499;
cursor: pointer;
margin-left: 60px;
border-color: transparent;
color: #3582fb;
background: transparent;
padding-left: 0;
padding-right: 0;
padding: 9px 15px;
border-radius: 3px;
&:hover {
color: #5d9bfc;
border-color: transparent;
background-color: transparent;
}
}
}
.import-Tip {
width: 100%;
padding: 8px 16px;
margin: 0;
box-sizing: border-box;
position: relative;
overflow: hidden;
opacity: 1;
display: flex;
align-items: center;
transition: opacity 0.2s;
font-size: 12px;
border-radius: 2px;
background-color: #e5f0ff;
border: 1px solid #97c7ff;
.import-cell {
display: table-cell;
padding: 0 8px;
font-size: 12px;
.import-rules {
margin-bottom: 10px;
font-size: 12px;
color: #606266;
margin-top: 5px;
}
ol {
color: #003b80;
> li {
margin-bottom: 5px;
font-size: 12px;
list-style: decimal;
}
}
}
}
}
}
}
@media screen and (max-width:767px) {
.ant-modal-content{
width: calc(100vw - 16px) !important;
border-radius:16px;
.ant-modal-header{
border-radius:16px 16px 0 0;
}
.ant-modal-body{
.import-body{
.import-Tip{
border-radius:8px
}
}
}
}
}
`;
export const WrapperLoading = styled.div`
opacity: 1;
position: absolute;
z-index: 10000;
width: 100%;
height: 100%;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
display: flex;
justify-content: center;
align-items: center;
transition: opacity 0.3s ease 0s;
background-color: rgba(255, 255, 255, 0.9);
`;