pull/755/merge
Kaivan Wong 2023-09-26 10:28:34 +08:00 committed by GitHub
commit 42d232881c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -2,6 +2,7 @@ import type { Ref } from 'vue';
import { inject, reactive, ref, computed, unref, watch, nextTick } from 'vue'; import { inject, reactive, ref, computed, unref, watch, nextTick } from 'vue';
import { TreeActionType } from '/@/components/Tree'; import { TreeActionType } from '/@/components/Tree';
import { listToTree } from '/@/utils/common/compUtils'; import { listToTree } from '/@/utils/common/compUtils';
import { eachTree } from '/@/utils/helper/treeHelper';
export function useTreeBiz(treeRef, getList, props) { export function useTreeBiz(treeRef, getList, props) {
//接收下拉框选项 //接收下拉框选项
@ -138,7 +139,11 @@ export function useTreeBiz(treeRef, getList, props) {
ids = checkedKeys.value.join(","); ids = checkedKeys.value.join(",");
} }
getList({ids:ids}).then((res) =>{ getList({ids:ids}).then((res) =>{
selectRows.value = res; selectRows.value = []
eachTree(res, (item) => {
selectRows.value.push(item)
return item
})
}) })
} }