当前位置:网站首页>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
边栏推荐
- Path environment variable
- Introduction to new functions of camtasia2022 software
- Do you really understand the principle of code scanning login?
- Deepinv20 installation MariaDB
- 文件操作《二》(5000字总结篇)
- Selenium IDE and XPath installation of chrome plug-in
- 杂文 谈谈古典的《拆掉思维里的墙》
- File upload and download of robot framework
- org. apache. parquet. schema. InvalidSchemaException: A group type can not be empty. Parquet does not su
- Node access to Alipay open platform sandbox to achieve payment function
猜你喜欢
How to choose the wireless gooseneck anchor microphone and handheld microphone scheme
Mock test using postman
Zhongang Mining: Fluorite Flotation Process
博士申请 | 厦门大学信息学院郭诗辉老师团队招收全奖博士/博后/实习生
∑GL-透视投影矩阵的推导
Construction of promtail + Loki + grafana log monitoring system
Use between nodejs modules
ByteVCharts可视化图表库,你想要的我都有
Loggie source code analysis source file module backbone analysis
Smart doc + Torna generate interface document
随机推荐
Go language RPC communication
扫码登录的原理你真的了解吗?
网络安全之渗透靶场实战详解
如何用Redis实现分布式锁?
Generation of barcode and QR code
_ Mold_ Board_
Dancenn: overview of byte self-developed 100 billion scale file metadata storage system
Nifi fast installation and file synchronization
Freecodecamp ---- budget & category exercise
深入了解3D模型相关知识(建模、材质贴图、UV、法线),置换贴图、凹凸贴图与法线贴图的区别
Wiper component encapsulation
[problem solving] [show2012] random tree
Shortcut keys (multiline)
VsCode-Go
Easyexcel reads the geographical location data in the excel table and sorts them according to Chinese pinyin
BUG_ me
【解决报错】Error in v-on handler: “TypeError: Cannot read property ‘resetFields’ of undefined”
AIOT产业技术全景结构-数字化架构设计(8)
1-1 NodeJS
Detailed explanation of the penetration of network security in the shooting range