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.
330 lines
6.0 KiB
330 lines
6.0 KiB
@upload-prefix-cls: ant-upload;
|
|
@upload-item: ant-upload-list-item;
|
|
@imgupload-size: 78px;
|
|
|
|
.@{upload-prefix-cls} {
|
|
|
|
> span {
|
|
display: block;
|
|
width: 100%;
|
|
}
|
|
|
|
input[type="file"] {
|
|
cursor: pointer;
|
|
}
|
|
|
|
&&-select {
|
|
display: inline-block;
|
|
}
|
|
|
|
&&-drag {
|
|
border: 1px dashed @border-color-base;
|
|
transition: border-color 0.3s ease;
|
|
cursor: pointer;
|
|
border-radius: @border-radius-base;
|
|
text-align: center;
|
|
width: 100%;
|
|
height: 100%;
|
|
position: relative;
|
|
|
|
&.@{upload-prefix-cls}-drag-hover {
|
|
border: 2px dashed tint(@primary-color, 20%);
|
|
}
|
|
|
|
> span {
|
|
display: table;
|
|
height: 100%;
|
|
}
|
|
|
|
.@{upload-prefix-cls}-drag-container {
|
|
display: table-cell;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
&:hover {
|
|
border-color: tint(@primary-color, 20%);
|
|
}
|
|
|
|
p.@{upload-prefix-cls}-drag-icon {
|
|
.anticon {
|
|
font-size: 80px;
|
|
margin-top: -5px;
|
|
color: tint(@primary-color, 20%);
|
|
}
|
|
height: 60px;
|
|
margin-bottom: 24px;
|
|
}
|
|
p.@{upload-prefix-cls}-text {
|
|
font-size: 14px;
|
|
}
|
|
p.@{upload-prefix-cls}-hint {
|
|
font-size: 12px;
|
|
color: #999;
|
|
}
|
|
.anticon-plus {
|
|
font-size: 30px;
|
|
transition: all 0.3s ease;
|
|
color: #d9d9d9;
|
|
&:hover {
|
|
color: #999;
|
|
}
|
|
}
|
|
&:hover .anticon-plus {
|
|
color: #999;
|
|
}
|
|
}
|
|
}
|
|
|
|
.@{upload-prefix-cls}-list {
|
|
&-item {
|
|
overflow: hidden;
|
|
margin-top: 8px;
|
|
font-size: 12px;
|
|
|
|
&-info {
|
|
height: 22px;
|
|
line-height: 22px;
|
|
padding: 0 4px;
|
|
transition: background-color 0.3s ease;
|
|
|
|
.anticon-paper-clip {
|
|
margin-right: 4px;
|
|
font-size: 12px;
|
|
color: #999;
|
|
}
|
|
.anticon-cross {
|
|
.iconfont-size-under-12px(10px);
|
|
transition: all 0.3s ease;
|
|
opacity: 0;
|
|
cursor: pointer;
|
|
float: right;
|
|
color: #999;
|
|
line-height: 22px;
|
|
&:hover {
|
|
color: #666;
|
|
}
|
|
}
|
|
}
|
|
|
|
&:hover &-info {
|
|
background-color: tint(@primary-color, 90%);
|
|
}
|
|
|
|
&:hover .anticon-cross {
|
|
opacity: 1;
|
|
}
|
|
|
|
&-error,
|
|
&-error .anticon-paper-clip {
|
|
color: @error-color;
|
|
}
|
|
|
|
&-error .anticon-cross {
|
|
opacity: 1;
|
|
}
|
|
|
|
&-progress {
|
|
padding: 0 8px 0 20px;
|
|
margin-top: -2px;
|
|
margin-bottom: 1px;
|
|
font-size: 12px;
|
|
.ant-progress-line-inner {
|
|
vertical-align: middle;
|
|
}
|
|
}
|
|
}
|
|
|
|
&-picture,
|
|
&-picture-card {
|
|
.@{upload-item} {
|
|
padding: 8px;
|
|
border-radius: @border-radius-base;
|
|
border: 1px solid @border-color-base;
|
|
height: 66px;
|
|
position: relative;
|
|
&:hover {
|
|
background: transparent;
|
|
}
|
|
}
|
|
|
|
.@{upload-item}-info {
|
|
padding: 0;
|
|
}
|
|
|
|
.@{upload-item}:hover .@{upload-item}-info {
|
|
background: transparent;
|
|
}
|
|
|
|
.@{upload-item}-uploading {
|
|
border-style: dashed;
|
|
}
|
|
|
|
.@{upload-item}-thumbnail {
|
|
width: 48px;
|
|
height: 48px;
|
|
display: inline-block;
|
|
overflow: hidden;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.@{upload-item}-thumbnail img {
|
|
width: 48px;
|
|
height: 48px;
|
|
display: block;
|
|
}
|
|
|
|
.@{upload-item}-thumbnail.anticon:before {
|
|
line-height: 48px;
|
|
font-size: 24px;
|
|
color: #999;
|
|
}
|
|
|
|
.@{upload-item}-name {
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
margin: 0 0 0 8px;
|
|
line-height: 42px;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.@{upload-item}-uploading .@{upload-item}-name {
|
|
line-height: 28px;
|
|
}
|
|
|
|
.@{upload-item}-progress {
|
|
padding-left: 56px;
|
|
margin-top: 0;
|
|
}
|
|
|
|
.anticon-cross {
|
|
position: absolute;
|
|
right: 8px;
|
|
top: 8px;
|
|
line-height: 1;
|
|
}
|
|
}
|
|
|
|
&-picture-card {
|
|
display: inline-block;
|
|
float: left;
|
|
height: @imgupload-size + 18;
|
|
|
|
.@{upload-item} {
|
|
display: inline-block;
|
|
width: @imgupload-size + 18;
|
|
height: @imgupload-size + 18;
|
|
margin-right: 8px;
|
|
margin-top: 0;
|
|
}
|
|
|
|
.@{upload-item}-info {
|
|
height: auto;
|
|
|
|
&:before {
|
|
content: ' ';
|
|
position: absolute;
|
|
width: @imgupload-size;
|
|
height: @imgupload-size;
|
|
background-color: #808080;
|
|
transition: all 0.3s ease;
|
|
opacity: 0;
|
|
}
|
|
|
|
.anticon-eye-o,
|
|
.anticon-delete {
|
|
position: absolute;
|
|
left: 25px;
|
|
top: 40px;
|
|
transition: all 0.3s ease;
|
|
cursor: pointer;
|
|
font-size: 16px;
|
|
line-height: 1;
|
|
color: #fff;
|
|
opacity: 0;
|
|
-webkit-font-smoothing: antialiased; /*解决safair和chrome被加粗*/
|
|
-webkit-text-stroke-width: 0.2px; /*解决chrome锯齿*/
|
|
}
|
|
|
|
.anticon-delete {
|
|
left: 56px;
|
|
}
|
|
|
|
&:hover {
|
|
&:before {
|
|
opacity: .8;
|
|
}
|
|
|
|
.anticon-eye-o,
|
|
.anticon-delete {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
}
|
|
|
|
.@{upload-item}-thumbnail {
|
|
width: @imgupload-size;
|
|
height: @imgupload-size;
|
|
}
|
|
|
|
.@{upload-item}-thumbnail img {
|
|
width: @imgupload-size;
|
|
height: @imgupload-size;
|
|
}
|
|
|
|
.@{upload-item}-name {
|
|
display: none;
|
|
}
|
|
|
|
.@{upload-item}-uploading {
|
|
|
|
&.@{upload-item} {
|
|
background-color: #fbfbfb;
|
|
}
|
|
|
|
.@{upload-item}-info {
|
|
&:before,
|
|
.anticon-eye-o,
|
|
.anticon-delete {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
&-text {
|
|
margin-top: 18px;
|
|
color: #999;
|
|
}
|
|
}
|
|
|
|
.@{upload-item}-progress {
|
|
padding-left: 0;
|
|
}
|
|
}
|
|
|
|
.@{upload-prefix-cls}-success-icon {
|
|
color: @success-color;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.@{upload-prefix-cls}-margin-top-enter {
|
|
animation: uploadMarginTopIn .3s @ease-in-out-circ;
|
|
}
|
|
|
|
.@{upload-prefix-cls}-margin-top-leave {
|
|
animation: uploadMarginTopOut .3s @ease-in-out-circ;
|
|
}
|
|
}
|
|
|
|
@keyframes uploadMarginTopIn {
|
|
from {
|
|
margin-top: -25px;
|
|
opacity: 0;
|
|
}
|
|
}
|
|
|
|
@keyframes uploadMarginTopOut {
|
|
to {
|
|
margin-top: -25px;
|
|
opacity: 0;
|
|
}
|
|
}
|
|
|