当前位置:网站首页>Clear the selected data in the modal box after the modal box is closed
Clear the selected data in the modal box after the modal box is closed
2022-06-11 12:52:00 【It's Yanyan (whose vest)】
Here are some Inline code slice .
Bug: After the modal box is closed Open again and the selected data still exists 
be not in closeAdd() Inner emptying , At a higher level add() Inner emptying , It simplifies the code , Write less . Because not only the Cancel button but also the emptying event will occur
// html
<Button
type="success"
class="twoWord"
icon="md-add-circle"
@click="add()"
>{
{
$t("1002") }}</Button
>
//
<Modal>
<Select v-modedl="itemNumber">
<Option v-for=(item,index) in numList value = "item.id" :key = "key" >{
{
$t((item.name))}}</Option>
</Select>
</Modal>
// js
add(){
this.itemNumber = '';//v-momdel Two way binding value Value clear
this.numList = [];//option Of list empty , Re adjust the interface to get data
this.changeMater1();// Readjust the interface
}
// be not in closeAdd() Inner emptying
closeAdd(){
}
// Interface
changeMater1(){
this.axios.request({
url: '/tlm/ToolCompose/GetWheelList',
method: "get",
}).then(res => {
if (res.data.ret == 1 && Array.isArray(res.data.data)) {
this.numList = res.data.data
} else {
this.$Message.error(this.$t(res.data.msg))
}
})
},
边栏推荐
- How does the beauty salon management system solve the three problems of store operation?
- DB2数据库重建及表数据迁移探讨研究
- Is it safe to open an account online in 2022?
- 2. Completablefuture
- Mctalk's entrepreneurial voice - erudition and discernment: be interested in socializing, and provide a "small and beautiful" space for old friends before and after retirement
- 美容院管理系统如何解决门店运营的三大难题?
- Redis數據類型日常使用場景
- 电商发展的演变
- SQL的语法
- How to optimize SEO on the mobile terminal? Do you need to optimize GoogleSEO on the mobile terminal for a separate m domain name?
猜你喜欢

知麻Z1投影仪真的好用吗?实际效果怎么样?

What are the elements of running a gymnasium?

场馆坪效这么低?关键在这两方面
![[ArcGIS]城市关联度分析](/img/f4/454266e1ed586240bce9a7f36aa52e.png)
[ArcGIS]城市关联度分析

Venue floor efficiency is so low? The key lies in these two aspects

App manual signature of openharmony standard system

Oracle 将数据导出到CSV(Excel)文件的方法

4K投影儀哪款性價比最高,當貝X3 Pro高亮128G存儲618值得看

What are the ways for badminton halls to generate income

逆向学习入门-优秀的汇编调试工具OllyDbg
随机推荐
Redis RDB and AOF
机械设备制造企业,如何借助ERP系统做好委外加工管理?
【接口】看接口路径 查接口
How does Wireshark modify the display format of packet capturing time and date?
Technical difficulties of secsha
【增加功能】select下拉多选 显示选中的人员
经营养生理疗馆要注意什么问题?
2、CompletableFuture
Unity game protection "big training", read and understand the game's pre defense
PADS使用之绘制原理图
How to synchronize openstack RDO source to local for offline installation
Meichuang technology data security management platform won the "leading scientific and Technological Achievement Award" of 2022 digital Expo
2022年网上开户是安全的吗?
Application of pip2pi, pypiserver and Apache in PIP local source configuration
4K投影仪哪款性价比最高,当贝X3 Pro高亮128G存储618值得看
【问题总结】$t
2. Completablefuture
为什么现在的会员制仓储店都集体爆发了?
Schéma de dessin utilisé par les Pads
openharmony标准系统之app手动签名