refactor: 代码优化和注释完善

Former-commit-id: b68eb53030dd468534d49e64ea5f6c3bb834f1f8
This commit is contained in:
haoxr
2023-03-26 18:36:00 +08:00
parent fd20366f7b
commit f27a84adf2
5 changed files with 22 additions and 34 deletions

View File

@@ -29,6 +29,9 @@ const themeColors = ref<string[]>([
'#f5222d'
]);
/**
* 切换主题颜色
*/
function changeThemeColor(color: string) {
document.documentElement.style.setProperty('--el-color-primary', color);
settingsStore.changeSetting({ key: 'layout', value: color });