fix: 修改树形选择弹窗-选择全部无法回显label的问题(树形结构下)
parent
ed4b3871bc
commit
ea33ffc316
|
@ -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
|
||||||
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue