docs(Field): add input type faq (#6609)

This commit is contained in:
neverland 2020-06-25 16:45:27 +08:00 committed by GitHub
parent 2297ce6f30
commit ca0c7c236d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -313,6 +313,10 @@ export default {
## 常见问题
### 设置 type 为 number 后,为什么 input 标签的类型仍为 text?
HTML 原生的 `type="number"` 属性在 iOS 和 Android 系统上都存在一定问题,比如 maxlength 属性不生效、无法获取到完整的输入内容等。因此设置 type 为 `number`Field 不会使用原生的 `type="number"` 属性,而是用现代浏览器支持的 [inputmode 属性](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Global_attributes/inputmode)来控制输入键盘的类型。
### 在桌面端点击清除按钮无效?
清除按钮监听是的移动端 Touch 事件,参见[在桌面端使用](#/zh-CN/quickstart#zai-zhuo-mian-duan-shi-yong)。