From f4242f8a66eb2be9cf17f9b5fe780d7221f5a6d6 Mon Sep 17 00:00:00 2001 From: bymyself Date: Sat, 24 Aug 2024 13:22:08 -0700 Subject: [PATCH] Explicitly invoke setting.options when it's a function (#616) --- src/components/dialog/content/setting/SettingGroup.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/dialog/content/setting/SettingGroup.vue b/src/components/dialog/content/setting/SettingGroup.vue index 1b693b33e..effbb6a43 100644 --- a/src/components/dialog/content/setting/SettingGroup.vue +++ b/src/components/dialog/content/setting/SettingGroup.vue @@ -68,7 +68,10 @@ function getSettingAttrs(setting: SettingParams) { } switch (setting.type) { case 'combo': - attrs['options'] = setting.options + attrs['options'] = + typeof setting.options === 'function' + ? setting.options(settingStore.get(setting.id)) + : setting.options if (typeof setting.options[0] !== 'string') { attrs['optionLabel'] = 'text' attrs['optionValue'] = 'value'