mirror of
https://gitee.com/JavaLionLi/plus-ui.git
synced 2026-09-16 00:38:19 +08:00
update 优化 代码生成 编辑页样式
This commit is contained in:
parent
5b7df709f1
commit
f9e9055a3f
@ -47,25 +47,6 @@ export default function GenInfoForm({ form, columns, menuOptions }: GenInfoFormP
|
|||||||
/>
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col xs={24} md={12}>
|
|
||||||
<Form.Item
|
|
||||||
name="frontendType"
|
|
||||||
label={
|
|
||||||
<span>
|
|
||||||
前端模板{' '}
|
|
||||||
<Tooltip title="对应后端 resources/vm 下的模板目录,例如 vue、react">
|
|
||||||
<QuestionCircleOutlined />
|
|
||||||
</Tooltip>
|
|
||||||
</span>
|
|
||||||
}
|
|
||||||
rules={[
|
|
||||||
{ required: true, message: '请选择前端模板' },
|
|
||||||
{ pattern: /^[A-Za-z0-9_-]+$/, message: '仅支持字母、数字、下划线和中划线' }
|
|
||||||
]}
|
|
||||||
>
|
|
||||||
<Radio.Group options={frontendTypeOptions} />
|
|
||||||
</Form.Item>
|
|
||||||
</Col>
|
|
||||||
<Col xs={24} md={12}>
|
<Col xs={24} md={12}>
|
||||||
<Form.Item name="packageName" label="生成包路径" rules={[{ required: true, message: '请输入生成包路径' }]}>
|
<Form.Item name="packageName" label="生成包路径" rules={[{ required: true, message: '请输入生成包路径' }]}>
|
||||||
<Input />
|
<Input />
|
||||||
@ -98,26 +79,58 @@ export default function GenInfoForm({ form, columns, menuOptions }: GenInfoFormP
|
|||||||
/>
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
|
<Col xs={24} md={12}>
|
||||||
|
<Form.Item
|
||||||
|
name="frontendType"
|
||||||
|
label={
|
||||||
|
<span>
|
||||||
|
前端模板{' '}
|
||||||
|
<Tooltip title="对应后端 resources/vm 下的模板目录,例如 vue、react">
|
||||||
|
<QuestionCircleOutlined />
|
||||||
|
</Tooltip>
|
||||||
|
</span>
|
||||||
|
}
|
||||||
|
rules={[
|
||||||
|
{ required: true, message: '请选择前端模板' },
|
||||||
|
{ pattern: /^[A-Za-z0-9_-]+$/, message: '仅支持字母、数字、下划线和中划线' }
|
||||||
|
]}
|
||||||
|
>
|
||||||
|
<Radio.Group options={frontendTypeOptions} />
|
||||||
|
</Form.Item>
|
||||||
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
|
|
||||||
|
<h4 className="form-header">增强选项</h4>
|
||||||
|
<Row gutter={16}>
|
||||||
|
<Col xs={24}>
|
||||||
<Row gutter={16}>
|
<Row gutter={16}>
|
||||||
<Col xs={24} md={8}>
|
<Col xs={24} md={8}>
|
||||||
<Form.Item name="enableExport" label="导出能力" valuePropName="checked">
|
<Form.Item name="enableExport" label="导出能力" valuePropName="checked">
|
||||||
<Switch />
|
<Switch />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
|
</Row>
|
||||||
|
</Col>
|
||||||
|
|
||||||
|
<Col xs={24}>
|
||||||
|
<Row gutter={16}>
|
||||||
<Col xs={24} md={8}>
|
<Col xs={24} md={8}>
|
||||||
<Form.Item name="enableStatus" label="状态切换" valuePropName="checked">
|
<Form.Item name="enableStatus" label="状态切换" valuePropName="checked">
|
||||||
<Switch onChange={checked => !checked && form.setFieldValue('statusField', '')} />
|
<Switch onChange={checked => !checked && form.setFieldValue('statusField', '')} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
{enableStatus && (
|
{enableStatus && (
|
||||||
<Col xs={24} md={8}>
|
<Col xs={24} md={16}>
|
||||||
<Form.Item name="statusField" label="状态字段" rules={[{ required: true, message: '请选择状态字段' }]}>
|
<Form.Item name="statusField" label="状态字段" rules={[{ required: true, message: '请选择状态字段' }]}>
|
||||||
<Select options={columnOptions} />
|
<Select options={columnOptions} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
)}
|
)}
|
||||||
|
</Row>
|
||||||
|
</Col>
|
||||||
|
|
||||||
|
<Col xs={24}>
|
||||||
|
<Row gutter={16}>
|
||||||
<Col xs={24} md={8}>
|
<Col xs={24} md={8}>
|
||||||
<Form.Item name="enableUnique" label="组合唯一校验" valuePropName="checked">
|
<Form.Item name="enableUnique" label="组合唯一校验" valuePropName="checked">
|
||||||
<Switch onChange={checked => !checked && form.setFieldValue('uniqueFields', [])} />
|
<Switch onChange={checked => !checked && form.setFieldValue('uniqueFields', [])} />
|
||||||
@ -130,6 +143,11 @@ export default function GenInfoForm({ form, columns, menuOptions }: GenInfoFormP
|
|||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
)}
|
)}
|
||||||
|
</Row>
|
||||||
|
</Col>
|
||||||
|
|
||||||
|
<Col xs={24}>
|
||||||
|
<Row gutter={16}>
|
||||||
<Col xs={24} md={8}>
|
<Col xs={24} md={8}>
|
||||||
<Form.Item name="enableSort" label="排序调整" valuePropName="checked">
|
<Form.Item name="enableSort" label="排序调整" valuePropName="checked">
|
||||||
<Switch onChange={checked => !checked && form.setFieldValue('sortField', '')} />
|
<Switch onChange={checked => !checked && form.setFieldValue('sortField', '')} />
|
||||||
@ -143,8 +161,12 @@ export default function GenInfoForm({ form, columns, menuOptions }: GenInfoFormP
|
|||||||
</Col>
|
</Col>
|
||||||
)}
|
)}
|
||||||
</Row>
|
</Row>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
|
||||||
{tplCategory === 'tree' && (
|
{tplCategory === 'tree' && (
|
||||||
|
<>
|
||||||
|
<h4 className="form-header">其他信息</h4>
|
||||||
<Row gutter={16}>
|
<Row gutter={16}>
|
||||||
<Col xs={24} md={12}>
|
<Col xs={24} md={12}>
|
||||||
<Form.Item name="treeCode" label="树编码字段" rules={[{ required: true, message: '请选择树编码字段' }]}>
|
<Form.Item name="treeCode" label="树编码字段" rules={[{ required: true, message: '请选择树编码字段' }]}>
|
||||||
@ -181,6 +203,7 @@ export default function GenInfoForm({ form, columns, menuOptions }: GenInfoFormP
|
|||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
|
</>
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user