v2.8.0_e初始化

1、测试代码,开源用户尽量不要使用;
2、包含Kafka-HA的相关功能;
3、并非基于2.6.0拉的分支,是基于master分支的 commit-id: 462303fca0 拉的2.8.0_e的分支。出现这个情况的原因是v2.6.0的代码并不是最新的,2.x最新的代码是 462303fca0 这个commit对应的代码;
This commit is contained in:
zengqiao
2023-02-13 16:35:43 +08:00
parent 462303fca0
commit e81c0f3040
178 changed files with 9938 additions and 1674 deletions

View File

@@ -85,6 +85,10 @@ class XForm extends React.Component<IXFormProps> {
initialValue = false;
}
if (formItem.type === FormItemType.select) {
initialValue = initialValue || undefined;
}
// if (formItem.type === FormItemType.select && formItem.attrs
// && ['tags'].includes(formItem.attrs.mode)) {
// initialValue = formItem.defaultValue ? [formItem.defaultValue] : [];
@@ -105,7 +109,7 @@ class XForm extends React.Component<IXFormProps> {
const { form, formData, formMap, formLayout, layout } = this.props;
const { getFieldDecorator } = form;
return (
<Form layout={layout || 'horizontal'} onSubmit={() => ({})}>
<Form className="x-form" layout={layout || 'horizontal'} onSubmit={() => ({})}>
{formMap.map(formItem => {
const { initialValue, valuePropName } = this.handleFormItem(formItem, formData);
const getFieldValue = {
@@ -131,7 +135,13 @@ class XForm extends React.Component<IXFormProps> {
)}
{formItem.renderExtraElement ? formItem.renderExtraElement() : null}
{/* 添加保存时间提示文案 */}
{formItem.attrs?.prompttype ? <span style={{ color: "#cccccc", fontSize: '12px', lineHeight: '20px', display: 'block' }}>{formItem.attrs.prompttype}</span> : null}
{formItem.attrs?.prompttype ?
<span className={`prompt-info ${formItem.attrs?.promptclass || ''}`}>
{formItem.attrs?.prompticon ?
<Icon type="info-circle" theme="twoTone" twoToneColor="#0A70F5" className={formItem.attrs?.prompticomclass} /> : null}
{formItem.attrs.prompttype}
</span>
: null}
</Form.Item>
);
})}