diff --git a/src/mixins/UserConfig.ts b/src/mixins/UserConfig.ts index 7094393a..53350ab8 100644 --- a/src/mixins/UserConfig.ts +++ b/src/mixins/UserConfig.ts @@ -16,7 +16,7 @@ export default defineComponent({ name: 'UserConfig', data: () => ({ - config: { ...staticConfig.getDefault() }, + config: { ...staticConfig.getDefault() } as IConfig, }), created() { @@ -38,9 +38,9 @@ export default defineComponent({ utils.bus.emit(eventName, null); }, - updateLocalSetting({ setting, value }) { - if (setting) { - this.config[setting] = value; + updateLocalSetting(val: { setting: keyof IConfig; value: IConfig[keyof IConfig] }) { + if (val?.setting) { + (this.config as any)[val.setting] = val.value; } },