@nutui/nutui-react-taro
Version:
京东风格的轻量级移动端 React 组件库,支持一套代码生成 H5 和小程序
241 lines (240 loc) • 4.87 kB
CSS
/* #ifdef harmony */
/* #endif */
/* #ifndef harmony */
/* #endif */
.nut-uploader {
position: relative;
display: flex;
flex-wrap: wrap;
}
.nut-uploader-slot {
position: relative;
}
.nut-uploader-upload {
position: relative;
display: flex;
align-items: center;
justify-content: center;
background: #f2f3f5;
width: 100px;
height: 100px;
border: 0px;
border-radius: 4px;
}
.nut-uploader-icon {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
color: #888b94;
}
.nut-uploader-icon i {
color: #888b94;
margin-bottom: 6px;
}
.nut-uploader-icon .nut-icon {
color: #888b94;
margin-bottom: 6px;
}
.nut-uploader-icon-tip {
font-size: 12px;
}
.nut-uploader-input {
position: absolute ;
top: 0;
left: 0;
width: 100% ;
height: 100% ;
overflow: hidden;
cursor: pointer;
opacity: 0;
}
.nut-uploader-input:disabled {
cursor: not-allowed;
}
.nut-uploader-upload-disabled {
background: #f2f3f5;
color: #c2c4cc;
}
.nut-uploader-upload-disabled .nut-uploader-icon i {
color: #c2c4cc;
margin-bottom: 6px;
}
.nut-uploader-upload-disabled .nut-uploader-icon .nut-icon {
color: #c2c4cc;
margin-bottom: 6px;
}
.nut-uploader-preview {
position: relative;
margin-right: 10px;
margin-bottom: 10px;
border-radius: 4px;
box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.1);
}
.nut-uploader-preview-progress {
position: absolute;
left: 0;
top: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.7);
border-radius: 4px;
}
.nut-uploader-preview-progress i {
margin-bottom: 6px;
}
.nut-uploader-preview-progress-msg {
color: #888b94;
font-size: 12px;
}
.nut-uploader-preview.list {
width: 100%;
margin-right: 0px;
margin-bottom: 0px;
margin-top: 10px;
box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.01);
}
.nut-uploader-preview-list {
width: 100%;
height: 32px;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 10px;
background-color: #f7f8fc;
}
.nut-uploader-preview-list .nut-uploader-preview-img-file-name {
display: flex;
align-items: center;
-webkit-line-clamp: 1;
padding: 2px;
height: 24px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.nut-uploader-preview-list .nut-progress {
position: absolute;
left: 0;
right: 0;
bottom: 0;
}
.nut-uploader-preview-list .nut-progress .nut-progress-outer {
height: 2px ;
}
.nut-uploader-preview .close {
position: absolute;
right: 0px;
top: 0px;
transform: translate(50%, -50%);
z-index: 1;
}
.nut-uploader-preview-img {
position: relative;
width: 100px;
height: 100px;
border-radius: 4px;
overflow: hidden;
}
.nut-uploader-preview-img i {
color: #1a1a1a;
}
.nut-uploader-preview-img .tips {
position: absolute;
bottom: 0;
left: 0;
font-size: 12px;
color: #ffffff;
text-align: center;
box-sizing: border-box;
height: 24px;
line-height: 24px;
border-radius: 4px;
border-top-left-radius: 0;
border-top-right-radius: 0;
padding: 0 5px;
background: rgba(0, 0, 0, 0.4);
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.nut-uploader-preview-img-c {
display: flex;
justify-content: center;
align-items: center;
height: 100%;
position: initial;
border-radius: 4px;
}
.nut-uploader-preview-img-file {
height: 100%;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.3s;
}
.nut-uploader-preview-img-file-name {
display: flex;
width: 90%;
font-size: 12px;
color: #505259;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
word-break: break-all;
}
.nut-uploader-preview-img-file-name.error {
color: red ;
}
.nut-uploader-preview-img-file-name.success {
color: #1890ff ;
}
.nut-uploader-preview-img-file-name .nut-icon-Link {
flex-shrink: 0;
}
[dir=rtl] .nut-uploader-input,
.nut-rtl .nut-uploader-input {
left: auto;
right: 0;
}
[dir=rtl] .nut-uploader-preview {
margin-right: 0;
margin-left: 10px;
}
.nut-rtl .nut-uploader-preview {
margin-right: 0;
margin-left: 10px;
}
[dir=rtl] .nut-uploader-preview-progress,
.nut-rtl .nut-uploader-preview-progress {
left: auto;
right: 0;
}
[dir=rtl] .nut-uploader-preview.list,
.nut-rtl .nut-uploader-preview.list {
margin-right: 0;
margin-left: 0px;
}
[dir=rtl] .nut-uploader-preview .close {
right: auto;
left: 0px;
transform: translate(-50%, -50%);
}
.nut-rtl .nut-uploader-preview .close {
right: auto;
left: 0px;
transform: translate(-50%, -50%);
}
[dir=rtl] .nut-uploader-preview-img .tips,
.nut-rtl .nut-uploader-preview-img .tips {
left: auto;
right: 0;
}