diff --git a/src/pages/device/productmanage/components/CreateForm.jsx b/src/pages/device/productmanage/components/CreateForm.jsx index c802699..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); @@ -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)=>{