Keyboard shortcuts

Press ← or → to navigate between chapters

Press ? to show this help

Press Esc to hide this help

mc.onThemeChange(Function callback)

监听系统主题改变事件。

参数

参数类型默认值必填说明
callbackFunction是系统主题改变事件的回调函数

callback(Object object) 回调参数

属性类型说明
themeString系统当前的主题,取值为light或dark

示例代码:

mc.onThemeChange(function(res){
    console.log(res.theme);
});