From 914064f9015ba7e031af6f963b6e7772efa7fd6c Mon Sep 17 00:00:00 2001 From: qiang Date: Tue, 13 Aug 2019 20:27:02 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E5=A2=9E=E5=8A=A0=20uni.onKeyboardHeig?= =?UTF-8?q?htChange=20=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/api/key.md | 38 ++++++++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/docs/api/key.md b/docs/api/key.md index 68deba7c5..fcd1a3906 100644 --- a/docs/api/key.md +++ b/docs/api/key.md @@ -1,10 +1,36 @@ -#### uni.hideKeyboard() -隐藏软键盘 +#### uni.hideKeyboard() + +隐藏软键盘 + +隐藏已经显示的软键盘,如果软键盘没有显示则不做任何操作。 **平台差异说明** -|5+App|H5|微信小程序|支付宝小程序|百度小程序|头条小程序| -|:-:|:-:|:-:|:-:|:-:|:-:| -|√|√|√|√|x|x| +|5+App|H5|微信小程序|支付宝小程序|百度小程序|头条小程序|QQ小程序| +|:-:|:-:|:-:|:-:|:-:|:-:|:-:| +|√|√|√|√|x|x|√| -隐藏已经显示的软键盘,如果软键盘没有显示则不做任何操作。 + +#### uni.onKeyboardHeightChange(CALLBACK) + +监听键盘高度变化 + +**平台差异说明** + +|5+App|H5|微信小程序|支付宝小程序|百度小程序|头条小程序|QQ小程序| +|:-:|:-:|:-:|:-:|:-:|:-:|:-:| +|HBuilderX 2.2.2+|x|基础库2.7+|x|x|x|√| + +**CALLBACK 返回参数** + +|参数|类型|说明| +|:-|:-|:-| +|height|Number|键盘高度| + +**示例代码** + +```js +uni.onKeyboardHeightChange(res => { + console.log(res.height) +}) +``` -- GitLab