From fdcc0398aca6b0f290ec5a2e45c7b450204cc261 Mon Sep 17 00:00:00 2001 From: zhaoy <137053305@qq.com> Date: Thu, 22 Feb 2024 16:40:29 +0800 Subject: [PATCH] z --- .../device/productmanage/components/CreateForm.jsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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)=>{