/* 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="{= value =}"(注:若要取键盘输入后的 value 请通过 bindinput 获取) */ value?: string; /** * input 的类型 */ type?: "text" | "number" | "idcard" | "digit"; /** * 是否是密码类型 */ password?: boolean; /** * 输入框为空时占位符。其样式暂时只支持设置 text-align、font-size、font-weight、color */ placeholder?: string; /** * placeholder 的样式 */ "placeholder-style"?: string; /** * placeholder 的样式类 */ "placeholder-class"?: string; /** * 是否禁用 */ disabled?: boolean; /** * 最大输入长度,设置为 -1 的时候不限制最大长度 */ maxlength?: number; /** * 指定光标与键盘的距离(单位:px)。当键盘弹出时, 如果需要页面上滑才能完整显示 input 组件, 那么此时光标与键盘的距离为设定的 cursor-spacing 值; 如果 input 组件处于屏幕上方,键盘弹出时不会挡住 input, 则忽略该属性 */ "cursor-spacing"?: number; /** * 获取焦点,调起键盘 * 开发者工具暂不支持自动获取焦点 */ focus?: boolean; /** * 设置键盘右下角按钮的文字。其最终表现与手机输入法本身的实现有关,部分安卓系统输入法和第三方输入法可能不支持或不完全支持 */ "confirm-type"?: "send" | "search" | "next" | "go" | "done"; /** * 点击键盘右下角按钮时是否保持键盘不收起 */ "confirm-hold"?: boolean; /** * 指定 focus 时的光标位置,自动聚焦时才会生效 * 开发者工具暂不支持 */ cursor?: number; /** * 光标起始位置,自动聚焦时有效,需与 selection-end 搭配使用 */ "selection-start"?: number; /** * 光标结束位置,自动聚焦时有效,需与 selection-start 搭配使用 */ "selection-end"?: number; /** * 键盘弹起时,是否自动上推页面 */ "adjust-position"?: boolean; /** * 当键盘输入时,触发 input 事件,event.detail = {value, cursor, keyCode},keyCode 为键值。暂不支持处理函数直接 return 一个字符串 */ bindInput?: () => void; /** * 输入框聚焦时触发,event.detail = {value: value, height: height},height 为键盘高度 */ bindFocus?: () => void; /** * 输入框失去焦点时触发,event.detail = {value: value} */ bindBlur?: () => void; /** * 点击完成按钮时触发,event.detail = {value: value} */ bindConfirm?: () => void; }