45 lines
1.6 KiB
JavaScript
45 lines
1.6 KiB
JavaScript
import React from 'react';
|
|
import { Form, Switch, Input } from 'antd';
|
|
export default function Render(props) {
|
|
const { name, description, super: super2, oldestVersion, } = props.data;
|
|
const { t, update } = props.methods;
|
|
return (<Form colon={true} labelCol={{ span: 6 }} wrapperCol={{ span: 16 }}>
|
|
<Form.Item label={t('system:attr.name')} required>
|
|
<>
|
|
<Input onChange={(e) => {
|
|
update({
|
|
name: e.target.value,
|
|
});
|
|
}} value={name}/>
|
|
</>
|
|
</Form.Item>
|
|
<Form.Item label={t('system:attr.description')} required>
|
|
<>
|
|
<Input.TextArea onChange={(e) => {
|
|
update({
|
|
description: e.target.value,
|
|
});
|
|
}} value={description}/>
|
|
</>
|
|
</Form.Item>
|
|
<Form.Item label={t('system:attr.oldestVersion')} tooltip={t('tips.oldestVersion')}>
|
|
<>
|
|
<Input onChange={(e) => {
|
|
update({
|
|
oldestVersion: e.target.value,
|
|
});
|
|
}} value={oldestVersion}/>
|
|
</>
|
|
</Form.Item>
|
|
<Form.Item label={t('system:attr.super')} required tooltip={t('tips.isSuper')}>
|
|
<>
|
|
<Switch checkedChildren={t('common::true')} unCheckedChildren={t('common::false')} checked={super2} onChange={(checked) => {
|
|
update({
|
|
super: checked,
|
|
});
|
|
}}/>
|
|
</>
|
|
</Form.Item>
|
|
</Form>);
|
|
}
|