Skip to content

Commit

Permalink
fix(user): required password when create user
Browse files Browse the repository at this point in the history
  • Loading branch information
suyuan32 committed Jun 8, 2024
1 parent 25e7eca commit d0d5c74
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/views/sys/user/UserDrawer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
const { t } = useI18n();
const { createMessage } = useMessage();
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm({
const [registerForm, { resetFields, setFieldsValue, validate, updateSchema }] = useForm({
labelWidth: 160,
baseColProps: { span: 24 },
layout: 'vertical',
Expand All @@ -41,12 +41,13 @@
setDrawerProps({ confirmLoading: false });
isUpdate.value = !!data?.isUpdate;
if (unref(isUpdate)) {
setFieldsValue({
...data.record,
});
}
updateSchema({ field: 'password', required: !unref(isUpdate) });
});
const getTitle = computed(() =>
Expand Down

0 comments on commit d0d5c74

Please sign in to comment.