{"bugs":{"url":"https://github.com/alibaba/rax/issues"},"dist":{"shasum":"6007843196b3027ce6c2a3fb179e1bfbce3b5634","tarball":"https://registry.npmjs.org/rax-textinput/-/rax-textinput-1.3.2-beta.0.tgz","fileCount":35,"integrity":"sha512-Gvm91BHco2DCT9Ijx9scyFIR8MMjGBwI4d9adLw8nm3byCw7dSVSrxtyyxmJ4MfZ6nTnpWDuzz8FEDKKB0vWDQ==","signatures":[{"sig":"MEUCIFqswBapQFrRHtFcGv9dedVim17O8l42SJadfbEe6VBJAiEA3yi8158/ca9QksEtBCvUHLCT1dl0DWF9Orm+Lc0q2lQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":77462,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfDsvICRA9TVsSAnZWagAArKIQAImfIeRyeV7ahuM8OrEt\nbyITsfoAOyEohYpuPk3LC+3Uf2r6T09amUQPrnikasiSOFWAYGwEk9z7ShIY\n1PoR19v6ZUg0Fv2nZi8KIU4xdRE3E3gWdoWfjtPc2aUoGuzJeWYjOJGe3RZd\nB+dlPkDAEz2rSV63hsKjccnzhvbSFMHAALhUcEH++zo2xGR4HgFA1n8CqqOI\nRzQOBc1RftHJEcTvv+5l0aA3Wb/IZytWUToUzpMPMGhmOdnKy+/UMf+4q7c3\n9aGQ1OHtmADPyVzZz1Nk1gynuxxM1H38NKUMVbrwZ7ernwZztg2S0IyngHSi\nEH9WMI61+YgVgrcSGcLmEZneAQY7KkKSnqSNYqH6VELnyeVASSiBhyocgaJT\n84938ox1D8eL1jqSzWi/DkNvszFlZf0trRDBh1Dn2J0jmoHVjG/UlhpfuO6s\nBC/wKMVNYYmSdBdLtrXE3VkNBWyBIE5RNW7sJCsv3C7WfOhRmJCAfJGsOV5s\nVsRPLwTjt4juphWEqfGxHdKjCid36K2XFad5GmTBQEHleZUEjUwhMEig/TXv\nD55xQkTEcn9ftYvFMZOFzi6fTrUyoOmDVJrw1eQkHgD9/+bFvfnINxX6UOqK\nnPy5iU4BMUOURqhzrAfbCYxI65kAmJ461L2zxIgel3wTUZK4zWHoKOsG1CDD\ncoPb\r\n=IYWW\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"moduleNameMapper":{"\\.(css|less|scss|sass)$":"jest-transform-css"}},"main":"lib/index.js","name":"rax-textinput","readme":"[![npm](https://img.shields.io/npm/v/rax-textinput.svg)](https://www.npmjs.com/package/rax-textinput)\n\n**描述：**\nTextInput 是唤起用户输入的基础组件。\n\n当定义 multiline 输入多行文字时其功能相当于 textarea。\n\n## 安装\n\n```bash\n$ npm install rax-textinput --save\n```\n\n## 属性\n\n注：\n1、**支持**列表中的 <img alt=\"browser\" src=\"https://gw.alicdn.com/tfs/TB1uYFobGSs3KVjSZPiXXcsiVXa-200-200.svg\" width=\"25px\" height=\"25px\" />代表 Web <img alt=\"Weex\" src=\"https://gw.alicdn.com/tfs/TB1jM0ebMaH3KVjSZFjXXcFWpXa-200-200.svg\" width=\"25px\" height=\"25px\" />代表 Weex <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" />代表支付宝小程序<img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\"> 代表微信小程序 <img alt=\"quickApp\" src=\"https://gw.alicdn.com/tfs/TB1MP7EwQT2gK0jSZPcXXcKkpXa-200-200.svg\" width=\"25px\" height=\"25px\">代表快应用 <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1jFtVzO_1gK0jSZFqXXcpaXXa-200-200.svg\" width=\"25px\" height=\"25px\" />代表字节跳动小程序\n\n| **属性**           | **类型**   | **默认值** | **必填** | **描述**                                                                                                                                                                                        | **支持**                                                                                                                                                                                                                                                                                                                                                                |\n| ------------------ | ---------- | ---------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| multiline          | `boolen`   | -          | false    | 定义该属性文本框可以输入多行文字                                                                                                                                                                | <img alt=\"browser\" src=\"https://gw.alicdn.com/tfs/TB1uYFobGSs3KVjSZPiXXcsiVXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"Weex\" src=\"https://gw.alicdn.com/tfs/TB1jM0ebMaH3KVjSZFjXXcFWpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\"> <img alt=\"quickApp\" src=\"https://gw.alicdn.com/tfs/TB1MP7EwQT2gK0jSZPcXXcKkpXa-200-200.svg\" width=\"25px\" height=\"25px\"> <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1jFtVzO_1gK0jSZFqXXcpaXXa-200-200.svg\" width=\"25px\" height=\"25px\" /> |\n| accessibilityLabel | `string`   | -          | false    | 为元素添加标识                                                                                                                                                                                  | <img alt=\"browser\" src=\"https://gw.alicdn.com/tfs/TB1uYFobGSs3KVjSZPiXXcsiVXa-200-200.svg\" width=\"25px\" height=\"25px\" />                                                                                                                                                                                                                                                |\n| autoComplete       | `boolen`   | -          | false    | 添加开启自动完成功能                                                                                                                                                                            | <img alt=\"browser\" src=\"https://gw.alicdn.com/tfs/TB1uYFobGSs3KVjSZPiXXcsiVXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"Weex\" src=\"https://gw.alicdn.com/tfs/TB1jM0ebMaH3KVjSZFjXXcFWpXa-200-200.svg\" width=\"25px\" height=\"25px\" />                                                                                                                          |\n| autoFocus          | `boolen`   | -          | false    | 添加开启获取焦点                                                                                                                                                                                | <img alt=\"browser\" src=\"https://gw.alicdn.com/tfs/TB1uYFobGSs3KVjSZPiXXcsiVXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"Weex\" src=\"https://gw.alicdn.com/tfs/TB1jM0ebMaH3KVjSZFjXXcFWpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\"> <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1jFtVzO_1gK0jSZFqXXcpaXXa-200-200.svg\" width=\"25px\" height=\"25px\" /> |\n| onAppear           | `function` | -          | false    | 当前元素可见时触发                                                                                                                                                                              | <img alt=\"browser\" src=\"https://gw.alicdn.com/tfs/TB1uYFobGSs3KVjSZPiXXcsiVXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"Weex\" src=\"https://gw.alicdn.com/tfs/TB1jM0ebMaH3KVjSZFjXXcFWpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> |\n| editable           | `boolean`  | -          | false    | 默认为 true 如果为 fase 则文本框不可编辑                                                                                                                                                        | <img alt=\"browser\" src=\"https://gw.alicdn.com/tfs/TB1uYFobGSs3KVjSZPiXXcsiVXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"Weex\" src=\"https://gw.alicdn.com/tfs/TB1jM0ebMaH3KVjSZFjXXcFWpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\"> <img alt=\"quickApp\" src=\"https://gw.alicdn.com/tfs/TB1MP7EwQT2gK0jSZPcXXcKkpXa-200-200.svg\" width=\"25px\" height=\"25px\"> |\n| keyboardType       | `string`   | -          | false    | 设置弹出哪种软键盘 <br/> web 支持的值有：`default` `ascii-capable` `numbers-and-punctuation` `url` `number-pad` `phone-pad` `name-phone-pad` `email-address` `decimal-pad` `twitter` `Web-search` `numeric`<br/> 支付宝小程序支持的值有：`text` `number` `idcard` `digit` `numberpad` `digitpad` `idcardpad`<br/> 微信小程序支持的值有：`text` `number` `idcard` `digit` |<img alt=\"browser\" src=\"https://gw.alicdn.com/tfs/TB1uYFobGSs3KVjSZPiXXcsiVXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"Weex\" src=\"https://gw.alicdn.com/tfs/TB1jM0ebMaH3KVjSZFjXXcFWpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\">  <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1jFtVzO_1gK0jSZFqXXcpaXXa-200-200.svg\" width=\"25px\" height=\"25px\" />                                                                                                             |\n| maxLength          | `number`   | -          | false    | 设置最大可输入值                                                                                                                                                                                | <img alt=\"browser\" src=\"https://gw.alicdn.com/tfs/TB1uYFobGSs3KVjSZPiXXcsiVXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"Weex\" src=\"https://gw.alicdn.com/tfs/TB1jM0ebMaH3KVjSZFjXXcFWpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\"> <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1jFtVzO_1gK0jSZFqXXcpaXXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"quickApp\" src=\"https://gw.alicdn.com/tfs/TB1MP7EwQT2gK0jSZPcXXcKkpXa-200-200.svg\" width=\"25px\" height=\"25px\">|\n| maxNumberOfLines   | `number`   | -          | false    | 当文本框为 mutiline 时设置最多的行数                                                                                                                                                            | <img alt=\"browser\" src=\"https://gw.alicdn.com/tfs/TB1uYFobGSs3KVjSZPiXXcsiVXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"Weex\" src=\"https://gw.alicdn.com/tfs/TB1jM0ebMaH3KVjSZFjXXcFWpXa-200-200.svg\" width=\"25px\" height=\"25px\" />                                                                                                                          |\n| numberOfLines      | `number`   | -          | false    | 同上设置行数                                                                                                                                                                                    | <img alt=\"browser\" src=\"https://gw.alicdn.com/tfs/TB1uYFobGSs3KVjSZPiXXcsiVXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"Weex\" src=\"https://gw.alicdn.com/tfs/TB1jM0ebMaH3KVjSZFjXXcFWpXa-200-200.svg\" width=\"25px\" height=\"25px\" />  <img alt=\"quickApp\" src=\"https://gw.alicdn.com/tfs/TB1MP7EwQT2gK0jSZPcXXcKkpXa-200-200.svg\" width=\"25px\" height=\"25px\">                                                                                                                        |\n| placeholder        | `string`   | -          | false    | 设置文本框占位符                                                                                                                                                                                  | <img alt=\"browser\" src=\"https://gw.alicdn.com/tfs/TB1uYFobGSs3KVjSZPiXXcsiVXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"Weex\" src=\"https://gw.alicdn.com/tfs/TB1jM0ebMaH3KVjSZFjXXcFWpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\"> <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1jFtVzO_1gK0jSZFqXXcpaXXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"quickApp\" src=\"https://gw.alicdn.com/tfs/TB1MP7EwQT2gK0jSZPcXXcKkpXa-200-200.svg\" width=\"25px\" height=\"25px\">|\n| placeholderColor        | `string`   | #999999          | false    | 设置文本框占位符的颜色                                                                                                                                                                                  | <img alt=\"browser\" src=\"https://gw.alicdn.com/tfs/TB1uYFobGSs3KVjSZPiXXcsiVXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"Weex\" src=\"https://gw.alicdn.com/tfs/TB1jM0ebMaH3KVjSZFjXXcFWpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\"> <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1jFtVzO_1gK0jSZFqXXcpaXXa-200-200.svg\" width=\"25px\" height=\"25px\" /> |\n| password           | `boolean`  | -          | false    | 文本框内容密码显示                                                                                                                                                                              | <img alt=\"browser\" src=\"https://gw.alicdn.com/tfs/TB1uYFobGSs3KVjSZPiXXcsiVXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"Weex\" src=\"https://gw.alicdn.com/tfs/TB1jM0ebMaH3KVjSZFjXXcFWpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\"> <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1jFtVzO_1gK0jSZFqXXcpaXXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"quickApp\" src=\"https://gw.alicdn.com/tfs/TB1MP7EwQT2gK0jSZPcXXcKkpXa-200-200.svg\" width=\"25px\" height=\"25px\">|\n| secureTextEntry    | `boolean`  | -          | false    | 同上文本框内容密码显示                                                                                                                                                                          | <img alt=\"browser\" src=\"https://gw.alicdn.com/tfs/TB1uYFobGSs3KVjSZPiXXcsiVXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"Weex\" src=\"https://gw.alicdn.com/tfs/TB1jM0ebMaH3KVjSZFjXXcFWpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\">  <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1jFtVzO_1gK0jSZFqXXcpaXXa-200-200.svg\" width=\"25px\" height=\"25px\" /> |\n| value              | `string`   | -          | false    | 文本框的文字内容 (受控)                                                                                                                                                                         | <img alt=\"browser\" src=\"https://gw.alicdn.com/tfs/TB1uYFobGSs3KVjSZPiXXcsiVXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"Weex\" src=\"https://gw.alicdn.com/tfs/TB1jM0ebMaH3KVjSZFjXXcFWpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\"> <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1jFtVzO_1gK0jSZFqXXcpaXXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"quickApp\" src=\"https://gw.alicdn.com/tfs/TB1MP7EwQT2gK0jSZPcXXcKkpXa-200-200.svg\" width=\"25px\" height=\"25px\"> |\n| defaultValue       | `string`   | -          | false    | 文本框的文字内容（非受控）                                                                                                                                                                      | <img alt=\"browser\" src=\"https://gw.alicdn.com/tfs/TB1uYFobGSs3KVjSZPiXXcsiVXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"Weex\" src=\"https://gw.alicdn.com/tfs/TB1jM0ebMaH3KVjSZFjXXcFWpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\">  <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1jFtVzO_1gK0jSZFqXXcpaXXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"quickApp\" src=\"https://gw.alicdn.com/tfs/TB1MP7EwQT2gK0jSZPcXXcKkpXa-200-200.svg\" width=\"25px\" height=\"25px\"> |\n| enableNative            | `boolean` | -          | true    | 支付宝小程序是否使用原生组件渲染                                                                                                                         | <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"quickApp\" src=\"https://gw.alicdn.com/tfs/TB1MP7EwQT2gK0jSZPcXXcKkpXa-200-200.svg\" width=\"25px\" height=\"25px\"> |\n| fixed            | `boolean` | -          | false    | 微信小程序输入框 `position` 是否为 `fixed`                                                                                                                         | <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\"> |\n| confirmType | `string` | - | false | 设置键盘右下角按钮的文字，有效值：done（显示“完成”）、go（显示“前往”）、next（显示“下一个”）、search（显示“搜索”）、send（显示“发送”），平台不同显示的文字略有差异 | <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\"> |\n| controlled | `boolean` | false | false | 是否为受控组件。为 true 时，TextInput 内容会完全受 value 控制。 | <img alt=\"browser\" src=\"https://gw.alicdn.com/tfs/TB1uYFobGSs3KVjSZPiXXcsiVXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"quickApp\" src=\"https://gw.alicdn.com/tfs/TB1MP7EwQT2gK0jSZPcXXcKkpXa-200-200.svg\" width=\"25px\" height=\"25px\">|\n| randomNumber | `boolean` | false | false | \t当键盘为数字类型时，是否随机排列。 | <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> |\n| showCount | `boolean` | true | false | 是否渲染字数统计功能（是否删除默认计数器/是否显示字数统计，仅在多行模式生效）。| <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\"> |\n| selectionStart | `number` | -1 | false | 获取光标时，选中文本对应的焦点光标起始位置，需要和 selectionEnd 配合使用。| <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\"> |\n| selectionEnd | `number` | -1 | false | 获取光标时，选中文本对应的焦点光标结束位置，需要和 selectionStart 配合使用。| <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\"> <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1jFtVzO_1gK0jSZFqXXcpaXXa-200-200.svg\" width=\"25px\" height=\"25px\" /> |\n| onBlur             | `function` | -          | false    | 文本框失焦时调用此函数。`onBlur={() => console.log('失焦啦')}`                                                                                                                                  | <img alt=\"browser\" src=\"https://gw.alicdn.com/tfs/TB1uYFobGSs3KVjSZPiXXcsiVXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"Weex\" src=\"https://gw.alicdn.com/tfs/TB1jM0ebMaH3KVjSZFjXXcFWpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\"> <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1jFtVzO_1gK0jSZFqXXcpaXXa-200-200.svg\" width=\"25px\" height=\"25px\" /> |\n| onFocus            | `function` | -          | false    | 文本框获得焦点时调用此函数                                                                                                                                                                      | <img alt=\"browser\" src=\"https://gw.alicdn.com/tfs/TB1uYFobGSs3KVjSZPiXXcsiVXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"Weex\" src=\"https://gw.alicdn.com/tfs/TB1jM0ebMaH3KVjSZFjXXcFWpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\"> <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1jFtVzO_1gK0jSZFqXXcpaXXa-200-200.svg\" width=\"25px\" height=\"25px\" /> |\n| onChange           | `function` | -          | false    | 文本框内容变化时调用此函数（用户输入完成时触发。通常在 blur 事件之后）                                                                                                                          | <img alt=\"browser\" src=\"https://gw.alicdn.com/tfs/TB1uYFobGSs3KVjSZPiXXcsiVXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"Weex\" src=\"https://gw.alicdn.com/tfs/TB1jM0ebMaH3KVjSZFjXXcFWpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\"> <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1jFtVzO_1gK0jSZFqXXcpaXXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"quickApp\" src=\"https://gw.alicdn.com/tfs/TB1MP7EwQT2gK0jSZPcXXcKkpXa-200-200.svg\" width=\"25px\" height=\"25px\">|\n| onChangeText       | `function` | -          | false    | 触发时机和`onChange`一致, 区别在于该函数的参数是文本框内容                                                                                                                                      | <img alt=\"browser\" src=\"https://gw.alicdn.com/tfs/TB1uYFobGSs3KVjSZPiXXcsiVXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"Weex\" src=\"https://gw.alicdn.com/tfs/TB1jM0ebMaH3KVjSZFjXXcFWpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\"> <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1jFtVzO_1gK0jSZFqXXcpaXXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"quickApp\" src=\"https://gw.alicdn.com/tfs/TB1MP7EwQT2gK0jSZPcXXcKkpXa-200-200.svg\" width=\"25px\" height=\"25px\">|\n| onInput            | `function` | -          | false    | 文本框输入内容时调用此函数                                                                                                                                                                      | <img alt=\"browser\" src=\"https://gw.alicdn.com/tfs/TB1uYFobGSs3KVjSZPiXXcsiVXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"Weex\" src=\"https://gw.alicdn.com/tfs/TB1jM0ebMaH3KVjSZFjXXcFWpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\"> <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1jFtVzO_1gK0jSZFqXXcpaXXa-200-200.svg\" width=\"25px\" height=\"25px\" /> |\n\n## 方法\n\n### focus()\n\n取焦点方法(小程序不支持， 快应用不支持)\n\n### blur()\n\n失去焦点方法(小程序不支持，快应用不支持)\n\n### clear()\n\n清除文本框内容(小程序不支持， 快应用不支持)\n\n```jsx\nimport { createElement, Component, render, createRef } from \"rax\";\nimport DriverUniversal from \"driver-universal\";\nimport View from \"rax-view\";\nimport Text from \"rax-text\";\nimport TextInput from \"rax-textinput\";\nconst styles = {\n  root: {\n    width: '750rpx',\n    paddingTop: '20rpx'\n  },\n  container: {\n    padding: '20rpx',\n    borderStyle: \"solid\",\n    borderColor: \"#dddddd\",\n    borderWidth: '1rpx',\n    marginLeft: '20rpx',\n    marginRight: '20rpx',\n    marginBottom: '10rpx'\n  },\n  default: {\n    borderWidth: '1rpx',\n    borderColor: \"#0f0f0f\",\n    flex: 1\n  },\n  eventLabel: {\n    margin: '3rpx',\n    fontSize: '24rpx'\n  },\n  multiline: {\n    borderWidth: '1rpx',\n    borderColor: \"#0f0f0f\",\n    flex: 1,\n    fontSize: '26rpx',\n    height: '100rpx',\n    padding: '8rpx',\n    marginBottom: '8rpx'\n  },\n  hashtag: {\n    color: \"blue\",\n    margin: '10rpx',\n    fontWeight: \"bold\"\n  }\n};\nclass TextAreaDemo extends Component {\n  constructor(props) {\n    super(props);\n    this.state = {\n      text: \"Hello #World , Hello #Rax , Hello #天天好心情\"\n    };\n  }\n\n  render() {\n    let delimiter = /\\s+/;\n    // split string\n    let _text = this.state.text;\n    let token,\n      index,\n      parts = [];\n    while (_text) {\n      delimiter.lastIndex = 0;\n      token = delimiter.exec(_text);\n      if (token === null) {\n        break;\n      }\n      index = token.index;\n      if (token[0].length === 0) {\n        index = 1;\n      }\n      parts.push(_text.substr(0, index));\n      parts.push(token[0]);\n      index = index + token[0].length;\n      _text = _text.slice(index);\n    }\n    parts.push(_text);\n\n    let hashtags = [];\n    parts.forEach(text => {\n      if (/^#/.test(text)) {\n        hashtags.push(\n          <Text key={text} style={styles.hashtag}>\n            {text}\n          </Text>\n        );\n      }\n    });\n\n    return (\n      <View style={styles.container}>\n        <TextInput\n          multiline={true}\n          numberOfLines={3}\n          style={styles.multiline}\n          value={this.state.text}\n          onChangeText={text => {\n            this.setState({ text });\n          }}\n        />\n        <View style={{ flexDirection: \"row\", flexWrap: \"wrap\" }}>\n          {hashtags}\n        </View>\n      </View>\n    );\n  }\n}\n\nclass App extends Component {\n  state = {\n    value: \"I am value\",\n    curText: \"<No Event>\",\n    prevText: \"<No Event>\",\n    prev2Text: \"<No Event>\",\n    prev3Text: \"<No Event>\"\n  };\n\n  inputRef = createRef();\n\n  updateText = text => {\n    this.setState(state => {\n      return {\n        curText: text,\n        prevText: state.curText,\n        prev2Text: state.prevText,\n        prev3Text: state.prev2Text\n      };\n    });\n  };\n\n  render() {\n    // define delimiter\n    return (\n      <View style={styles.root}>\n        <View style={styles.container}>\n          <TextInput\n            autoCapitalize=\"none\"\n            placeholder=\"Enter text to see events\"\n            autoCorrect={false}\n            onChange={event => {\n              this.updateText(\"onChange text: \" + event.nativeEvent.text);\n            }}\n            style={styles.default}\n          />\n\n          <Text style={styles.eventLabel}>\n            {this.state.curText}\n            {\"\\n\"}\n            (prev: {this.state.prevText}){\"\\n\"}\n            (prev2: {this.state.prev2Text}){\"\\n\"}\n            (prev3: {this.state.prev3Text})\n          </Text>\n        </View>\n\n        <View style={styles.container}>\n          <TextInput\n            placeholder=\"Enter text to see events\"\n            value={this.state.value}\n            ref={this.inputRef}\n            style={{\n              width: '600rpx',\n              marginTop: '20rpx',\n              borderWidth: \"2rpx\",\n              borderColor: \"#dddddd\",\n              borderStyle: \"solid\"\n            }}\n            onChangeText={text => {\n              this.setState({\n                value: text\n              });\n            }}\n          />\n\n          <View\n            style={{\n              marginTop: '20rpx'\n            }}\n            onFocus={e => {\n              this.setState({\n                value: e.nativeEvent.text\n              });\n            }}\n            onClick={() => {\n              this.setState({\n                value: \"I am value\"\n              });\n            }}\n          >\n            <Text>Reset</Text>\n          </View>\n        </View>\n        <TextAreaDemo />\n      </View>\n    );\n  }\n}\n\nrender(<App />, document.body, { driver: DriverUniversal });\n```\n## 注意\n\n- 支付宝小程序中， input 如果父类是 position: fixed，可以加上 enableNative=\"false\"，解决输入框错位问题。\n- 微信小程序中，如果 textarea 是在一个 position:fixed 的区域，需要显示指定属性 fixed 为 true\n\n\n","engines":{"npm":">=3.0.0"},"license":"BSD-3-Clause","scripts":{"build":"npm run clean && ../../node_modules/.bin/build-scripts build --config ../../build.json","clean":"rm -rf ./lib && rm -rf ./package-lock.json && rm -rf ./demo/miniapp/lib","start":"../../node_modules/.bin/build-scripts start --config ../../build.json","prepublishOnly":"npm run build"},"_npmUser":{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},"homepage":"https://github.com/alibaba/rax#readme","keywords":["Rax","rax-component","react-component"],"repository":{"url":"git+https://github.com/raxjs/rax-components.git","type":"git"},"_npmVersion":"6.4.1","description":"TextInput component for Rax.","directories":{},"maintainers":[{"name":"amdgigabyte","email":"amdgigabyte@gmail.com"},{"name":"rax-publisher","email":"rax-publisher@zeroling.com"},{"name":"solojiang","email":"feifeishen1996@gmail.com"},{"name":"wintercn","email":"csf178@gmail.com"},{"name":"yacheng","email":"narutosun2@163.com"},{"name":"yuanyan","email":"yuanyan.cao@gmail.com"},{"name":"zeroling","email":"wssgcg1213@qq.com"}],"_nodeVersion":"10.11.0","dependencies":{"classnames":"^2.2.6","universal-env":"^3.2.0","rax-set-native-props":"^1.0.0","babel-runtime-jsx-plus":"^0.1.4"},"miniappConfig":{"main":"lib/miniapp/index","main:wechat":"lib/miniapp-wechat/index","main:quickapp":"lib/quickapp/index","main:bytedance":"lib/bytedance-microapp/index"},"_hasShrinkwrap":false,"quickappConfig":{"main":"lib/quickapp/index"},"readmeFilename":"README.md","devDependencies":{"rax":"^1.0.0","eslint":"^5.16.0","csstype":"^2.6.4","rax-text":"^1.0.1","rax-view":"^1.0.1","@types/jest":"^24.0.12","@rax-types/rax":"^1.0.5","@types/ali-app":"^1.0.0","driver-universal":"^1.0.0","@types/classnames":"^2.2.9","eslint-config-rax":"^0.0.0","rax-test-renderer":"^1.0.0","jest-transform-css":"^2.0.0","@typescript-eslint/parser":"^1.7.0","@typescript-eslint/eslint-plugin":"^1.7.0"},"peerDependencies":{"rax":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/rax-textinput_1.3.2-beta.0_1594805192331_0.3219044930024435","host":"s3://npm-registry-packages"},"_id":"rax-textinput@1.3.2-beta.0","version":"1.3.2-beta.0"}