From 39836b6858e5401cf9e99523fc74b53ac2384e7d Mon Sep 17 00:00:00 2001 From: xuan Date: Thu, 5 Jan 2023 15:47:51 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix(ID1001003):=20=E3=80=90?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BF=A1=E6=81=AF=E3=80=91-=E6=96=87?= =?UTF-8?q?=E6=A1=88=E5=86=85=E5=AE=B9=E4=BC=98=E5=8C=96=E3=80=81=E7=BD=AE?= =?UTF-8?q?=E7=81=B0=E6=A1=86=E4=B8=8D=E5=85=81=E8=AE=B8=E8=BE=93=E5=85=A5?= =?UTF-8?q?=E5=86=85=E5=AE=B9=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【【修改信息】-文案内容优化、置灰框不允许输入内容。】 https://www.tapd.cn/53459131/bugtrace/bugs/view/1153459131001001003 --- src/pages/userEdit/components/ModifyModal/index.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/pages/userEdit/components/ModifyModal/index.tsx b/src/pages/userEdit/components/ModifyModal/index.tsx index 8a1f90b..2f4798a 100644 --- a/src/pages/userEdit/components/ModifyModal/index.tsx +++ b/src/pages/userEdit/components/ModifyModal/index.tsx @@ -23,7 +23,7 @@ const ModifyModal = (props: Params, ref: Ref) => { const { title = '修改昵称', value: _value = '', isCompanyName = false } = props const [value, setValue] = useState('') const userInfo = useSelector(state => state.userInfo) - + const canEdit = useRef(true) const [tipsComp, setTipsComp] = useState(null) // 不合法状态 const isInvalidate = useMemo(() => { @@ -36,7 +36,7 @@ const ModifyModal = (props: Params, ref: Ref) => { return - 仅允许驶入类型为数字、英文、中文,禁止输入其他任何字符 + 仅允许输入数字、英文、中文,禁止输入其他任何字符 }) @@ -46,6 +46,7 @@ const ModifyModal = (props: Params, ref: Ref) => { if (isCompanyName) { // 检测是否没机会修改 if (userInfo.adminUserInfo.first_change_name) { + canEdit.current = true flag = false setTipsComp(() => { return @@ -58,6 +59,7 @@ const ModifyModal = (props: Params, ref: Ref) => { } else { flag = true + canEdit.current = false setTipsComp(() => { return @@ -97,7 +99,7 @@ const ModifyModal = (props: Params, ref: Ref) => { {tipsComp} -