diff --git a/pages/API/theme-change/theme-change.uvue b/pages/API/theme-change/theme-change.uvue index 200b935809750899c41304eb409d77ab6f7f2698..ad243c721ea5a75bf0292b852c2b81808e25d857 100644 --- a/pages/API/theme-change/theme-change.uvue +++ b/pages/API/theme-change/theme-change.uvue @@ -46,13 +46,13 @@ methods: { bindOsThemeChange(): number { //注册osTheme变化监听 - return uni.onOsThemeChange(function(res: OsThemeChangeResult) { + return uni.onOsThemeChange((res: OsThemeChangeResult)=> { this.osTheme = res.osTheme }) }, bindAppThemeChange(): number { //注册appTheme变化监听 - return uni.onAppThemeChange(function(res: AppThemeChangeResult) { + return uni.onAppThemeChange((res: AppThemeChangeResult) => { this.appTheme = res.appTheme }) },