当前位置:网站首页>模态框关闭后清空模态框里选择的数据
模态框关闭后清空模态框里选择的数据
2022-06-11 12:27:00 【是炎炎哦(谁的小马甲)】
下面展示一些 内联代码片。
Bug: 模态框关闭后 再次打开选择的数据仍然存在
不在closeAdd()里清空 ,在上一级里的add()里清空,可以简化代码,少写方法。因为不止取消按钮要发生清空事件
// 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 双向绑定的value值清空
this.numList = [];//option的list置空,重新调接口拿数据
this.changeMater1();//重新调接口
}
// 不在closeAdd()里清空
closeAdd(){
}
//接口
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))
}
})
},
边栏推荐
- openharmony标准系统之app手动签名
- Usage of instr function in Oracle Database
- Matrix elimination game
- 8、原子操作类之18罗汉增强
- 13. Explanation of reentrantlock, reentrantreadwritelock and stampedlock
- 1、线程基础知识
- Number selection (greed)
- C# System.Guid.NewGuid() 格式化
- Oracle DatabaseLink cross database connection
- Application of "knowing things by learning" behavior time series modeling in the identification of social drainage black production
猜你喜欢

11. Synchronized and lock escalation

Troubleshoot Splunk kvstore "starting"

netstat 命令详解

Redis data type Daily use Scenarios

Seckill multi-level cache ----- product details page

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

综合场馆的优势有哪些?

8. 18 arhat enhancements for atomic operations

How can I use a domain name to access a website?

Another way to achieve family reunion, 2022 flagship projection nut j10s is planted with grass
随机推荐
4、LockSupport与线程中断
ZABBIX installation and configuration application
Unity game protection "big training", read and understand the game's pre defense
羽毛球馆有哪些创收方式
2、CompletableFuture
电商发展的演变
Where is it safer to open an account for soda ash futures? How much is the margin for soda ash futures?
Master-slave replication of MySQL
Installation and use of saltstack
. 4 literal and variable
2. Completablefuture
场馆坪效这么低?关键在这两方面
美容院管理系统如何解决门店运营的三大难题?
PADS使用之繪制原理圖
PADS使用之绘制原理图
What are the advantages of comprehensive venues?
Record a troubleshooting of MySQL master-slave asynchrony
leetcode-59. Spiral matrix II JS
Number selection (greed)
What problems should be paid attention to in running health preserving physiotherapy center?