fix: 修复强制重置密码流程与表单状态
- 修正强制改密跳转及免旧密码的服务端校验 - 统一双端表单错误布局与更新按钮加载状态 - 补充认证服务和强制改密路由测试
This commit is contained in:
@@ -7,15 +7,20 @@ import { computed, nextTick, onUnmounted, useTemplateRef, watch } from 'vue';
|
||||
|
||||
import { CircleAlert } from '@easyflow-core/icons';
|
||||
import {
|
||||
EasyFlowRenderContent,
|
||||
EasyFlowTooltip,
|
||||
FormControl,
|
||||
FormDescription,
|
||||
FormField,
|
||||
FormItem,
|
||||
FormMessage,
|
||||
EasyFlowRenderContent,
|
||||
EasyFlowTooltip,
|
||||
} from '@easyflow-core/shadcn-ui';
|
||||
import { cn, isFunction, isObject, isString } from '@easyflow-core/shared/utils';
|
||||
import {
|
||||
cn,
|
||||
isFunction,
|
||||
isObject,
|
||||
isString,
|
||||
} from '@easyflow-core/shared/utils';
|
||||
|
||||
import { toTypedSchema } from '@vee-validate/zod';
|
||||
import { useFieldError, useFormValues } from 'vee-validate';
|
||||
@@ -387,7 +392,7 @@ onUnmounted(() => {
|
||||
</div>
|
||||
|
||||
<Transition name="slide-up" v-if="!compact">
|
||||
<FormMessage class="absolute" />
|
||||
<FormMessage />
|
||||
</Transition>
|
||||
</div>
|
||||
</FormItem>
|
||||
|
||||
@@ -10,10 +10,14 @@ import { EasyFlowButton } from '@easyflow-core/shadcn-ui';
|
||||
|
||||
interface Props {
|
||||
formSchema?: EasyFlowFormSchema[];
|
||||
buttonText?: string;
|
||||
buttonLoading?: boolean;
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
formSchema: () => [],
|
||||
buttonText: '更新密码',
|
||||
buttonLoading: false,
|
||||
});
|
||||
|
||||
const emit = defineEmits<{
|
||||
@@ -49,8 +53,13 @@ defineExpose({
|
||||
<template>
|
||||
<div>
|
||||
<Form />
|
||||
<EasyFlowButton type="submit" class="mt-4" @click="handleSubmit">
|
||||
更新密码
|
||||
<EasyFlowButton
|
||||
:loading="buttonLoading"
|
||||
type="submit"
|
||||
class="mt-4 flex h-8 w-28 p-0"
|
||||
@click="handleSubmit"
|
||||
>
|
||||
{{ buttonText }}
|
||||
</EasyFlowButton>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user