Skip to content

Commit

Permalink
修复config.theme内存被覆盖问题
Browse files Browse the repository at this point in the history
默认配置config.theme为light、dark,修改为相反的模式后,刷新1次,内存被覆盖,刷新2次后,配置已恢复默认配置的config.theme
  • Loading branch information
qywk99 committed Mar 13, 2023
1 parent 0831d85 commit c3a14d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mp-cu/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,8 @@ export default class ColorUI {
setStatusStyle(wx.getSystemInfoSync().theme === 'light' ? 'dark' : 'light')
})
} else {
wx.setStorageSync('sys_theme', this.config.theme)
setStatusStyle(this.config.theme === 'light' ? 'dark' : 'light');
wx.setStorageSync('sys_theme', store.state.sys_theme)
setStatusStyle(store.state.sys_theme === 'light' ? 'dark' : 'light');
}
const originPage = Page
const originComponent = Component;
Expand Down

0 comments on commit c3a14d7

Please sign in to comment.