diff --git a/src/pages/device/productmanage/components/CreateForm.jsx b/src/pages/device/productmanage/components/CreateForm.jsx index 7bc1228..275bc44 100644 --- a/src/pages/device/productmanage/components/CreateForm.jsx +++ b/src/pages/device/productmanage/components/CreateForm.jsx @@ -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); @@ -43,6 +44,7 @@ const CreateForm = (props) => { if(props?.values?.type==1){ setdisplay("none") setdisanumbled('none') + setdisplaytxtjson('none') }else if(props?.values?.type==0){ setdisplay("block") } @@ -82,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") @@ -233,7 +239,7 @@ const onChangeboolLabel1=(e)=>{