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', leaveConfirmConfig: { enable: true, title: { type: 'i18n', en: 'Unsaved changes', 'zh-CN': '未保存的更改', 'zh-HK': '未保存的更改', }, content: { type: 'i18n', en: 'You have unsaved changes. Leave anyway?', 'zh-CN': '您有未保存的更改,确定要离开?', 'zh-HK': '您有未保存的更改,確定要離開?', }, okText: { type: 'i18n', en: 'Leave', 'zh-CN': '离开', 'zh-HK': '離開', }, cancelText: { type: 'i18n', en: 'Stay', 'zh-CN': '返回', 'zh-HK': '返回', }, }, }, 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', leaveConfirmConfig: { enable: true, title: { type: 'i18n', en: 'Unsaved changes', 'zh-CN': '未保存的更改', 'zh-HK': '未保存的更改', }, content: { type: 'i18n', en: 'You have unsaved changes. Leave anyway?', 'zh-CN': '您有未保存的更改,确定要离开?', 'zh-HK': '您有未保存的更改,確定要離開?', }, okText: { type: 'i18n', en: 'Leave', 'zh-CN': '离开', 'zh-HK': '離開', }, cancelText: { type: 'i18n', en: 'Stay', 'zh-CN': '返回', 'zh-HK': '返回', }, }, }, 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: [], }, }, ];