手机号 复制粘贴 报错

This commit is contained in:
Wang Kejun 2023-08-22 17:01:58 +08:00
parent bee2231298
commit dc44e4f5a0
3 changed files with 10 additions and 5 deletions

View File

@ -51,6 +51,7 @@ export default OakComponent({
});
if (data.length > 0) {
this.clean();
this.unsetId();
this.setId(data[0].id!);
this.setState({
isNew: false,
@ -58,6 +59,7 @@ export default OakComponent({
}
else {
this.clean();
this.unsetId();
this.setState({
isNew: true,
})

View File

@ -37,7 +37,7 @@
</block>
<l-button disabled="{{!oakDirty}}" size="long" bind:lintap="onConfirm">
<l-button disabled="{{!oakDirty || !mobileValueReady}}" size="long" bind:lintap="onConfirm">
{{t('common::action.confirm')}}
</l-button>
</view>

View File

@ -61,9 +61,7 @@ export default function Render(props: WebComponentProps<EntityDict, 'mobile', fa
{mobileValueReady && userId && (
<OnUser
oakAutoUnmount={true}
oakPath={oakFullpath ? `${oakFullpath}.user`
: undefined
}
oakPath={oakFullpath ? `${oakFullpath}.user` : undefined}
entity={entity}
entityId={entityId}
relations={relations}
@ -77,11 +75,16 @@ export default function Render(props: WebComponentProps<EntityDict, 'mobile', fa
<Button
style={{ flex: 2 }}
type="primary"
htmlType="reset"
onClick={async () => {
await onConfirm();
setPasswordConfirm(false);
}}
disabled={!legal || !oakExecutable || (isNew && !passwordConfirm)}
disabled={
!legal ||
!oakExecutable ||
(isNew && !passwordConfirm)
}
>
{t('common::action.confirm')}
</Button>