From 778246ed5148ccb54f41c40c0f91bebcba5b262d Mon Sep 17 00:00:00 2001 From: dengbf Date: Thu, 9 Nov 2023 15:21:37 +0800 Subject: [PATCH] =?UTF-8?q?[=E4=BF=AE=E5=A4=8D]=20TsFormTree=20=E5=9C=A8tr?= =?UTF-8?q?ansfer=E6=A8=A1=E5=BC=8F=E4=B8=8B=EF=BC=8C=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E6=BB=9A=E5=8A=A8=E6=9D=A1=E6=97=A0=E6=B3=95=E6=8B=96=E5=8A=A8?= =?UTF-8?q?=20=20-=20[=E5=85=B3=E8=81=94]=20#[1019381977415680]=E9=83=A8?= =?UTF-8?q?=E5=88=86=E4=B8=8B=E6=8B=89=E8=8F=9C=E5=8D=95=E7=9A=84=E6=BB=9A?= =?UTF-8?q?=E5=8A=A8=E6=9D=A1=E5=8F=AA=E8=83=BD=E9=BC=A0=E6=A0=87=E6=BB=9A?= =?UTF-8?q?=E5=8A=A8=E6=97=A0=E6=B3=95=E6=8B=96=E6=8B=89=20http://192.168.?= =?UTF-8?q?0.96:8090/demo/rdm.html#/bug-detail/939050947543040/93905094754?= =?UTF-8?q?3057/1019381977415680?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/resources/plugins/TsForm/TsFormTree.vue | 30 ++++++++++++--------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/src/resources/plugins/TsForm/TsFormTree.vue b/src/resources/plugins/TsForm/TsFormTree.vue index f98bf576f..7b4472216 100755 --- a/src/resources/plugins/TsForm/TsFormTree.vue +++ b/src/resources/plugins/TsForm/TsFormTree.vue @@ -473,20 +473,26 @@ export default { if ((!$contain && $contain === event.target) || $contain.contains(event.target)) { return; - } else { - //如果点击区域不是自身元素则失去焦点 - this.isVisible = false; - if (!this.multiple) { - //单选 - let value = this.selectedList[0] ? (this.showPath ? this.selectedList[0]._path : this.selectedList[0][this.textName]) : ''; - if (this.searchKeyWord !== value) { - this.searchKeyWord = value; - this.initNodeList(); - } - } else if (this.searchKeyWord) { - this.searchKeyWord = ''; + } + + if (this.transfer) { + //如果是transfer的时候下拉的区域点击时是在dropdown外层的div上 + if ($el && $el.offsetParent && ($el.offsetParent === event.target || $el.offsetParent.contains(event.target))) { + return; + } + } + //如果点击区域不是自身元素则失去焦点 + this.isVisible = false; + if (!this.multiple) { + //单选 + let value = this.selectedList[0] ? (this.showPath ? this.selectedList[0]._path : this.selectedList[0][this.textName]) : ''; + if (this.searchKeyWord !== value) { + this.searchKeyWord = value; this.initNodeList(); } + } else if (this.searchKeyWord) { + this.searchKeyWord = ''; + this.initNodeList(); } } }, -- Gitee