Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
qq_24279267
unidocs-zh
提交
47ba6b4c
U
unidocs-zh
项目概览
qq_24279267
/
unidocs-zh
与 Fork 源项目一致
Fork自
DCloud / unidocs-zh
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
unidocs-zh
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
47ba6b4c
编写于
7月 04, 2022
作者:
DCloud-WZF
💬
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update: 更新input props 及 type values
上级
e0b2b7e6
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
19 addition
and
5 deletion
+19
-5
docs/component/input.md
docs/component/input.md
+19
-5
未找到文件。
docs/component/input.md
浏览文件 @
47ba6b4c
...
...
@@ -23,9 +23,21 @@
|selection-start|Number|-1|光标起始位置,自动聚集时有效,需与selection-end搭配使用||
|selection-end|Number|-1|光标结束位置,自动聚集时有效,需与selection-start搭配使用||
|adjust-position|Boolean|true|键盘弹起时,是否自动上推页面|App-Android(vue 页面 softinputMode 为 adjustResize 时无效,使用 x5 内核时无效)、微信小程序、百度小程序、QQ小程序、京东小程序|
|hold-keyboard|boolean|false|focus时,点击页面的时候不收起键盘|微信小程序2.8.2|
|auto-blur|boolean|false|键盘收起时,是否自动失去焦点|App-Vue 3.0.0+|
|ignoreCompositionEvent|boolean|true|是否忽略组件内对文本合成系统事件的处理。为
`false`
时将触发
`compositionstart、compositionend、compositionupdate`
事件,且在文本合成期间会触发
`input`
事件|App-vue (3.4.4+)、H5 (3.4.4+)、App-nvue不支持|
|hold-keyboard|Boolean|false|focus时,点击页面的时候不收起键盘|微信小程序2.8.2|
|auto-blur|Boolean|false|键盘收起时,是否自动失去焦点|App-Vue 3.0.0+|
|ignoreCompositionEvent|Boolean|true|是否忽略组件内对文本合成系统事件的处理。为
`false`
时将触发
`compositionstart、compositionend、compositionupdate`
事件,且在文本合成期间会触发
`input`
事件|App-vue (3.4.4+)、H5 (3.4.4+)、App-nvue不支持|
|always-embed|Boolean|false|强制 input 处于同层状态,默认 focus 时 input 会切到非同层状态 (仅在 iOS 下生效)|微信小程序 2.10.4+|
|hold-keyboard|Boolean|false|focus时,点击页面的时候不收起键盘|微信小程序 2.8.2+|
|safe-password-cert-path|String||安全键盘加密公钥的路径,只支持包内路径|微信小程序 2.18.0+|
|safe-password-length|Number||安全键盘输入密码长度|微信小程序 2.18.0+|
|safe-password-time-stamp|Number||安全键盘加密时间戳|微信小程序 2.18.0+|
|safe-password-nonce|String||安全键盘加密盐值|微信小程序 2.18.0+|
|safe-password-salt|String||安全键盘计算 hash 盐值,若指定custom-hash 则无效|微信小程序 2.18.0+|
|safe-password-custom-hash|String||安全键盘计算 hash 的算法表达式,如 md5(sha1('foo' + sha256(sm3(password + 'bar'))))|微信小程序 2.18.0+|
|random-number|Boolean|false|当 type 为 number, digit, idcard 数字键盘是否随机排列|支付宝小程序 1.9.0+|
|controlled|Boolean|false|是否为受控组件。为 true 时,value 内容会完全受 setData 控制|支付宝小程序 1.9.0+|
|always-system|Boolean|false|是否强制使用系统键盘和 Web-view 创建的 input 元素。为 true 时,confirm-type、confirm-hold 可能失效|支付宝小程序 2.7.3+|
|@input|EventHandle||当键盘输入时,触发input事件,event.detail = {value}|差异见下方 Tips|
|@focus|EventHandle||输入框聚焦时触发,event.detail = { value, height },height 为键盘高度|仅微信小程序、京东小程序、App(2.2.3+) 、QQ小程序支持 height|
|@blur|EventHandle||输入框失去焦点时触发,event.detail = {value: value}|快手小程序不支持|
...
...
@@ -42,7 +54,7 @@
```
html
<!-- 错误写法 -->
<input
:type=
"isText?'text':'number'"
placeholder=
"请输入内容"
/>
<!-- 正确写法 -->
<input
v-if=
"isText"
type=
"text"
placeholder=
"请输入文本"
/>
<input
v-else
type=
"number"
placeholder=
"请输入数字"
/>
...
...
@@ -59,6 +71,8 @@
|idcard|身份证输入键盘|微信、支付宝、百度、QQ小程序、快手小程序、京东小程序|
|digit|带小数点的数字键盘|均支持,App平台、H5平台 vue 页面在 iOS 平台显示的键盘包含负数。|
|tel|电话输入键盘|仅App的nvue页面支持|
|safe-password|密码安全输入键盘|微信小程序|
|nickname|昵称输入键盘|微信小程序|
**注意事项**
...
...
@@ -146,7 +160,7 @@ App平台软键盘弹出有 adjustResize|adjustPan 两种模式,默认为 adju
-
原生输入框一样受配置的
`adjustPan|adjustResize`
模式影响
**input示例**
[
查看演示
](
https://hellouniapp.dcloud.net.cn/pages/component/input/input
)
以下示例代码,来自于
[
hello uni-app项目
](
https://github.com/dcloudio/hello-uniapp
)
,推荐使用HBuilderX,新建uni-app项目,选择hello uni-app模板,可直接体验完整示例。
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录