feat: 字典配置前端代码.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { defineStore } from 'pinia';
|
||||
import { CacheState } from './types';
|
||||
|
||||
export type CacheType = 'menus' | 'roles' | 'hostTags' | 'hostKeys' | 'hostIdentities'
|
||||
export type CacheType = 'menus' | 'roles' | 'hostTags' | 'hostKeys' | 'hostIdentities' | 'dictKeys' | string
|
||||
|
||||
export default defineStore('cache', {
|
||||
state: (): CacheState => ({
|
||||
@@ -10,6 +10,7 @@ export default defineStore('cache', {
|
||||
hostTags: [],
|
||||
hostKeys: [],
|
||||
hostIdentities: [],
|
||||
dictKeys: [],
|
||||
}),
|
||||
|
||||
getters: {},
|
||||
|
||||
@@ -3,6 +3,7 @@ import { RoleQueryResponse } from '@/api/user/role';
|
||||
import { TagQueryResponse } from '@/api/meta/tag';
|
||||
import { HostKeyQueryResponse } from '@/api/asset/host-key';
|
||||
import { HostIdentityQueryResponse } from '@/api/asset/host-identity';
|
||||
import { DictKeyQueryResponse } from '@/api/system/dict-key';
|
||||
|
||||
export interface CacheState {
|
||||
menus: MenuQueryResponse[];
|
||||
@@ -10,6 +11,7 @@ export interface CacheState {
|
||||
hostTags: TagQueryResponse[];
|
||||
hostKeys: HostKeyQueryResponse[];
|
||||
hostIdentities: HostIdentityQueryResponse[];
|
||||
dictKeys: DictKeyQueryResponse[];
|
||||
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user