<el-button class="file-box" text>
<input type="file" multiple class="file-btn" required
@change="setImage"/>上传
</el-button>
.file-box {
display: inline-block;
position: relative;
overflow: hidden;
color: rgb(252, 113, 0);
background-color: rgb(255, 255, 255);
}
.file-btn {
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
outline: none;
filter: alpha(opacity=0);
-moz-opacity: 0;
-khtml-opacity: 0;
opacity: 0;
}
这个前端页面的展示效果