当前位置:网站首页>使用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;
});
},
},
};
边栏推荐
- [technical school] spatial accuracy of binocular stereo vision system: accurate quantitative analysis
- Rebuild my 3D world [open source] [serialization-3] [comparison between colmap and openmvg]
- 编辑器-vi、vim的使用
- LeetCode 496. 下一个更大元素 I
- Nips2021 | new SOTA for node classification beyond graphcl, gnn+ comparative learning
- 2311. 小于等于 K 的最长二进制子序列
- 【组队 PK 赛】本周任务已开启 | 答题挑战,夯实商品详情知识
- 基于STM32单片机的测温仪(带人脸检测)
- STM32 simple multi-level menu (array table lookup method)
- Applet global style configuration window
猜你喜欢
Global configuration tabbar
Kotlin introductory notes (II) a brief introduction to kotlin functions
Hosting environment API
一题多解,ASP.NET Core应用启动初始化的N种方案[上篇]
nodejs_ 01_ fs. readFile
Can't find the activitymainbinding class? The pit I stepped on when I just learned databinding
一篇文章带你走进cookie,session,Token的世界
An article takes you into the world of cookies, sessions, and tokens
[code practice] [stereo matching series] Classic ad census: (6) multi step parallax optimization
Hi Fun Summer, play SQL planner with starrocks!
随机推荐
利用请求头开发多端应用
生成对抗网络
[code practice] [stereo matching series] Classic ad census: (5) scan line optimization
Unity skframework framework (24), avatar controller third person control
Priority queue (heap)
OpenGL - Coordinate Systems
np. allclose
【组队 PK 赛】本周任务已开启 | 答题挑战,夯实商品详情知识
Shutter uses overlay to realize global pop-up
np.allclose
Node collaboration and publishing
Nodemon installation and use
2011-11-21 training record personal training (III)
Jenkins pipeline method (function) definition and call
Greendao reported an error in qigsaw, could not init daoconfig
高性能Spark_transformation性能
LeetCode 31. 下一个排列
Wxml template syntax
Cloud computing technology hotspot
Nips2021 | new SOTA for node classification beyond graphcl, gnn+ comparative learning