{
  "title": "input",
  "type": "object",
  "properties": {
    "value": {
      "type": "string",
      "description": "输入框的初始内容"
    },
    "type": {
      "type": "string",
      "description": "input 的类型",
      "defaultValue": "text",
      "enum": [
        "text",
        "number",
        "idcard",
        "digit",
        "safe-password",
        "nickname"
      ]
    },
    "password": {
      "type": "boolean",
      "description": "是否是密码类型",
      "defaultValue": false
    },
    "placeholder": {
      "type": "string",
      "description": "输入框为空时占位符"
    },
    "placeholder-style": {
      "type": "string",
      "description": "指定 placeholder 的样式"
    },
    "placeholder-class": {
      "type": "string",
      "description": "指定 placeholder 的样式类",
      "defaultValue": "input-placeholder"
    },
    "disabled": {
      "type": "boolean",
      "description": "是否禁用",
      "defaultValue": false
    },
    "maxlength": {
      "type": "number",
      "description": "最大输入长度，设置为 -1 的时候不限制最大长度",
      "defaultValue": 140
    },
    "cursor-spacing": {
      "type": "number",
      "description": "指定光标与键盘的距离，取 input 距离底部的距离和 cursor-spacing 指定的距离的最小值作为光标与键盘的距离",
      "defaultValue": 0
    },
    "auto-focus": {
      "type": "boolean",
      "description": "(即将废弃，请直接使用 focus )自动聚焦，拉起键盘",
      "defaultValue": false
    },
    "focus": {
      "type": "boolean",
      "description": "获取焦点",
      "defaultValue": false
    },
    "confirm-type": {
      "type": "string",
      "description": "设置键盘右下角按钮的文字，仅在type='text'时生效",
      "defaultValue": "done",
      "enum": [
        "send",
        "search",
        "next",
        "go",
        "done"
      ]
    },
    "always-embed": {
      "type": "boolean",
      "description": "强制 input 处于同层状态，默认 focus 时 input 会切到非同层状态 (仅在 iOS 下生效)",
      "defaultValue": false
    },
    "confirm-hold": {
      "type": "boolean",
      "description": "点击键盘右下角按钮时是否保持键盘不收起",
      "defaultValue": false
    },
    "cursor": {
      "type": "number",
      "description": "指定focus时的光标位置"
    },
    "selection-start": {
      "type": "number",
      "description": "光标起始位置，自动聚集时有效，需与selection-end搭配使用",
      "defaultValue": -1
    },
    "selection-end": {
      "type": "number",
      "description": "光标结束位置，自动聚集时有效，需与selection-start搭配使用",
      "defaultValue": -1
    },
    "adjust-position": {
      "type": "boolean",
      "description": "键盘弹起时，是否自动上推页面",
      "defaultValue": true
    },
    "hold-keyboard": {
      "type": "boolean",
      "description": "focus时，点击页面的时候不收起键盘",
      "defaultValue": false
    },
    "safe-password-cert-path": {
      "type": "string",
      "description": "安全键盘加密公钥的路径，只支持包内路径"
    },
    "safe-password-length": {
      "type": "number",
      "description": "安全键盘输入密码长度"
    },
    "safe-password-time-stamp": {
      "type": "number",
      "description": "安全键盘加密时间戳"
    },
    "safe-password-nonce": {
      "type": "string",
      "description": "安全键盘加密盐值"
    },
    "safe-password-salt": {
      "type": "string",
      "description": "安全键盘计算hash盐值，若指定custom-hash 则无效"
    },
    "safe-password-custom-hash": {
      "type": "string",
      "description": "安全键盘计算hash的算法表达式，如 `md5(sha1('foo' + sha256(sm3(password + 'bar'))))`"
    },
    "bindInput": {
      "tsType": "() => void",
      "description": "键盘输入时触发，event.detail = {value, cursor, keyCode}，keyCode 为键值，2.1.0 起支持，处理函数可以直接 return 一个字符串，将替换输入框的内容。"
    },
    "bindFocus": {
      "tsType": "() => void",
      "description": "输入框聚焦时触发，event.detail = { value, height }，height 为键盘高度，在基础库 1.9.90 起支持"
    },
    "bindBlur": {
      "tsType": "() => void",
      "description": "输入框失去焦点时触发，event.detail = { value, encryptedValue, encryptError }"
    },
    "bindConfirm": {
      "tsType": "() => void",
      "description": "点击完成按钮时触发，event.detail = { value }"
    },
    "bindKeyboardHeightChange": {
      "tsType": "() => void",
      "description": "键盘高度发生变化的时候触发此事件，event.detail = {height: height, duration: duration}"
    },
    "bindNickNameReview": {
      "tsType": "() => void",
      "description": "用户昵称审核完毕后触发，仅在 type 为 \"nickname\" 时有效，event.detail = { pass, timeout }"
    }
  },
  "additionalProperties": false,
  "required": [
    "value",
    "placeholder",
    "placeholder-style",
    "cursor",
    "bindinput",
    "bindfocus",
    "bindblur",
    "bindconfirm",
    "bindkeyboardheightchange",
    "bindnicknamereview",
    "placeholder-style"
  ]
}