From ea33ffc3160e044f11a7ff85495d628de2378951 Mon Sep 17 00:00:00 2001 From: kaivanwong Date: Mon, 11 Sep 2023 15:45:07 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E6=A0=91=E5=BD=A2?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E5=BC=B9=E7=AA=97-=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E5=85=A8=E9=83=A8=E6=97=A0=E6=B3=95=E5=9B=9E=E6=98=BElabel?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98=EF=BC=88=E6=A0=91=E5=BD=A2=E7=BB=93?= =?UTF-8?q?=E6=9E=84=E4=B8=8B=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Form/src/jeecg/hooks/useTreeBiz.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/Form/src/jeecg/hooks/useTreeBiz.ts b/src/components/Form/src/jeecg/hooks/useTreeBiz.ts index 11eb301..ec89b56 100644 --- a/src/components/Form/src/jeecg/hooks/useTreeBiz.ts +++ b/src/components/Form/src/jeecg/hooks/useTreeBiz.ts @@ -2,6 +2,7 @@ import type { Ref } from 'vue'; import { inject, reactive, ref, computed, unref, watch, nextTick } from 'vue'; import { TreeActionType } from '/@/components/Tree'; import { listToTree } from '/@/utils/common/compUtils'; +import { eachTree } from '/@/utils/helper/treeHelper'; export function useTreeBiz(treeRef, getList, props) { //接收下拉框选项 @@ -138,7 +139,11 @@ export function useTreeBiz(treeRef, getList, props) { ids = checkedKeys.value.join(","); } getList({ids:ids}).then((res) =>{ - selectRows.value = res; + selectRows.value = [] + eachTree(res, (item) => { + selectRows.value.push(item) + return item + }) }) }