fix(接口测试): 修复接口导入点击展开导入模块展开后点击其它空白处模块不能收起问题

--user=郭雨琦
https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001017927
This commit is contained in:
guoyuqi 2022-10-14 16:40:20 +08:00 committed by f2c-ci-robot[bot]
parent 5edc53bad9
commit 7a6d38bb71
1 changed files with 12 additions and 2 deletions

View File

@ -1,8 +1,8 @@
<template>
<div v-loading="loading">
<div v-loading="loading" ref="projectButton">
<div class="mask" v-show="isShowSelect"></div>
<el-popover placement="bottom-start" :width="popoverWidth" trigger="manual" v-model="isShowSelect"
@hide="popoverHide" v-click-outside="outsideClick">
@hide="popoverHide" @show="show">
<el-input
size="mini"
prefix-icon="el-icon-search"
@ -356,10 +356,20 @@ export default {
this.popoverHide();
},
show(){
document.addEventListener('click', this.hidePanel, false)
},
//
popoverHide() {
this.$emit('setSelectNodeIds', this.selectNodeIds);
this.$emit('getValue', this.returnDataKeys, this.returnDatas ? this.returnDatas : {});
document.removeEventListener('click', this.hidePanel, false)
},
hidePanel (e) {
if (!this.$refs.projectButton.contains(e.target)) {
this.isShowSelect = false
this.popoverHide()
}
},
//
clearSelectedNodes() {