当前位置:网站首页>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
边栏推荐
猜你喜欢

Easyexcel reads the geographical location data in the excel table and sorts them according to Chinese pinyin

Smart doc + Torna generate interface document

How much do you know about the process of the interview

VLAN advanced technology, VLAN aggregation, super VLAN, sub VLAN

Idea of batch manufacturing test data, with source code

Detailed explanation of Milvus 2.0 quality assurance system

PyMySQL

Rtklib 2.4.3 source code Notes

博士申请 | 厦门大学信息学院郭诗辉老师团队招收全奖博士/博后/实习生

vscode如何比较两个文件的异同
随机推荐
MySQL master-slave configuration under CentOS
Feign report 400 processing
Kingdee Cloud Star API calling practice
Use between nodejs modules
Milvus 2.0 质量保障系统详解
Use case execution of robot framework
扫码登录的原理你真的了解吗?
freeCodeCamp----shape_ Calculator exercise
博士申请 | 厦门大学信息学院郭诗辉老师团队招收全奖博士/博后/实习生
Sub database and sub table & shardingsphere
1-2 characteristics of nodejs
正则过滤内网地址和网段
Generation of barcode and QR code
Talk about browser cache control
MySQL master-slave synchronization pit avoidance version tutorial
【PIMF】OpenHarmony啃论文俱乐部—在ACM Survey闲逛是什么体验
Bytevcharts visual chart library, I have everything you want
File upload and download of robot framework
websocket
Deeply understand the relevant knowledge of 3D model (modeling, material mapping, UV, normal), and the difference between displacement mapping, bump mapping and normal mapping