vue——之清空input标签 中file的值
template中:<input type="file" ref="pathClear" @change="onUpload" name="file" id="file">methods中: onUpload(){this.$refs. pathClear.value
·
template中:
<input type="file" ref="pathClear" @change="onUpload" name="file" id="file">
methods中:
onUpload
(){
this
.
$refs
.
pathClear
.
value
=
''
},
更多推荐
已为社区贡献4条内容
所有评论(0)