|
|
@@ -13,6 +13,7 @@ const CreateForm = (props) => { |
|
|
|
const [displaybool,setdisplaybool]=useState('none'); |
|
|
|
const [displaylength,setdisplaylength]=useState('none'); |
|
|
|
const [displaytxtjson,setdisplaytxtjson]=useState('none'); |
|
|
|
const [disabledname,setdisabledname]=useState('false'); |
|
|
|
const [minnumber, setminnumber] = useState(0); |
|
|
|
const [maxnumber, setmaxnumber] = useState(1); |
|
|
|
const [ReadWrite, setReadWrite] = useState(0); |
|
|
@@ -83,9 +84,13 @@ const CreateForm = (props) => { |
|
|
|
setminnumber(0); |
|
|
|
setmaxnumber(1); |
|
|
|
} |
|
|
|
|
|
|
|
if(props?.values?.isDefault){ |
|
|
|
setdisabledname(true) |
|
|
|
}else{ |
|
|
|
setdisabledname(false) |
|
|
|
} |
|
|
|
}else{ |
|
|
|
|
|
|
|
setdisabledname(false) |
|
|
|
console.log("xinjian") |
|
|
|
setDisabled(false); |
|
|
|
setdisplay("block") |
|
|
@@ -234,7 +239,7 @@ const onChangeboolLabel1=(e)=>{ |
|
|
|
</Form.Item> |
|
|
|
|
|
|
|
<Form.Item name="name" label="功能名称" rules={[{ required: true, max: 64, whitespace: true }]}> |
|
|
|
<Input placeholder="请输入功能名称" /> |
|
|
|
<Input placeholder="请输入功能名称" disabled={disabledname} /> |
|
|
|
</Form.Item> |
|
|
|
<Form.Item style={{display:display}} label={'数据类型'} name="dataType" rules={[{ required: false }]}> |
|
|
|
<Select onChange={onChangedataType} defaultValue="digit"> |
|
|
|