提交 ad024491 编写于 作者: D DCloud_LXH

feat: uni.offThemeChange

上级 44383306
......@@ -139,6 +139,7 @@ const device = [
'checkIsSoterEnrolledInDevice',
'startSoterAuthentication',
'onThemeChange',
'offThemeChange',
'onUIStyleChange',
'getSystemSetting',
'getAppAuthorizeSetting',
......
......@@ -23,6 +23,16 @@ export function onThemeChange (callbackId) {
callbacks.push(callbackId)
}
export function offThemeChange (callbackId) {
// 暂不支持移除所有监听
if (callbackId) {
const index = callbacks.indexOf(callbackId)
if (index >= 0) {
callbacks.splice(index, 1)
}
}
}
// 旧版本 API,后期文档更新后考虑移除
onMethod('onUIStyleChange', function (res) {
oldCallbacks.forEach(callbackId => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册