onKeyboardWillHide(listener: Function)

版本要求:
BaseKit≥3.6.6@ray-js/ray≥1.5.30
支持平台:
iOSAndroid
import { onKeyboardWillHide } from '@ray-js/ray';

// Promise 调用
try {
  const res = await onKeyboardWillHide({ ...params });
  console.log(res);
} catch (err) {
  console.log(err.errorMsg);
}

描述

键盘消息

参数

参数类型必填说明
是

返回值

无

示例代码

import { onKeyboardWillHide, scanCode } from '@ray-js/ray'

// 注册键盘收起事件 + 用 scanCode 的键盘输入模式拉起再收起系统键盘。
// scanCode 传 isShowKeyboard:true 进入键盘输入页后键盘自动弹出,点返回/取消退出输入页即收起键盘,触发 onKeyboardWillHide。
onKeyboardWillHide(e => {
  console.log("[onKeyboardWillHide]", e);
});

scanCode({
  onlyFromCamera: false,
  isShowKeyboard: true,
  keyboardBean: { title: "键盘输入" },
  success: data => {
    console.log(data);
  },
  fail: error => {
    console.error(error);
  },
});