feat: 更新 App.vue,简化 FormKit 组件的默认值和帮助文本,修复属性引用
All checks were successful
/ surge (push) Successful in 25s
All checks were successful
/ surge (push) Successful in 25s
This commit is contained in:
@ -65,7 +65,7 @@ const SCHEMA: FormKitSchemaDefinition = [
|
||||
|
||||
<FormKit
|
||||
type="form"
|
||||
#default="{ value } : { value ?: Record<string, any> }"
|
||||
#default="{ value }"
|
||||
@submit="submit"
|
||||
submit-label="提交 ✨"
|
||||
>
|
||||
@ -87,7 +87,7 @@ const SCHEMA: FormKitSchemaDefinition = [
|
||||
return `分组 ${name} 下的姓名必须包含 '测试' 字符串。`
|
||||
},
|
||||
}"
|
||||
#default="{ id, messages, fns, classes }"
|
||||
#default="{ id, messages, fns, classes, value: attributes, }"
|
||||
>
|
||||
|
||||
<FormKit
|
||||
@ -95,12 +95,12 @@ const SCHEMA: FormKitSchemaDefinition = [
|
||||
name="name"
|
||||
id="nameNodeId"
|
||||
label="姓名"
|
||||
:help="`现在 confirmName 的值是:${value?.attributes?.confirmName}`"
|
||||
:help="`现在 confirmName 的值是:${attributes?.confirmName}`"
|
||||
some-attr="some-attr-value"
|
||||
/>
|
||||
|
||||
<FormKit
|
||||
v-if="value?.attributes?.name"
|
||||
v-if="attributes?.name"
|
||||
:preserve="false"
|
||||
name="confirmName"
|
||||
type="checkbox"
|
||||
|
Reference in New Issue
Block a user