问题:写了样式但是遇到问题如下图:
解决方法:
::v-deep .el-upload {
display: flex;
justify-content: center;
align-items: center;
}
因为上传的图标被包含在el-upload中,而删除按钮并没有被包含在el-upload中。 所以整体的样式对应上传有偏差。
.label-column {
display: flex;
justify-content: end;
align-items: center;
}
<el-upload
action
:show-file-list="false"
accept=".doc, .docx, .pdf, .xlsx, .xls, .png, .gif, .jpg, .bmp, .svg"
:http-request="uploadFile"
>
<el-tooltip content="上传" placement="top">
<img
src="@/assets/upload_file.png"
alt="Button Image"
class="image-button"
@click="uploadType(scope.row)"
/>
</el-tooltip>
</el-upload>