添加修改主机配置页面.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { defineStore } from 'pinia';
|
||||
import { CacheState } from './types';
|
||||
|
||||
export type CacheType = 'menus' | 'roles' | 'tags' | 'hostKeys'
|
||||
export type CacheType = 'menus' | 'roles' | 'tags' | 'hostKeys' | 'hostIdentities'
|
||||
|
||||
const useCacheStore = defineStore('cache', {
|
||||
state: (): CacheState => ({
|
||||
@@ -9,6 +9,7 @@ const useCacheStore = defineStore('cache', {
|
||||
roles: [],
|
||||
tags: [],
|
||||
hostKeys: [],
|
||||
hostIdentities: [],
|
||||
}),
|
||||
|
||||
getters: {},
|
||||
|
||||
@@ -2,12 +2,14 @@ import { MenuQueryResponse } from '@/api/system/menu';
|
||||
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';
|
||||
|
||||
export interface CacheState {
|
||||
menus: MenuQueryResponse[];
|
||||
roles: RoleQueryResponse[];
|
||||
tags: TagQueryResponse[];
|
||||
hostKeys: HostKeyQueryResponse[];
|
||||
hostIdentities: HostIdentityQueryResponse[];
|
||||
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
@@ -70,6 +70,7 @@ const useUserStore = defineStore('user', {
|
||||
async logout() {
|
||||
try {
|
||||
await userLogout();
|
||||
} catch (e) {
|
||||
} finally {
|
||||
// 登出回调
|
||||
this.logoutCallBack();
|
||||
|
||||
Reference in New Issue
Block a user