Lindy 141996b35e
feat(Uploader): add Uploader status display (#2929)
* feat(Uploader): add Uploader status display

* feat(Uploader): fix index.json
2020-04-01 13:04:26 +08:00

136 lines
2.9 KiB
Plaintext

@import '../common/style/var.less';
@import '../common/style/theme.less';
.van-uploader {
position: relative;
display: inline-block;
&__wrapper {
display: flex;
flex-wrap: wrap;
}
&__slot:empty {
display: none;
}
&__slot:not(:empty) + &__upload {
display: none !important;
}
&__upload {
position: relative;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
box-sizing: border-box;
width: @uploader-size;
height: @uploader-size;
margin: 0 @padding-xs @padding-xs 0;
background-color: @uploader-upload-background-color;
border-radius: @uploader-upload-border-radius;
&:active {
background-color: @uploader-upload-active-color;
}
&-icon {
color: @uploader-icon-color;
font-size: @uploader-icon-size;
}
&-text {
margin-top: @padding-xs;
color: @uploader-text-color;
font-size: @uploader-text-font-size;
}
&--disabled {
.theme(opacity, '@uploader-disabled-opacity');
}
}
&__preview {
position: relative;
margin: 0 @padding-xs @padding-xs 0;
cursor: pointer;
&-image {
display: block;
width: @uploader-size;
height: @uploader-size;
overflow: hidden;
border-radius: @uploader-upload-border-radius;
}
&-delete {
position: absolute;
top: -8px;
right: -8px;
color: @uploader-delete-color;
font-size: @uploader-delete-icon-size;
background-color: @uploader-delete-background-color;
border-radius: 100%;
}
}
&__file {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: @uploader-size;
height: @uploader-size;
background-color: @uploader-file-background-color;
border-radius: @uploader-upload-border-radius;
&-icon {
color: @uploader-file-icon-color;
font-size: @uploader-file-icon-size;
}
&-name {
box-sizing: border-box;
width: 100%;
margin-top: @uploader-file-name-margin-top;
padding: @uploader-file-name-padding;
color: @uploader-file-name-text-color;
font-size: @uploader-file-name-font-size;
text-align: center;
}
}
&__mask {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
color: @white;
background-color: @uploader-mask-background-color;
border-radius: @uploader-upload-border-radius;
&-icon {
font-size: @uploader-mask-icon-size;
}
&-message {
margin-top: 6px;
padding: 0 @padding-base;
font-size: @uploader-mask-message-font-size;
line-height: @uploader-mask-message-line-height;
}
}
&__loading {
width: @uploader-loading-icon-size;
height: @uploader-loading-icon-size;
color: @uploader-loading-icon-color;
}
}