perf(菜单管理,部门管理): 编辑时父级菜单懒加载的修改

This commit is contained in:
sheng
2023-08-01 15:13:50 +08:00
committed by 李强
parent 41a9888441
commit 427b6f8478
7 changed files with 55 additions and 9 deletions

View File

@@ -14,6 +14,7 @@
v-model="menuFormData.parent"
:props="defaultTreeProps"
:data="deptDefaultList"
:cache-data="props.cacheData"
lazy
check-strictly
clearable
@@ -110,6 +111,7 @@ import type Node from 'element-plus/es/components/tree/src/model/node';
interface IProps {
initFormData: Partial<MenuTreeItemType> | null;
treeData: MenuTreeItemType[];
cacheData: MenuTreeItemType[];
}
const defaultTreeProps: any = {
@@ -136,6 +138,7 @@ const validateWebPath = (rule: any, value: string, callback: Function) => {
const props = withDefaults(defineProps<IProps>(), {
initFormData: () => null,
treeData: () => [],
cacheData: () => [],
});
const emit = defineEmits(['drawerClose']);