✨ 系统动态设置.
This commit is contained in:
@@ -2,6 +2,8 @@ import type { CacheState, CacheType } from './types';
|
||||
import type { AxiosResponse } from 'axios';
|
||||
import type { TagType } from '@/api/meta/tag';
|
||||
import { getTagList } from '@/api/meta/tag';
|
||||
import type { SystemSettingType } from '@/api/system/setting';
|
||||
import { getSystemSetting } from '@/api/system/setting';
|
||||
import type { HostType } from '@/api/asset/host';
|
||||
import { getHostList } from '@/api/asset/host';
|
||||
import type { PreferenceType } from '@/api/user/preference';
|
||||
@@ -167,5 +169,10 @@ export default defineStore('cache', {
|
||||
return await this.load(`preference_${type}_${item}`, () => getPreference<T>(type, [item]), undefined, force, {});
|
||||
},
|
||||
|
||||
// 加载系统配置
|
||||
async loadSystemSetting<T>(type: SystemSettingType, force = false) {
|
||||
return await this.load(`system_setting_${type}`, () => getSystemSetting<T>(type), undefined, force, {});
|
||||
},
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user