From 5b4a37cf95c3ed424b74447dc78054f316ab58d6 Mon Sep 17 00:00:00 2001 From: zhangdaiscott Date: Tue, 1 Nov 2022 16:34:28 +0800 Subject: [PATCH] =?UTF-8?q?online=E5=BC=80=E5=8F=91=EF=BC=8C=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E9=83=A8=E9=97=A8=E9=80=89=E6=8B=A9=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E5=A4=9A=E4=B8=AA=E9=BB=98=E8=AE=A4=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E6=97=B6=EF=BC=8C=E4=BB=8D=E7=84=B6=E6=9C=89=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E3=80=82=E7=82=B9=E5=87=BB=E2=80=9C=E7=A1=AE=E8=AE=A4?= =?UTF-8?q?=E2=80=9D=E6=8C=89=E9=92=AE=EF=BC=8C=E6=B2=A1=E5=8F=8D=E5=BA=94?= =?UTF-8?q?=E3=80=82=20#4166?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Form/src/jeecg/hooks/useTreeBiz.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/Form/src/jeecg/hooks/useTreeBiz.ts b/src/components/Form/src/jeecg/hooks/useTreeBiz.ts index 2ccd5e3..adf7d33 100644 --- a/src/components/Form/src/jeecg/hooks/useTreeBiz.ts +++ b/src/components/Form/src/jeecg/hooks/useTreeBiz.ts @@ -89,7 +89,8 @@ export function useTreeBiz(treeRef, getList, props) { if (info.checked) { //update-begin-author:taoyan date:20220408 for: 单选模式下,设定rowKey,无法选中数据- checkedKeys.value = [info.node.eventKey]; - let temp = info.checkedNodes.find((n) => n.key === info.node.eventKey); + let rowKey = props.rowKey; + let temp = info.checkedNodes.find((n) => n[rowKey] === info.node.eventKey); selectRows.value = [temp]; //update-end-author:taoyan date:20220408 for: 单选模式下,设定rowKey,无法选中数据- } else {