Commit a76f77d9 by zhaochengxiang

类型调整

parent 8cc1752f
...@@ -105,17 +105,13 @@ export const DatatypeInput = ({ value = {}, datatypes, onChange }) => { ...@@ -105,17 +105,13 @@ export const DatatypeInput = ({ value = {}, datatypes, onChange }) => {
value = value ? value: {}; value = value ? value: {};
return ( return (
<> <div className='flex' style={{ justifyContent: 'space-between', alignItems: 'center' }}>
<Row align='middle'> <div onClick={e => e.stopPropagation()} style={{ flex: 1 }}>
<Col span={9}>
<span>名称:</span>
</Col>
<Col span={15}>
<span onClick={e => e.stopPropagation()}>
<Select <Select
onChange={onNameChange} onChange={onNameChange}
value={value.name || ''} value={value.name || ''}
placeholder='请选择类型名称' placeholder='请选择类型名称'
style={{ width: '100%' }}
> >
{ {
(datatypes||[]) && datatypes.map((_datatype, index) => { (datatypes||[]) && datatypes.map((_datatype, index) => {
...@@ -125,32 +121,25 @@ export const DatatypeInput = ({ value = {}, datatypes, onChange }) => { ...@@ -125,32 +121,25 @@ export const DatatypeInput = ({ value = {}, datatypes, onChange }) => {
}) })
} }
</Select> </Select>
</span> </div>
</Col>
</Row>
{ {
(value.parameterCnNames||[]).map((parameterCnName, index) => { (value.parameterCnNames||[]).map((parameterCnName, index) => {
//使用InputNumber:当value改变时 InputNumber显示值没改变 但实际值有改变 是ant design的bug 这里使用只能输入数字的Input //使用InputNumber:当value改变时 InputNumber显示值没改变 但实际值有改变 是ant design的bug 这里使用只能输入数字的Input
return ( return (
<Row key={index} className='mt-2' align='middle'> <div key={index} className='ml-2' style={{ flex: 1 }}>
<Col span={9}>
<span>{`${parameterCnName||''}:`}</span>
</Col>
<Col span={15}>
<Input <Input
onChange={(e) => { onChange={(e) => {
onParameterValuesChange(e, index); onParameterValuesChange(e, index);
}} }}
value={value.parameterValues[index] || ''} value={value.parameterValues[index] || ''}
style={{ width: '100%' }} style={{ width: '100%' }}
placeholder='请输入一个整数' placeholder={parameterCnName}
/> />
</Col> </div>
</Row>
); );
}) })
} }
</> </div>
) )
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment