@@ -20,12 +21,12 @@ export function onThemeChange (callbackId) {
...
@@ -20,12 +21,12 @@ export function onThemeChange (callbackId) {
// 旧版本 API,后期文档更新后考虑移除
// 旧版本 API,后期文档更新后考虑移除
onMethod('onUIStyleChange',function(res){
onMethod('onUIStyleChange',function(res){
callbacks.forEach(callbackId=>{
oldCallbacks.forEach(callbackId=>{
invoke(callbackId,res)
invoke(callbackId,res)
})
})
})
})
exportfunctiononUIStyleChange(callbackId){
exportfunctiononUIStyleChange(callbackId){
callbacks.push(callbackId)
oldCallbacks.push(callbackId)
console.warn('The "uni.onUIStyleChange" API is deprecated, please use "uni.onThemeChange". Learn more: https://uniapp.dcloud.net.cn/api/system/theme.')
console.warn('The "uni.onUIStyleChange" API is deprecated, please use "uni.onThemeChange". Learn more: https://uniapp.dcloud.net.cn/api/system/theme.')