feat: 快捷设置自动更新

This commit is contained in:
bietiaop 2024-08-20 16:51:20 +08:00
parent d0e73ff00c
commit 108cc5399b
6 changed files with 74 additions and 85 deletions

View file

@ -176,7 +176,11 @@ class Setting {
// 先获取默认配置
const defSet = this.getdefSet(app);
const config = this.getConfig(app);
config[key] = value;
if (value instanceof Object) {
config[key] = { ...config[key], ...value };
} else {
config[key] = value;
}
return this.setYaml(app, 'config', { ...defSet, ...config });
}