属性
android-fullscreen-mode
Android
3.4
在横屏时是否进入全屏输入模式,在此模式下键盘和输入框将占据整个屏幕
confirm-type
Android
iOS
Harmony
3.4
确认按钮的类型
disabled
Android
iOS
Harmony
3.5
是否启用交互
input-filter
Android
iOS
Harmony
3.4
过滤输入内容,并以正则表达式的形式进行处理
ios-auto-correct
iOS
3.4
在 iOS 上自动纠正输入内容
ios-spell-check
iOS
3.4
在 iOS 上检查拼写问题
maxlength
Android
iOS
Harmony
3.4
最大输入长度
placeholder
Android
iOS
Harmony
3.4
占位符
readonly
Android
iOS
Harmony
3.4
只读
show-soft-input-on-focus
Android
iOS
Harmony
3.4
聚焦时显示软输入键盘
type
Android
iOS
Harmony
3.4
输入内容类型
事件
前端可以绑定相应的事件回调来监听元素的运行时行为,如下所示。
bindblur
Android
iOS
Harmony
3.4
失去焦点
bindconfirm
Android
iOS
Harmony
3.4
确认按钮被点击
bindfocus
Android
iOS
Harmony
3.4
获得焦点
bindinput
Android
iOS
Harmony
3.4
输入内容改变
bindselection
Android
iOS
Harmony
3.4
输入选中文本改变
方法
前端可以通过 SelectorQuery API 调用组件方法。
blur
Android
iOS
Harmony
3.4
释放焦点
focus
Android
iOS
Harmony
3.4
请求焦点
getValue
Android
iOS
Harmony
3.4
获取输入内容
setSelectionRange
Android
iOS
Harmony
3.4
设置选中文本范围
setValue
Android
iOS
Harmony
3.4
设置输入内容