fix(use-safe-n-form): 更改 formRef 为 formInst
All checks were successful
CI/CD Pipeline / playwright (push) Successful in 3m38s
CI/CD Pipeline / build-and-deploy (push) Successful in 3m46s

This commit is contained in:
严浩
2025-10-31 13:43:27 +08:00
parent 48eb653f1a
commit c8b8a3caa4
2 changed files with 5 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
<script setup lang="ts">
const { formValue, SafeNForm, SafeNFormItem, formRef } = useSafeNForm({
const { formInst, formValue, SafeNForm, SafeNFormItem } = useSafeNForm({
initialFormValue: {
/* ⚠️:
如果没使用`SafeNFormItem`
@@ -15,7 +15,7 @@ const { formValue, SafeNForm, SafeNFormItem, formRef } = useSafeNForm({
});
function handleValidateClick() {
formRef.value?.validate((errors) => {
formInst.value?.validate((errors) => {
if (!errors) {
window.$nMessage!.success('Valid');
} else {