diff --git a/ui/packages/artalk-sidebar/src/App.vue b/ui/packages/artalk-sidebar/src/App.vue index 6c713c726..035979c5d 100644 --- a/ui/packages/artalk-sidebar/src/App.vue +++ b/ui/packages/artalk-sidebar/src/App.vue @@ -15,7 +15,7 @@ onBeforeMount(() => { // 获取语言 if (!global.getBootParams().locale) { global.getArtalk().ctx.getApi().system.conf().then(resp => { - if (resp.frontend_conf?.locale == 'string') { + if (typeof resp.frontend_conf?.locale === 'string') { i18n.locale.value = resp.frontend_conf.locale } }) diff --git a/ui/packages/artalk-sidebar/src/components/PreferenceItem.vue b/ui/packages/artalk-sidebar/src/components/PreferenceItem.vue index 4805e8032..aefe0e5e4 100644 --- a/ui/packages/artalk-sidebar/src/components/PreferenceItem.vue +++ b/ui/packages/artalk-sidebar/src/components/PreferenceItem.vue @@ -13,7 +13,7 @@ onBeforeMount(() => { }) function onChange() { - const v = patchOptionValue(props.node, props.node) + const v = patchOptionValue(value.value, props.node) settings.get().setCustom(props.node.path, v) console.log('[SET]', props.node.path, v) }