当前位置:网站首页>element弹出框关闭并销毁:清空弹出里的数据缓存(整理)
element弹出框关闭并销毁:清空弹出里的数据缓存(整理)
2022-06-10 11:55:00 【000000001111】
问题:有的数据在打开添加的弹窗后,之前编辑内容里的数组还会存在
方案一、解决:加上v-if="diglogShow"就可以让页面在弹出框关闭的时候销毁弹出框,从而清理弹窗里的数据。
<el-dialog
title="我是标题"
top="8vh"
:visible.sync="dialogShow"
v-if="dialogShow"
width="60%">
</el-dialog>
方案二、解决:在需要处理掉的数据上加 :key=“timer”。
然后在显示此el-dialog对话框的时候,给timer日期赋值:this.timer = new Date().getTime();
<el-dialog
title="我是标题"
top="8vh"
:visible.sync="dialogShow"
v-if="dialogShow"
width="60%">
<el-form :model="staffForm" ref="staffForm" label-width="8vw">
<el-form-item label="上传产品说明" prop="describe" class="margin-top20" :key="timer">
<tinymce v-model="staffForm.describe" :height="300" />
</el-form-item>
</el-form>
</el-dialog>
addCourseClick() {
this.dialogShow = true;
this.timer = new Date().getTime();
},
边栏推荐
- Surrender firehouse database access: Twitter is ready to meet Musk's requirements
- [extensive reading of papers] distilling the knowledge in a neural network
- C语言最佳实践之库文件介绍(下)
- “易 +”开源计划丨基于 WebRTC 的低延时播放器设计和实践
- Massive data: the first stock of Huawei Gauss database (depth)
- 『忘了再学』Shell基础 — 29、AWK内置变量
- print(net) vs. net. parameters vs. net. named_ parameters
- "Yi +" open source program - Design and practice of low delay player based on webrtc
- Tmux使用
- Pytorch tensor高阶操作
猜你喜欢
随机推荐
【云图说】每个成功的业务系统都离不开APIG的保驾护航
print(net) vs. net. parameters vs. net. named_ parameters
定时刷数据库的数据,并只同步被修改的字段
360, Tsinghua | zero and R2D2: a large-scale Chinese cross modal benchmark and visual language Framework
Massive data: the first stock of Huawei Gauss database (depth)
安全工器具的使用和检查
更改系统时间
Transfomer components and pytoch
Web development
[yuntu Said] chaque système d'affaires réussi ne peut pas être séparé de l'escorte de l'apig
How data is stored in memory
西骏数据与阿里云携手合作,获得阿里云产品集成认证!
证券期货业迎数据监管新规,IP-guard助力完善数据安全管理
Transfomer self implementation and official library
[PaperNote] Web3 Direction
Fun face recognition software
2022 CISCN初赛 Satool
【限时】,干货满满
4.25 million budget bidding: centralized procurement of onsite maintenance services for Oracle, teledb, telepg and other core system databases of Jiangsu Telecom
【论文泛读】 知识蒸馏:Distilling the knowledge in a neural network








