Procházet zdrojové kódy

fix(scene): triggerTerm

lind před 3 roky
rodič
revize
a91a793a81

+ 1 - 1
src/components/FTermArrayCards/index.tsx

@@ -101,7 +101,7 @@ export const FTermArrayCards: ComposedArrayCards = observer((props) => {
                     {
                       type: 'object',
                       properties: {
-                        termType: {
+                        type: {
                           'x-decorator': 'FormItem',
                           'x-component': 'Select',
                           'x-component-props': {

+ 0 - 1
src/components/FTermTypeSelect/index.tsx

@@ -21,7 +21,6 @@ const FTermTypeSelect = (props: Props) => {
         onChange={(value) => props.onChange(value)}
         value={props.value}
         style={{ width: '200px' }}
-        defaultValue={'and'}
         options={[
           { label: '并且', value: 'and' },
           { label: '或者', value: 'or' },

+ 2 - 2
src/pages/rule-engine/Scene/TriggerTerm/index.tsx

@@ -244,7 +244,6 @@ const TriggerTerm = (props: Props, ref: any) => {
         );
         return _data;
       });
-      console.log(Array.isArray(data?.trigger) ? data : undefined, 'fff');
       return Array.isArray(data?.trigger) ? data : undefined;
     },
   }));
@@ -272,7 +271,7 @@ const TriggerTerm = (props: Props, ref: any) => {
         'x-component': 'FTermArrayCards',
         'x-decorator': 'FormItem',
         'x-value': {
-          termType: 'and',
+          type: 'and',
         },
         'x-component-props': {
           title: '分组',
@@ -296,6 +295,7 @@ const TriggerTerm = (props: Props, ref: any) => {
                     type: 'string',
                     // "x-decorator": 'FormItem',
                     'x-component': 'FTermTypeSelect',
+                    'x-value': 'and',
                   },
                   layout: {
                     type: 'void',