智能照明系统APP-本地串口
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
LightingSystemApp-serial/.svn/pristine/7c/7c3c28abf43558a9da35ff38864...

25 lines
619 B

import {
invoke
} from 'uni-core/service/bridge'
import {
onMethod
} from '../../platform'
const callbacks = []
onMethod('onViewDidResize', res => {
callbacks.forEach(callbackId => {
invoke(callbackId, res)
})
})
export function onWindowResize (callbackId) {
callbacks.push(callbackId)
}
export function offWindowResize (callbackId) {
// TODO 目前 on 和 off 即使传入同一个 function,获取到的 callbackId 也不会一致,导致不能 off 掉指定
// 后续修复
// 此处和微信平台一致查询不到去掉最后一个
callbacks.splice(callbacks.indexOf(callbackId), 1)
}