当前位置:网站首页>El cascade and El select click elsewhere to make the drop-down box disappear
El cascade and El select click elsewhere to make the drop-down box disappear
2022-04-23 17:03:00 【Eli-sun】
el-cascader:
You can give el-cascader Bind one @blur event
And then execute this.$refs.area.dropDownVisible = false This statement
<el-cascader
ref="area"
v-model="addForm.idList"
:props="defaultParams"
:options="treeList"
clearable
@change="handleChange"
@blur="close(1)"
/>
close(val) {
if (val === 1) {
this.$refs.area.dropDownVisible = false
} else if (val === 2) {
this.$refs.fixarea.dropDownVisible = false
}
},
el-select:
The same is true for binding a @blur event
Then execute this statement
<el-select
ref="fixdataDirect"
v-model="fixForm.dataDirect"
placeholder=" Please select data flow direction "
@blur="close(2)"
>
<el-option
v-for="item in dataList"
:key="item.id"
:label="item.label"
:value="item.value"
/>
</el-select>
close(val) {
if (val === 1) {
this.$refs.dataDirect.blur()
} else if (val === 2) {
this.$refs.fixdataDirect.blur()
}
},
版权声明
本文为[Eli-sun]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230554290264.html
边栏推荐
- Construction of promtail + Loki + grafana log monitoring system
- Easyexcel reads the geographical location data in the excel table and sorts them according to Chinese pinyin
- ACL 2022 | DialogVED:用于对话回复生成的预训练隐变量编码-解码模型
- Paging the list collection
- Lock锁
- PyMySQL
- Linux MySQL data timing dump
- Node access to Alipay open platform sandbox to achieve payment function
- 【PIMF】OpenHarmony啃论文俱乐部—在ACM Survey闲逛是什么体验
- Document operation II (5000 word summary)
猜你喜欢
DDT + Excel for interface test
Milvus 2.0 质量保障系统详解
SQL database
PyMySQL
File upload and download of robot framework
Smart doc + Torna generate interface document
信息摘要、数字签名、数字证书、对称加密与非对称加密详解
Node access to Alipay open platform sandbox to achieve payment function
Loggie source code analysis source file module backbone analysis
Milvus 2.0 détails du système d'assurance de la qualité
随机推荐
How to build tiktok user trust and drive fan growth
New keyword learning and summary
Lock锁
English | day15, 16 x sentence true research daily sentence (clause disconnection, modification)
博士申请 | 厦门大学信息学院郭诗辉老师团队招收全奖博士/博后/实习生
Feign report 400 processing
freeCodeCamp----prob_ Calculator exercise
Redis docker installation
Construction of promtail + Loki + grafana log monitoring system
Milvus 2.0 质量保障系统详解
Wiper component encapsulation
自定义my_strcpy与库strcpy【模拟实现字符串相关函数】
Deepinv20 installation MariaDB
Handwritten event publish subscribe framework
Dancenn: overview of byte self-developed 100 billion scale file metadata storage system
Deeply understand the relevant knowledge of 3D model (modeling, material mapping, UV, normal), and the difference between displacement mapping, bump mapping and normal mapping
计算饼状图百分比
网络安全之渗透靶场实战详解
STM32__03—初识定时器
Nifi fast installation and file synchronization