|
|
@ -26,8 +26,9 @@ export const useSettingManagementStore = defineStore({ |
|
|
actions: { |
|
|
actions: { |
|
|
initlize(settingKey: string, api: (...args) => Promise<ListResultDto<SettingGroup>>) { |
|
|
initlize(settingKey: string, api: (...args) => Promise<ListResultDto<SettingGroup>>) { |
|
|
this.settingKey = settingKey; |
|
|
this.settingKey = settingKey; |
|
|
|
|
|
this.settings = ls.get(this.settingKey); |
|
|
if (this.settings.length === 0) { |
|
|
if (this.settings.length === 0) { |
|
|
this.settings = ls.get(this.settingKey) || this.refreshSettings(api); |
|
|
this.refreshSettings(api); |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
refreshSettings(api: (...args) => Promise<ListResultDto<SettingGroup>>) { |
|
|
refreshSettings(api: (...args) => Promise<ListResultDto<SettingGroup>>) { |
|
|
|