当前位置:网站首页>使用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;
});
},
},
};
边栏推荐
- 项目实战 | Excel导出功能
- [beauty of algebra] solution method of linear equations ax=0
- Unity SKFramework框架(二十二)、Runtime Console 运行时调试工具
- Applet data attribute method
- Codeworks round 681 (Div. 2) supplement
- OpenGL - Lighting
- LeetCode 503. 下一个更大元素 II
- 【愚公系列】2022年7月 Go教学课程 003-IDE的安装和基本使用
- [code practice] [stereo matching series] Classic ad census: (4) cross domain cost aggregation
- 【阅读笔记】图对比学习 GNN+CL
猜你喜欢

信息與熵,你想知道的都在這裏了

nodejs_ 01_ fs. readFile

What is a firewall? Explanation of basic knowledge of firewall

Confusion matrix

Unity SKFramework框架(二十三)、MiniMap 小地图工具

L'information et l'entropie, tout ce que vous voulez savoir est ici.

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

Hosting environment API

Kotlin introductory notes (VII) data class and singleton class

Node collaboration and publishing
随机推荐
Wxml template syntax
OpenGL - Coordinate Systems
Kotlin introductory notes (VIII) collection and traversal
C # image difference comparison: image subtraction (pointer method, high speed)
云计算技术热点
Summary of "reversal" problem in challenge Programming Competition
AUTOSAR from getting started to mastering 100 lectures (103) -dbc file format and creation details
OpenGL - Lighting
【PyTorch Bug】RuntimeError: Boolean value of Tensor with more than one value is ambiguous
编辑器-vi、vim的使用
Priority queue (heap)
scipy.misc.imread()
Blogger article navigation (classified, real-time update, permanent top)
Talking about label smoothing technology
[code practice] [stereo matching series] Classic ad census: (5) scan line optimization
[beauty of algebra] solution method of linear equations ax=0
Unity skframework framework (XXIII), minimap small map tool
Introduction Guide to stereo vision (1): coordinate system and camera parameters
一次 Keepalived 高可用的事故,让我重学了一遍它
太不好用了,长文章加图文,今后只写小短文