feat: 更新 App.vue,简化 FormKit 组件的默认值和帮助文本,修复属性引用
All checks were successful
/ surge (push) Successful in 25s

This commit is contained in:
严浩
2024-11-20 14:06:59 +08:00
parent 72397d5bd9
commit 0f4cccdc11

View File

@ -65,7 +65,7 @@ const SCHEMA: FormKitSchemaDefinition = [
<FormKit <FormKit
type="form" type="form"
#default="{ value } : { value ?: Record<string, any> }" #default="{ value }"
@submit="submit" @submit="submit"
submit-label="提交 " submit-label="提交 "
> >
@ -87,7 +87,7 @@ const SCHEMA: FormKitSchemaDefinition = [
return `分组 ${name} 下的姓名必须包含 '测试' 字符串。` return `分组 ${name} 下的姓名必须包含 '测试' 字符串。`
}, },
}" }"
#default="{ id, messages, fns, classes }" #default="{ id, messages, fns, classes, value: attributes, }"
> >
<FormKit <FormKit
@ -95,12 +95,12 @@ const SCHEMA: FormKitSchemaDefinition = [
name="name" name="name"
id="nameNodeId" id="nameNodeId"
label="姓名" label="姓名"
:help="`现在 confirmName 的值是:${value?.attributes?.confirmName}`" :help="`现在 confirmName 的值是:${attributes?.confirmName}`"
some-attr="some-attr-value" some-attr="some-attr-value"
/> />
<FormKit <FormKit
v-if="value?.attributes?.name" v-if="attributes?.name"
:preserve="false" :preserve="false"
name="confirmName" name="confirmName"
type="checkbox" type="checkbox"