Unverified 提交 6b594aec 作者: lzdjack 提交者: GitHub

fix: Fix the issue that clear verification does not take effect in the reset form (#1498)

上级 fa33c6b0
import type { ComputedRef, Ref } from 'vue';
import type { FormProps, FormSchema, FormActionType } from '../types/form';
import type { NamePath } from 'ant-design-vue/lib/form/interface';
import { unref, toRaw } from 'vue';
import { unref, toRaw, nextTick } from 'vue';
import { isArray, isFunction, isObject, isString } from '/@/utils/is';
import { deepMerge } from '/@/utils';
import { dateItemType, handleInputNumberValue } from '../helper';
......@@ -39,7 +39,8 @@ export function useFormEvents({
Object.keys(formModel).forEach((key) => {
formModel[key] = defaultValueRef.value[key];
});
clearValidate();
nextTick(() => clearValidate());
emit('reset', toRaw(formModel));
submitOnReset && handleSubmit();
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论