For AI agents: the complete documentation index is available at /next/zh/llms.txt, the full documentation bundle is available at /next/zh/llms-full.txt, and this page is available as Markdown at /next/zh/api/genui/a2ui/functions/useChecks.md.
Lynx
  • 简体中文
  • 函数: useChecks()

    useChecks(options: object): CheckOutcome & object

    以响应式方式对某个输入组件的 checks 数组求值。返回当前结果 以及第一条失败信息(便于内联渲染错误)。当外部存在 <FormContext.Provider> 时,该输入也会向其注册,以便同一表单中的 Button 能够响应 isValid。

    参数

    参数类型
    options{ checks: CheckLike[] | undefined; componentId: string; dataContextPath?: string; surface: Surface | undefined; }
    options.checksCheckLike[] | undefined
    options.componentIdstring
    options.dataContextPath?string
    options.surfaceSurface | undefined

    返回

    CheckOutcome & object

    除非另有说明,本项目采用知识共享署名 4.0 国际许可协议进行许可,代码示例采用 Apache License 2.0 许可协议进行许可。