import { ComponentType } from 'react' import { StandardProps, CommonEventFunction } from './common' interface FormProps extends StandardProps { /** 是否返回 `formId` 用于发送模板消息。 * @default false * @supported weapp, alipay, swan, qq, jd, h5, harmony_hybrid */ reportSubmit?: boolean /** 等待一段时间(毫秒数)以确认 `formId` 是否生效。 * 如果未指定这个参数,`formId` 有很小的概率是无效的(如遇到网络失败的情况)。 * 指定这个参数将可以检测 `formId` 是否有效, * 以这个参数的时间作为这项检测的超时时间。 * 如果失败,将返回 `requestFormId:fail` 开头的 `formId`。 * @default 0 * @supported weapp */ reportSubmitTimeout?: number /** 模板消息的类型,report-submit 为 true 时填写有效 * 取值:default / subscribe * @default 'default' * @supported swan */ reportType?: string /** 发送订阅类模板消息所用的模板库标题 ID ,可通过 getTemplateLibraryList 获取 * 当参数类型为 Array 时,可传递 1~3 个模板库标题 ID (注:此处填写模板库id。示例:BD0001) * @supported swan */ templateId?: string | Array /** 发送订阅类模板消息时所使用的唯一标识符,内容由开发者自定义,用来标识订阅场景 * 注意:同一用户在同一 subscribe-id 下的多次授权不累积下发权限,只能下发一条。若要订阅多条,需要不同 subscribe-id * @supported swan */ subscribeId?: string /** 用于分发目的。取值:0 或 1,其中 0 表示默认,1 表示留资目标,需要和留资分发配置一起使用,详情见留资分发配置 * @supported tt * @default 0 */ conversionTarget?: number /** 用于分发目的。开发者在【小程序开发者后台 -> 进入目标小程序 -> 运营 -> 流量配置 -> 抖音 -> 留资分发配置】复制创建的配置 ID,需要和留资分发配置一起使用,详情见留资分发配置 * * @supported tt * @default "" */ clueComponentId?: string /** 携带 form 中的数据触发 submit 事件 * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony_hybrid */ onSubmit?: CommonEventFunction /** 表单重置时会触发 reset 事件 * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony_hybrid */ onReset?: CommonEventFunction } declare namespace FormProps { interface onSubmitEventDetail { /** 当点击 `
` 表单中 `form-type` 为 `submit` 的 `