当前位置:网站首页>使用el-upload封装得组件怎么清空已上传附件
使用el-upload封装得组件怎么清空已上传附件
2022-07-05 09:26:00 【左手牵**右手】
最近项目中一处附件上传,点击取消得时候要清空列表。因为本身附件上传组件已有删除,而这个取消按钮是不调用接口得。但是用组件属性就是会报错
,因此就让他局部刷新一下:
<div class="file-info bdr10"
v-if="isRouterAlive">
<!-- 1======课后作业 -->
<upload-file-flex ref="upload"
v-model="ruleForm.annex"
@getFileList="getFileList"
:accept="'.docx,.pdf'"
:limit="1"></upload-file-flex>
</div>
<div class="text-center"
style="margin-top:10px">
<el-button round
@click="removeFile"
size="mini">取消</el-button>
<el-button type="primary"
size="mini"
:ldstatus="ldstatus"
style="background: #056AFF;"
@click="subMit"
round>保存</el-button>
</div>
export default {
name: "app",
data() {
return {
isRouterAlive: true,
};
},
provide() {
return {
removeFile: this.removeFile,
};
},
methods: {
removeFile () {
this.isRouterAlive = false;
this.$nextTick(function () {
this.ruleForm.annex = ''
this.isRouterAlive = true;
});
},
},
};
边栏推荐
- Greendao reported an error in qigsaw, could not init daoconfig
- 2311. Longest binary subsequence less than or equal to K
- Unity SKFramework框架(二十四)、Avatar Controller 第三人称控制
- c语言指针深入理解
- Kotlin introductory notes (IV) circular statements (simple explanation of while, for)
- Introduction Guide to stereo vision (5): dual camera calibration [no more collection, I charge ~]
- Multiple solutions to one problem, asp Net core application startup initialization n schemes [Part 1]
- LeetCode 31. 下一个排列
- Editor use of VI and VIM
- What is a firewall? Explanation of basic knowledge of firewall
猜你喜欢
![Multiple solutions to one problem, asp Net core application startup initialization n schemes [Part 1]](/img/c4/27ae0d259abc4e61286c1f4d90c06a.png)
Multiple solutions to one problem, asp Net core application startup initialization n schemes [Part 1]
![[code practice] [stereo matching series] Classic ad census: (6) multi step parallax optimization](/img/54/cb1373fbe7b21c5383580e8b638a2c.jpg)
[code practice] [stereo matching series] Classic ad census: (6) multi step parallax optimization
![[technical school] spatial accuracy of binocular stereo vision system: accurate quantitative analysis](/img/59/823b587566f812c76e0e4dee486674.jpg)
[technical school] spatial accuracy of binocular stereo vision system: accurate quantitative analysis

Shutter uses overlay to realize global pop-up

OpenGL - Coordinate Systems

OpenGL - Lighting

OpenGL - Model Loading
![3D reconstruction open source code summary [keep updated]](/img/ec/984aede7ef9e758abd52fb5ff4e144.jpg)
3D reconstruction open source code summary [keep updated]

顶会论文看图对比学习(GNN+CL)研究趋势

nodejs_ 01_ fs. readFile
随机推荐
一题多解,ASP.NET Core应用启动初始化的N种方案[上篇]
[reading notes] Figure comparative learning gnn+cl
Kotlin introductory notes (VIII) collection and traversal
顶会论文看图对比学习(GNN+CL)研究趋势
【组队 PK 赛】本周任务已开启 | 答题挑战,夯实商品详情知识
[code practice] [stereo matching series] Classic ad census: (4) cross domain cost aggregation
Huber Loss
Codeforces round 684 (Div. 2) e - green shopping (line segment tree)
Figure neural network + comparative learning, where to go next?
Node collaboration and publishing
阿里十年测试带你走进APP测试的世界
High performance spark_ Transformation performance
Introduction Guide to stereo vision (5): dual camera calibration [no more collection, I charge ~]
Unity SKFramework框架(二十四)、Avatar Controller 第三人称控制
Ministry of transport and Ministry of Education: widely carry out water traffic safety publicity and drowning prevention safety reminders
Kotlin introductory notes (VII) data class and singleton class
2311. 小于等于 K 的最长二进制子序列
[code practice] [stereo matching series] Classic ad census: (6) multi step parallax optimization
Cloud computing technology hotspot
太不好用了,长文章加图文,今后只写小短文