export default [
  {
    title: '表单(添加)',
    screenshot: require('./__screenshots__/add.png'),
    schema: {
      title: '表单(添加)',
      componentName: 'DataSourceForm',
      props: {
        style: {
          padding: '24px',
        },
        renderMode: 'add',
        groupInfoPosition: 'top',
        labelWrap: true,
        layout: 'vertical',
        showDescription: true,
        showTitle: true,
        scrollToFirstError: true,
        labelCol: {
          span: 24,
        },
        wrapperCol: {
          span: 24,
        },
        size: 'large',
        onValuesChange: {
          type: 'JSFunction',
          value:
            "function onValuesChange(changedValues, allValues) {\n  console.log('onValuesChange', changedValues, allValues);\n}",
        },
        onFinish: {
          type: 'JSFunction',
          value:
            "function onFinish(values) {\n  console.log('onFinish', values);\n}",
        },
        onFinishFailed: {
          type: 'JSFunction',
          value:
            "function onFinishFailed({ values, errorFields, outOfDate }) {\n  console.log('onFinishFailed', values, errorFields, outOfDate);\n}",
        },
        name: 'basic',
      },
      children: [],
    },
  },
  {
    title: '表单(编辑)',
    screenshot:
      'https://alifd.alicdn.com/fusion-cool/icons/icon-antd/form-1.png',
    schema: {
      title: '表单(编辑)',
      componentName: 'DataSourceForm',
      props: {
        style: {
          padding: '24px',
        },
        renderMode: 'edit',
        groupInfoPosition: 'top',
        labelWrap: true,
        layout: 'vertical',
        showDescription: true,
        showTitle: true,
        scrollToFirstError: true,
        currentValue: 'server',
        labelCol: {
          span: 24,
        },
        wrapperCol: {
          span: 24,
        },
        size: 'large',
        onValuesChange: {
          type: 'JSFunction',
          value:
            "function onValuesChange(changedValues, allValues) {\n  console.log('onValuesChange', changedValues, allValues);\n}",
        },
        onFinish: {
          type: 'JSFunction',
          value:
            "function onFinish(values) {\n  console.log('onFinish', values);\n}",
        },
        onFinishFailed: {
          type: 'JSFunction',
          value:
            "function onFinishFailed({ values, errorFields, outOfDate }) {\n  console.log('onFinishFailed', values, errorFields, outOfDate);\n}",
        },
        name: 'basic',
      },
      children: [],
    },
  },
  {
    title: '详情',
    screenshot: require('./__screenshots__/detail.png'),

    schema: {
      title: '详情',
      componentName: 'DataSourceForm',
      props: {
        style: {
          padding: '24px',
        },
        renderMode: 'view',
        groupInfoPosition: 'top',
        labelWrap: true,
        layout: 'vertical',
        showDescription: true,
        showTitle: true,
        scrollToFirstError: true,
        currentValue: 'server',
        labelCol: {
          span: 24,
        },
        wrapperCol: {
          span: 24,
        },
        size: 'large',
        onValuesChange: {
          type: 'JSFunction',
          value:
            "function onValuesChange(changedValues, allValues) {\n  console.log('onValuesChange', changedValues, allValues);\n}",
        },
        onFinish: {
          type: 'JSFunction',
          value:
            "function onFinish(values) {\n  console.log('onFinish', values);\n}",
        },
        onFinishFailed: {
          type: 'JSFunction',
          value:
            "function onFinishFailed({ values, errorFields, outOfDate }) {\n  console.log('onFinishFailed', values, errorFields, outOfDate);\n}",
        },
        name: 'basic',
      },
      children: [],
    },
  },
];
