fix: tree.ts 报错,在 dept-tree.vue 无法加载的问题

This commit is contained in:
YunaiV
2025-04-07 22:47:30 +08:00
parent 17f947016d
commit 5b60c93e4e
2 changed files with 44 additions and 35 deletions

View File

@@ -1,11 +1,11 @@
<script lang="ts" setup>
import type { SystemDeptApi } from '#/api/system/dept';
import { type SystemDeptApi} from '#/api/system/dept';
import { Tree, Input, Spin } from 'ant-design-vue';
import { ref, onMounted } from 'vue';
import { Search } from '@vben/icons';
import { getDeptList } from '#/api/system/dept';
import { getSimpleDeptList } from '#/api/system/dept';
import { handleTree } from '#/utils/tree';
const emit = defineEmits(['select']);
@@ -36,7 +36,7 @@ const handleSelect = (_selectedKeys: any[], info: any) => {
onMounted(async () => {
try {
loading.value = true;
const data = await getDeptList();
const data = await getSimpleDeptList();
deptList.value = data;
deptTree.value = handleTree(data);
} catch (error) {