/* tslint:disable */ /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ export interface Input { /** * 初始内容。 */ value?: string; /** * 组件名字,用于表单提交获取数据。 */ name?: string; /** * input 的类型,有效值:text、 number、 idcard、 digit(可以唤起带有小数点的数字键盘)、numberpad、digitpad、 idcardpad。my.canIUse("input.type.numberpad") 来检测。 * 注意: 当启用数字键盘时,在 Android 客户端上,脱离文档流(如设置了 float 或 position: fixed 等样式)并指定了 bottom 属性的元素会被影响(该元素会被键盘顶起)。可以采用如下方法来暂且避免这个问题:当 input 框聚焦后隐藏被影响的元素。 */ type?: string; /** * 是否是密码类型。 */ password?: boolean; /** * 占位符。 */ placeholder?: string; /** * 指定 placeholder 的样式,可设置间距。 */ "placeholder-style"?: string; /** * 指定 placeholder 的样式类。 */ "placeholder-class"?: string; /** * 是否禁用。 */ disabled?: boolean; /** * 最大长度。 */ maxlength?: number; /** * 获取焦点。 */ focus?: boolean; /** * 设置键盘右下角按钮的文字,有效值:done(显示“完成”)、go(显示“前往”)、next(显示“下一个”)、search(显示“搜索”)、send(显示“发送”),平台不同显示的文字略有差异。 * 注意: 只有在 type=text 时有效。 */ "confirm-type"?: string; /** * 点击键盘右下角按钮时是否保持键盘不收起状态。 */ "confirm-hold"?: boolean; /** * 指定 focus 时的光标位置。 */ cursor?: number; /** * 获取光标时,选中文本对应的焦点光标起始位置,需要和 selection-end 配合使用。 */ "selection-start"?: number; /** * 获取光标时,选中文本对应的焦点光标结束位置,需要和 selection-start 配合使用。 */ "selection-end"?: number; /** * 当 type 为 number, digit, idcard 数字键盘是否随机排列。 */ "random-number"?: boolean; /** * 是否为受控组件。为 true 时,value 内容会完全受 setData 控制。 * 建议当 type 值为 text 时不要将 controlled 设置为 true,详见 Bugs & Tips。 */ controlled?: boolean; /** * 是否强制使用系统键盘和 Web-view 创建的 input 元素。为 true 时,confirm-type、confirm-hold 可能失效。 */ "always-system"?: boolean; /** * 键盘输入时触发 input 事件,event.detail = {value: value,cursor: cursor}。 */ onInput?: () => void; /** * 点击键盘完成时触发,event.detail = {value: value} */ onConfirm?: () => void; /** * 聚焦时触发,event.detail = {value: value}。 */ onFocus?: () => void; /** * 失去焦点时触发(仅支持真机),event.detail = {value: value}。 */ onBlur?: () => void; }