Skip to content

Commit 77205d8

Browse files
author
davidysxue
committed
fix: darkmode
1 parent e84c782 commit 77205d8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tools/demo/example/icons/icons.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,9 @@ CustomPage({
496496
},
497497
onLoad() {
498498
this.setIconColor(this.data.theme)
499+
500+
const app = getApp()
501+
app.watchThemeChange && app.watchThemeChange(this.setIconColor)
499502
},
500503
setIconColor(theme) {
501504
const color = theme === 'dark' ? colorDark : colorLight

0 commit comments

Comments
 (0)