feat(docs): 自适应系统暗色主题+持久化

This commit is contained in:
sight
2022-04-03 02:56:07 +08:00
parent 34f2c9d992
commit 4ada2ac9b5
2 changed files with 8 additions and 1 deletions

View File

@@ -60,8 +60,10 @@ const changeTheme = (theme: string) => {
disableStyleSheetsProxy: false,
}
);
localStorage.setItem('layui-vue-theme-dark','true')
} else {
disableDarkMode();
localStorage.setItem('layui-vue-theme-dark','false')
}
};