需求:element-ui 中 Upload 上傳文件縮略圖嗜憔,只顯示一張展示圖片,其他樣式都隱藏
element-ui 中 Upload 上傳文件縮略圖氏仗,移入圖片的時(shí)候有刪除選項(xiàng)和灰色背景以及右上角綠色區(qū)域吉捶,怎么利用前端的方式將刪除方式隱藏
-
Upload 上傳文件縮略圖,只一張顯示圖片皆尔,不允許出現(xiàn)添加圖片的樣式
- 鼠標(biāo)移入圖片刪除圖標(biāo)隱藏
/deep/ .el-upload-list__item-delete{
display: none !important;
}
- 鼠標(biāo)移入讓灰色區(qū)域透明
/deep/ .el-upload-list--picture-card .el-upload-list__item-actions:hover{
opacity: 0 !important;
}
- 添加圖片區(qū)域隱藏
/deep/ .el-upload.el-upload--picture-card{
display: none;
}
- 右上角綠色區(qū)域隱藏
/deep/ .el-upload-list__item-status-label{
display: none !important;
}