添加主机身份页面.

This commit is contained in:
lijiahang
2023-09-21 13:50:42 +08:00
parent fbc40116f0
commit b13cbd8cca
39 changed files with 444 additions and 649 deletions

View File

@@ -1,13 +1,14 @@
import { defineStore } from 'pinia';
import { CacheState } from './types';
export type CacheType = 'menus' | 'roles' | 'tags'
export type CacheType = 'menus' | 'roles' | 'tags' | 'hostKeys'
const useCacheStore = defineStore('cache', {
state: (): CacheState => ({
menus: [],
roles: [],
tags: []
tags: [],
hostKeys: [],
}),
getters: {},

View File

@@ -1,9 +1,13 @@
import { MenuQueryResponse } from '@/api/system/menu';
import { RoleQueryResponse } from '@/api/user/role';
import { TagResponse } from '@/api/meta/tag';
import { TagQueryResponse } from '@/api/meta/tag';
import { HostKeyQueryResponse } from '@/api/asset/host-key';
export interface CacheState {
menus: MenuQueryResponse[];
roles: RoleQueryResponse[];
tags: TagResponse[];
tags: TagQueryResponse[];
hostKeys: HostKeyQueryResponse[];
[key: string]: unknown;
}