fastlion-amis
Version:
一种MIS页面生成工具
318 lines (308 loc) • 8.09 kB
text/typescript
import styled from 'styled-components';
import Modal from 'antd/lib/Modal';
export const WrapperFileUpload = styled.div`
span {
display: flex;
flex-direction: column;
align-items: flex-start;
.ant-upload-select {
padding-left: 4px;
}
.ant-upload-list-text{
width: ${(props: any) => props?.charWidth ? '100%' : 'unset'};
}
.ant-upload-list-text-container {
:first-child {
margin-top: 5px;
}
:hover {
.ant-upload-span {
background: #f5f7fa;
.ant-upload-list-item-name {
color: #3582fb !important;
}
.ant-upload-list-item-card-actions{
display: flex;
}
:before {
transition: color 0.3s;
display: none;
}
}
}
}
.ant-upload-span {
display: -webkit-box !important;
padding: 2px 0;
box-sizing: content-box;
position: relative;
margin-top: 10px;
transition: all 0.5s cubic-bezier(0.55, 0, 0.1, 1);
font-size: 14px;
color: #606266;
line-height: 1.8;
position: relative;
margin-top: 4px;
box-sizing: border-box;
border-radius: 4px;
width: 100%;
background: transparent;
list-style: none;
cursor: pointer;
:before {
font-family: 'iconfont' !important;
font-size: 13px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
position: absolute;
content: '\\e677';
display: block;
color: #9fec76;
top: 0px;
right: 5px;
border-radius: 10px; /**控制形状**/
}
.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 {
width: auto;
color: #606266;
width: unset;
display: block;
margin-right: 40px;
background: inherit;
overflow: hidden;
padding-left: 4px;
text-overflow: ellipsis;
transition: color 0.3s;
white-space: nowrap;
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;
display: none;
flex-direction:row;
transition: all .3s;
button {
width: 20px;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
background: transparent !important;
.anticon-close {
top: unset;
right: 6px;
}
}
}
}
}
`;
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;
}
}
}
}
}
}
}
`;
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);
`;