当前位置:网站首页>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))
}
})
},
边栏推荐
- imx6ul开发板移植主线u-boot之EMMC启动流程
- After Oracle deletes a user, it can still use the user to log in
- CMD of Jerry's AI protocol_ SET_ BLE_ Format of visibility command [chapter]
- openharmony标准系统移植之音频适配
- 场馆坪效这么低?关键在这两方面
- Redis RDB and AOF
- What are the ways for badminton halls to generate income
- STM32 development of practical series 7-data Porter DMA
- 经营养生理疗馆要注意什么问题?
- How can I use a domain name to access a website?
猜你喜欢

Log management system, summary in multiple ways

2、CompletableFuture

Quel projecteur 4K est le meilleur rapport qualité - prix, quand bex3 pro met en évidence 128g Storage 618 vaut la peine de voir

How Oracle exports data to CSV (Excel) files

秒杀整体的技术难点

oracle删除用户后,却还可以使用该用户登录

Schéma de dessin utilisé par les Pads

非标自动化设备制造企业,如何借助ERP系统实现快速精准报价?

综合场馆的优势有哪些?

2. Completablefuture
随机推荐
如何同步openstack RDO源至本地进行离线安装
【bug解决】上传图片后,取消这次上传 再次执行上传,上次的图片还存在
知物由学 | 行为时序建模在社交引流黑产识别中的应用
How does the beauty salon management system solve the three problems of store operation?
What are the elements of running a gymnasium?
Where is it safer to open an account for soda ash futures? How much is the margin for soda ash futures?
记录一次jvm GC过程
pip2pi和pypiserver及Apache在pip本地源配置中的应用实践
联想小新520怎么样?对比当贝D3X哪款更值得买?
Another way to achieve family reunion, 2022 flagship projection nut j10s is planted with grass
oracle数据库中 instr函数的用法
Luo Jing: connection Efficiency Optimization Practice
Matrix elimination game
Jerry's AI CMD_ SET_ BLE_ Name [chapter]
What are the ways for badminton halls to generate income
How Oracle exports data to CSV (Excel) files
CMD of Jerry's AI protocol_ SET_ BT_ Name [chapter]
2、CompletableFuture
经营养生理疗馆要注意什么问题?
UI inspiration analysis Notes 6: feature