赞
踩
1、设置el-upload ref的名字
<el-upload
ref='uploadFile'
action=""
:multiple="false"
:limit="1"
:on-change="handleFileChange"
:show-file-list="false"
>
<!-- :on-success="handleSuccess" -->
<el-button>浏览</el-button>
</el-upload>
2、在mounted中加入如下代码
mounted() {
this.$refs.uploadFile.$children[0].$refs.input.webkitdirectory = true
},
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。