Просмотр исходного кода

fix: 工作流无法添加第一级问题

闪电 недель назад: 3
Родитель
Сommit
ff926d09d5
1 измененных файлов с 4 добавлено и 3 удалено
  1. 4 3
      apps/web-ele/src/views/workflow/category/config-data.ts

+ 4 - 3
apps/web-ele/src/views/workflow/category/config-data.ts

@@ -1,7 +1,7 @@
1 1
 import type { FormSchemaGetter } from '#/adapter/form';
2 2
 import type { VxeGridProps } from '#/adapter/vxe-table';
3 3
 
4
-import { categoryTree } from '#/api/workflow/category'; 
4
+import { categoryTree } from '#/api/workflow/category';
5 5
 
6 6
 export const queryFormSchema: FormSchemaGetter = () => [
7 7
   {
@@ -50,7 +50,7 @@ export const drawerFormSchema: FormSchemaGetter = () => [
50 50
       if: () => false,
51 51
       triggerFields: [''],
52 52
     },
53
-    fieldName: 'categoryId', 
53
+    fieldName: 'categoryId',
54 54
   },
55 55
   {
56 56
     component: 'ApiTreeSelect',
@@ -58,6 +58,7 @@ export const drawerFormSchema: FormSchemaGetter = () => [
58 58
       api: async () => {
59 59
         return await categoryTree();
60 60
       },
61
+      clearable: true,
61 62
       labelField: 'label',
62 63
       valueField: 'id',
63 64
       childrenField: 'children',
@@ -72,7 +73,7 @@ export const drawerFormSchema: FormSchemaGetter = () => [
72 73
     },
73 74
     fieldName: 'parentId',
74 75
     label: '上级分类',
75
-    rules: 'selectRequired',
76
+    // rules: 'selectRequired',
76 77
     defaultValue: 1,
77 78
   },
78 79
   {