From 2142506ce5225dbe19118fcedb2cb48612c58fa7 Mon Sep 17 00:00:00 2001 From: bowen <54492610+jiaowoxiaobala@users.noreply.github.com> Date: Wed, 8 Nov 2023 11:43:24 +0800 Subject: [PATCH] fix(dept): no parentDept can edit parentDept (#3255) --- src/views/demo/system/dept/dept.data.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/views/demo/system/dept/dept.data.ts b/src/views/demo/system/dept/dept.data.ts index 74e1b2aed..637d3053e 100644 --- a/src/views/demo/system/dept/dept.data.ts +++ b/src/views/demo/system/dept/dept.data.ts @@ -69,7 +69,11 @@ export const formSchema: FormSchema[] = [ field: 'parentDept', label: '上级部门', component: 'TreeSelect', - + ifShow({ values }) { + const { deptName, parentDept } = values; + // Hide without a parentDept when editing + return parentDept || (!deptName && !parentDept); + }, componentProps: { fieldNames: { label: 'deptName',