Keyboard shortcuts

Press ← or → to navigate between chapters

Press ? to show this help

Press Esc to hide this help

mc.offWindowResize(Function callback)

取消监听窗口尺寸变化事件

参数

参数类型默认值必填说明
callbackFunction是需要取消监听的回调函数

示例代码:

const callback = function(res){
    console.log(res.size.windowWidth, res.size.windowHeight)
}

//监听
mc.onWindowResize(callback)
//取消监听
mc.offWindowResize(callback);