lanjianrong 3 år sedan
förälder
incheckning
ef90bfb435

+ 22 - 22
src/pages/Schema/Designable/antd/components/Field/shared.ts

@@ -93,24 +93,24 @@ export const createFieldSchema = (
             'x-decorator': 'FormItem',
             'x-component': 'Input.TextArea'
           },
-          'x-display': {
-            type: 'string',
-            enum: ['visible', 'hidden', 'none', ''],
-            'x-decorator': 'FormItem',
-            'x-component': 'Select',
-            'x-component-props': {
-              defaultValue: 'visible'
-            }
-          },
-          'x-pattern': {
-            type: 'string',
-            enum: ['editable', 'disabled', 'readOnly', 'readPretty', ''],
-            'x-decorator': 'FormItem',
-            'x-component': 'Select',
-            'x-component-props': {
-              defaultValue: 'editable'
-            }
-          },
+          // 'x-display': {
+          //   type: 'string',
+          //   enum: ['visible', 'hidden', 'none', ''],
+          //   'x-decorator': 'FormItem',
+          //   'x-component': 'Select',
+          //   'x-component-props': {
+          //     defaultValue: 'visible'
+          //   }
+          // },
+          // 'x-pattern': {
+          //   type: 'string',
+          //   enum: ['editable', 'disabled', 'readOnly', 'readPretty', ''],
+          //   'x-decorator': 'FormItem',
+          //   'x-component': 'Select',
+          //   'x-component-props': {
+          //     defaultValue: 'editable'
+          //   }
+          // },
           default: {
             'x-decorator': 'FormItem',
             'x-component': 'ValueInput'
@@ -119,10 +119,10 @@ export const createFieldSchema = (
             'x-decorator': 'FormItem',
             'x-component': DataSourceSetter
           },
-          'x-reactions': {
-            'x-decorator': 'FormItem',
-            'x-component': ReactionsSetter
-          },
+          // 'x-reactions': {
+          //   'x-decorator': 'FormItem',
+          //   'x-component': ReactionsSetter
+          // },
           'x-validator': {
             type: 'array',
             'x-component': ValidatorSetter

+ 1 - 0
src/pages/Schema/Designable/index.tsx

@@ -74,6 +74,7 @@ const Designable = () => {
       }),
     []
   )
+
   return (
     <Designer engine={engine}>
       <StudioPanel logo={<LogoWidget />} actions={<ActionsWidget />}>

+ 2 - 0
src/pages/Schema/Designable/service/schema.ts

@@ -7,6 +7,8 @@ export const saveSchema = (designer: Engine) => {
     'formily-schema',
     JSON.stringify(transformToSchema(designer.getCurrentTree()))
   )
+  console.log(JSON.stringify(transformToSchema(designer.getCurrentTree())))
+
   message.success('Save Success')
 }