修改前端导入规范.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import type { AppState } from './types';
|
||||
import { defineStore } from 'pinia';
|
||||
import { AppState } from './types';
|
||||
|
||||
const defaultConfig: AppState = {
|
||||
// 应用设置
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { CacheState } from './types';
|
||||
import { defineStore } from 'pinia';
|
||||
import { CacheState } from './types';
|
||||
|
||||
export type CacheType = 'menus' | 'roles' | 'hostTags' | 'hostKeys' | 'hostIdentities' | 'dictKeys' | string
|
||||
|
||||
|
||||
12
orion-ops-ui/src/store/modules/cache/types.ts
vendored
12
orion-ops-ui/src/store/modules/cache/types.ts
vendored
@@ -1,9 +1,9 @@
|
||||
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';
|
||||
import { DictKeyQueryResponse } from '@/api/system/dict-key';
|
||||
import type { MenuQueryResponse } from '@/api/system/menu';
|
||||
import type { RoleQueryResponse } from '@/api/user/role';
|
||||
import type { TagQueryResponse } from '@/api/meta/tag';
|
||||
import type { HostKeyQueryResponse } from '@/api/asset/host-key';
|
||||
import type { HostIdentityQueryResponse } from '@/api/asset/host-identity';
|
||||
import type { DictKeyQueryResponse } from '@/api/system/dict-key';
|
||||
|
||||
export interface CacheState {
|
||||
menus: MenuQueryResponse[];
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import type { RouteRecordNormalized } from 'vue-router';
|
||||
import type { MenuState } from './types';
|
||||
import { defineStore } from 'pinia';
|
||||
import { Notification } from '@arco-design/web-vue';
|
||||
import type { RouteRecordNormalized } from 'vue-router';
|
||||
import { getMenuList } from '@/api/user/auth';
|
||||
import { MenuState } from './types';
|
||||
import router from '@/router';
|
||||
|
||||
export default defineStore('menu', {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { TabBarState, TagProps } from './types';
|
||||
import { defineStore } from 'pinia';
|
||||
import { DEFAULT_ROUTE_NAME, DEFAULT_TAB } from '@/router/constants';
|
||||
import { isString } from '@/utils/is';
|
||||
import { TabBarState, TagProps } from './types';
|
||||
|
||||
export default defineStore('tabBar', {
|
||||
state: (): TabBarState => ({
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { TipsState } from './types';
|
||||
import { defineStore } from 'pinia';
|
||||
import { TipsState } from './types';
|
||||
import { setTipsTipped } from '@/api/user/tips';
|
||||
|
||||
export default defineStore('tips', {
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import type { UserState } from './types';
|
||||
import type { LoginRequest } from '@/api/user/auth';
|
||||
import { defineStore } from 'pinia';
|
||||
import { getUserPermission, login as userLogin, LoginRequest, logout as userLogout } from '@/api/user/auth';
|
||||
import { getUserPermission, login as userLogin, logout as userLogout } from '@/api/user/auth';
|
||||
import { clearToken, setToken } from '@/utils/auth';
|
||||
import { md5 } from '@/utils';
|
||||
import { removeRouteListener } from '@/utils/route-listener';
|
||||
import { UserState } from './types';
|
||||
import { useAppStore, useMenuStore, useTabBarStore, useTipsStore } from '@/store';
|
||||
|
||||
export default defineStore('user', {
|
||||
|
||||
Reference in New Issue
Block a user