mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-30 14:29:33 +08:00
b68ec83e36
1. 使用 Upload.dragger 代替 type 2. 将拖拽上传的内容区域交给用户自己实现 3. 改进 uploadList 的实现方式, 尽量避免使用 Dom 操作 4. 优化样式展现
85 lines
1.7 KiB
Plaintext
85 lines
1.7 KiB
Plaintext
@prefixUploadClass: ant-upload;
|
|
|
|
.@{prefixUploadClass} {
|
|
&.@{prefixUploadClass}-drag {
|
|
border: 1px dashed #d9d9d9;
|
|
transition: all 0.3s ease;
|
|
cursor: pointer;
|
|
border-radius: @border-radius-base;
|
|
text-align: center;
|
|
width: 100%;
|
|
height: 100%;
|
|
position: relative;
|
|
|
|
.@{prefixUploadClass}-drag-container {
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 50%;
|
|
transform: translate(-50%, -50%);
|
|
width: 100%;
|
|
}
|
|
&:hover {
|
|
border: 1px dashed #999;
|
|
}
|
|
p.@{prefixUploadClass}-drag-icon {
|
|
.anticon {
|
|
font-size: 80px;
|
|
margin-top: -30px;
|
|
color: tint(@primary-color, 20%);
|
|
}
|
|
height: 60px;
|
|
margin-bottom: 24px;
|
|
}
|
|
p.@{prefixUploadClass}-text {
|
|
font-size: 14px;
|
|
}
|
|
p.@{prefixUploadClass}-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;
|
|
}
|
|
}
|
|
}
|
|
|
|
.@{prefixUploadClass}-list {
|
|
margin-left: 4px;
|
|
margin-top: 8px;
|
|
.@{prefixUploadClass}-list-item {
|
|
margin-bottom: 4px;
|
|
height: 22px;
|
|
overflow: hidden;
|
|
.anticon {
|
|
margin-top: -2px;
|
|
.iconfont-size-under-12px(10px);
|
|
&.anticon-cross {
|
|
cursor: pointer;
|
|
color: #999;
|
|
&:hover {
|
|
color: #666;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.@{prefixUploadClass}-item-name {
|
|
font-size: 12px;
|
|
color: #666;
|
|
margin-left: 4px;
|
|
margin-right: 8px;
|
|
font-weight: normal;
|
|
}
|
|
.@{prefixUploadClass}-success-icon {
|
|
color: @success-color;
|
|
font-weight: bold;
|
|
}
|
|
}
|