mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
docs(Field): add input type faq (#6609)
This commit is contained in:
parent
2297ce6f30
commit
ca0c7c236d
@ -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)。
|
||||
|
Loading…
x
Reference in New Issue
Block a user