提交 48157c4f 编写于 作者: 雪洛's avatar 雪洛

fix: 修复onKeyboardHeightChange重复监听的Bug askId: 91818

上级 5d4ec72a
......@@ -6,14 +6,14 @@ import {
onMethod
} from '../../platform'
const callbacks = []
let callback
onMethod('onKeyboardHeightChange', res => {
callbacks.forEach(callbackId => {
invoke(callbackId, res)
})
if (callback) {
invoke(callback, res)
}
})
export function onKeyboardHeightChange (callbackId) {
callbacks.push(callbackId)
callback = callbackId
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册