10 lines
258 B
Plaintext
10 lines
258 B
Plaintext
type cacelCall = () => void;
|
|
export const keyboardHeightChange = (callback : (h : number) => void) : cacelCall => {
|
|
const fun = (result) => {
|
|
callback(result.height)
|
|
}
|
|
wx.onKeyboardHeightChange(fun)
|
|
return () => {
|
|
wx.offKeyboardHeightChange(fun)
|
|
}
|
|
} |