手机号授权页面,直接判断是否是新的有问题,改成成上层传下去
This commit is contained in:
parent
6b97c47eca
commit
917eaec869
|
|
@ -11,6 +11,7 @@ export default function Render(props: WebComponentProps<EntityDict, 'mobile', fa
|
|||
passwordRequire: boolean;
|
||||
allowUpdateName?: boolean;
|
||||
allowUpdateNickname?: boolean;
|
||||
isNew: boolean;
|
||||
}, {
|
||||
onMobileChange: (value: string) => Promise<void>;
|
||||
onConfirm: () => Promise<void>;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { Form, Input, Button } from 'antd-mobile';
|
|||
import Style from './web.module.less';
|
||||
import OnUser from '../onUser/index';
|
||||
export default function Render(props) {
|
||||
const { mobileValue, mobileValueReady, relations, entity, entityId, userId, oakFullpath, oakExecutable, oakDirty, passwordRequire, allowUpdateName, allowUpdateNickname, } = props.data;
|
||||
const { mobileValue, mobileValueReady, relations, entity, entityId, userId, oakFullpath, oakExecutable, oakDirty, passwordRequire, allowUpdateName, allowUpdateNickname,isNew } = props.data;
|
||||
const { onConfirm, onMobileChange, onReset, t } = props.methods;
|
||||
return (<Form footer={<div className={Style.btnContainer}>
|
||||
<Button color="primary" style={{ flex: 2 }} onClick={() => {
|
||||
|
|
@ -35,6 +35,6 @@ export default function Render(props) {
|
|||
}} placeholder={t('inputMobile')} type="tel" clearable/>
|
||||
</>
|
||||
</Form.Item>
|
||||
{mobileValueReady && (<OnUser oakAutoUnmount={true} oakPath={`${oakFullpath}.user`} entity={entity} entityId={entityId} relations={relations} passwordRequire={passwordRequire} allowUpdateName={allowUpdateName} allowUpdateNickname={allowUpdateNickname}/>)}
|
||||
{mobileValueReady && (<OnUser oakAutoUnmount={true} oakPath={`${oakFullpath}.user`} entity={entity} entityId={entityId} relations={relations} passwordRequire={passwordRequire} allowUpdateName={allowUpdateName} allowUpdateNickname={allowUpdateNickname} isNew={isNew} />)}
|
||||
</Form>);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ export default function Render(props) {
|
|||
}} placeholder="请输入手机号码" type="tel"/>
|
||||
</Form.Item>
|
||||
</Form>
|
||||
{mobileValueReady && (<OnUser oakAutoUnmount={true} oakPath={`${oakFullpath}.user`} entity={entity} entityId={entityId} relations={relations} setPasswordConfirm={setPasswordConfirm} passwordRequire={passwordRequire} allowUpdateName={allowUpdateName} allowUpdateNickname={allowUpdateNickname}/>)}
|
||||
{mobileValueReady && (<OnUser oakAutoUnmount={true} oakPath={`${oakFullpath}.user`} entity={entity} entityId={entityId} relations={relations} setPasswordConfirm={setPasswordConfirm} passwordRequire={passwordRequire} allowUpdateName={allowUpdateName} allowUpdateNickname={allowUpdateNickname} isNew={isNew} />)}
|
||||
<Form colon labelCol={{ span: 4 }} wrapperCol={{ span: 8 }}>
|
||||
<Form.Item wrapperCol={{ offset: 4 }}>
|
||||
<Space>
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ export default OakComponent({
|
|||
password,
|
||||
name,
|
||||
nickname,
|
||||
isNew: $$createAt$$ === 1,
|
||||
// isNew: $$createAt$$ === 1,
|
||||
};
|
||||
},
|
||||
properties: {
|
||||
|
|
@ -75,5 +75,6 @@ export default OakComponent({
|
|||
passwordRequire: false,
|
||||
allowUpdateName: false,
|
||||
allowUpdateNickname: false,
|
||||
isNew: false,
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -91,6 +91,7 @@ export default function Render(
|
|||
passwordRequire={passwordRequire}
|
||||
allowUpdateName={allowUpdateName}
|
||||
allowUpdateNickname={allowUpdateNickname}
|
||||
isNew={isNew}
|
||||
/>
|
||||
)}
|
||||
<Form colon labelCol={{ span: 4 }} wrapperCol={{ span: 8 }}>
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ export default function Render(
|
|||
passwordRequire: boolean;
|
||||
allowUpdateName?: boolean;
|
||||
allowUpdateNickname?: boolean;
|
||||
isNew: boolean;
|
||||
},
|
||||
{
|
||||
onMobileChange: (value: string) => Promise<void>;
|
||||
|
|
@ -41,6 +42,7 @@ export default function Render(
|
|||
passwordRequire,
|
||||
allowUpdateName,
|
||||
allowUpdateNickname,
|
||||
isNew,
|
||||
} = props.data;
|
||||
const { onConfirm, onMobileChange, onReset, t } = props.methods;
|
||||
return (
|
||||
|
|
@ -104,6 +106,7 @@ export default function Render(
|
|||
passwordRequire={passwordRequire}
|
||||
allowUpdateName={allowUpdateName}
|
||||
allowUpdateNickname={allowUpdateNickname}
|
||||
isNew={isNew}
|
||||
/>
|
||||
)}
|
||||
</Form>
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ export default OakComponent({
|
|||
password,
|
||||
name,
|
||||
nickname,
|
||||
isNew: $$createAt$$ === 1,
|
||||
// isNew: $$createAt$$ === 1,
|
||||
};
|
||||
},
|
||||
properties: {
|
||||
|
|
@ -76,9 +76,10 @@ export default OakComponent({
|
|||
entityId: '',
|
||||
relations: [] as EntityDict['relation']['OpSchema'][],
|
||||
mobile: '',
|
||||
setPasswordConfirm: (value: boolean) => {},
|
||||
setPasswordConfirm: (value: boolean) => { },
|
||||
passwordRequire: false,
|
||||
allowUpdateName: false,
|
||||
allowUpdateNickname: false,
|
||||
isNew: false,
|
||||
},
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue