docs: Update annotations-form.md with checkbox details (#526)

* docs: Update annotations-form.md with checkbox details

Clarified that 'checkbox' input components should use 'on-value' and 'off-value' for string values.

* docs: Update annotations form documentation for checkbox input (#1)
This commit is contained in:
Howie Xie
2025-11-27 13:42:55 +08:00
committed by GitHub
parent 44ad38cde3
commit 99e82aeb3b
2 changed files with 2 additions and 2 deletions

View File

@@ -7,7 +7,7 @@ title: 元数据表单定义
定义元数据编辑表单同样使用 `FormKit Schema`,但和主题或插件的定义方式稍有不同,其中输入组件类型可参考 [表单定义](./form-schema.md)。
:::info 提示
因为 `metadata.annotations` 是一个键值都为字符串类型的对象所以表单项的值必须为字符串类型。这就意味着FormKit 的 `number``group``repeater` 等类型的输入组件都不能使用。
因为 `metadata.annotations` 是一个键值都为字符串类型的对象所以表单项的值必须为字符串类型。这就意味着FormKit 的 `number``group``repeater` 等类型的输入组件都不能使用。`checkbox` 类型的输入组件应通过 `on-value``off-value` 指定字符串值,以替代默认的布尔值。
:::
## AnnotationSetting 资源定义方式