cosey 0.9.2 → 0.9.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,11 +2,11 @@ export * from './table-action.api';
2
2
  declare const _TableAction: {
3
3
  new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
4
4
  actions: {
5
- type: import("vue").PropType<(boolean | import("./item.api").TableActionItemProps | null | undefined)[] | (boolean | import("./item.api").TableActionItemProps | null | undefined)[][]>;
5
+ type: import("vue").PropType<(boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[][]>;
6
6
  default: () => never[];
7
7
  };
8
8
  }>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
9
- actions: (boolean | import("./item.api").TableActionItemProps | null | undefined)[] | (boolean | import("./item.api").TableActionItemProps | null | undefined)[][];
9
+ actions: (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[][];
10
10
  }, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
11
11
  P: {};
12
12
  B: {};
@@ -16,22 +16,22 @@ declare const _TableAction: {
16
16
  Defaults: {};
17
17
  }, Readonly<import("vue").ExtractPropTypes<{
18
18
  actions: {
19
- type: import("vue").PropType<(boolean | import("./item.api").TableActionItemProps | null | undefined)[] | (boolean | import("./item.api").TableActionItemProps | null | undefined)[][]>;
19
+ type: import("vue").PropType<(boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[][]>;
20
20
  default: () => never[];
21
21
  };
22
22
  }>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, {
23
- actions: (boolean | import("./item.api").TableActionItemProps | null | undefined)[] | (boolean | import("./item.api").TableActionItemProps | null | undefined)[][];
23
+ actions: (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[][];
24
24
  }>;
25
25
  __isFragment?: never;
26
26
  __isTeleport?: never;
27
27
  __isSuspense?: never;
28
28
  } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
29
29
  actions: {
30
- type: import("vue").PropType<(boolean | import("./item.api").TableActionItemProps | null | undefined)[] | (boolean | import("./item.api").TableActionItemProps | null | undefined)[][]>;
30
+ type: import("vue").PropType<(boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[][]>;
31
31
  default: () => never[];
32
32
  };
33
33
  }>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
34
- actions: (boolean | import("./item.api").TableActionItemProps | null | undefined)[] | (boolean | import("./item.api").TableActionItemProps | null | undefined)[][];
34
+ actions: (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | (boolean | import("./item.api").TableActionItemProps | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[][];
35
35
  }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & import("vue").Plugin;
36
36
  export { _TableAction as TableAction };
37
37
  export default _TableAction;
@@ -1,6 +1,6 @@
1
1
  import { type ExtractPropTypes, type PropType } from 'vue';
2
2
  import { type TableActionItemProps } from './item.api';
3
- type TableActionItemAtom = TableActionItemProps | null | undefined | boolean;
3
+ type TableActionItemAtom = TableActionItemProps | null | undefined | boolean | TableActionItemAtom[];
4
4
  export declare const tableActionProps: {
5
5
  actions: {
6
6
  type: PropType<TableActionItemAtom[] | TableActionItemAtom[][]>;
@@ -1,15 +1,15 @@
1
1
  import { TableActionItemProps } from './item.api';
2
2
  declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
3
3
  actions: {
4
- type: import("vue").PropType<(boolean | TableActionItemProps | null | undefined)[] | (boolean | TableActionItemProps | null | undefined)[][]>;
4
+ type: import("vue").PropType<(boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[][]>;
5
5
  default: () => never[];
6
6
  };
7
7
  }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
8
8
  actions: {
9
- type: import("vue").PropType<(boolean | TableActionItemProps | null | undefined)[] | (boolean | TableActionItemProps | null | undefined)[][]>;
9
+ type: import("vue").PropType<(boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[][]>;
10
10
  default: () => never[];
11
11
  };
12
12
  }>> & Readonly<{}>, {
13
- actions: (boolean | TableActionItemProps | null | undefined)[] | (boolean | TableActionItemProps | null | undefined)[][];
13
+ actions: (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | (boolean | TableActionItemProps | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[][];
14
14
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
15
15
  export default _default;
package/config/index.d.ts CHANGED
@@ -47,6 +47,7 @@ export interface LayoutSlots {
47
47
  afterToggle?: () => VNodeChild;
48
48
  }
49
49
  type FilterRouteHandler = (route: RouteRecordRaw) => RouteRecordRaw | void | boolean | undefined | null;
50
+ type DefineAuthorityHandler = (userInfo: Record<any, any>) => void | Promise<void>;
50
51
  export type CoseyOptions = {
51
52
  router?: CoseyRouterOptions & RouterConfig;
52
53
  persist?: PersistConfig;
@@ -57,7 +58,9 @@ export type CoseyOptions = {
57
58
  filterRoute?: {
58
59
  hook: () => FilterRouteHandler;
59
60
  } | FilterRouteHandler;
60
- defineAuthority?: (userInfo: Record<any, any>) => void | Promise<void>;
61
+ defineAuthority?: {
62
+ hook: () => DefineAuthorityHandler;
63
+ } | DefineAuthorityHandler;
61
64
  components?: LayoutComponents;
62
65
  slots?: LayoutSlots;
63
66
  };
@@ -68,7 +71,7 @@ export interface GlobalConfig {
68
71
  site: RequiredSiteConfig;
69
72
  api: RequiredApiConfig;
70
73
  filterRoute: NonNullable<CoseyOptions['filterRoute']>;
71
- defineAuthority?: CoseyOptions['defineAuthority'];
74
+ defineAuthority: NonNullable<CoseyOptions['defineAuthority']>;
72
75
  components: NonNullable<CoseyOptions['components']>;
73
76
  slots: NonNullable<CoseyOptions['slots']>;
74
77
  }
package/config/index.js CHANGED
@@ -18,7 +18,7 @@ function provideGlobalConfig(app, options) {
18
18
  site = {},
19
19
  api = {},
20
20
  filterRoute = () => true,
21
- defineAuthority,
21
+ defineAuthority = () => void 0,
22
22
  components = {},
23
23
  slots = {}
24
24
  } = options;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cosey",
3
- "version": "0.9.2",
3
+ "version": "0.9.4",
4
4
  "description": "基于 Vue3 + vite 的后台管理系统框架",
5
5
  "type": "module",
6
6
  "main": "index.js",
package/store/user.d.ts CHANGED
@@ -12,7 +12,7 @@ export declare const useUserStore: import("pinia").StoreDefinition<"cosey-user",
12
12
  login: (data: any) => Promise<void>;
13
13
  getUserInfo: () => Promise<UserInfo | undefined>;
14
14
  changePassword: (data: any) => Promise<void>;
15
- setAuthorization: () => Promise<void | undefined>;
15
+ setAuthorization: () => Promise<void>;
16
16
  addDynamicRoutes: () => Promise<void>;
17
17
  logout: (lastPath?: string) => Promise<void>;
18
18
  }, "dynamicRoutes" | "userInfo" | "requestedUserInfo">, Pick<{
@@ -22,7 +22,7 @@ export declare const useUserStore: import("pinia").StoreDefinition<"cosey-user",
22
22
  login: (data: any) => Promise<void>;
23
23
  getUserInfo: () => Promise<UserInfo | undefined>;
24
24
  changePassword: (data: any) => Promise<void>;
25
- setAuthorization: () => Promise<void | undefined>;
25
+ setAuthorization: () => Promise<void>;
26
26
  addDynamicRoutes: () => Promise<void>;
27
27
  logout: (lastPath?: string) => Promise<void>;
28
28
  }, never>, Pick<{
@@ -32,7 +32,7 @@ export declare const useUserStore: import("pinia").StoreDefinition<"cosey-user",
32
32
  login: (data: any) => Promise<void>;
33
33
  getUserInfo: () => Promise<UserInfo | undefined>;
34
34
  changePassword: (data: any) => Promise<void>;
35
- setAuthorization: () => Promise<void | undefined>;
35
+ setAuthorization: () => Promise<void>;
36
36
  addDynamicRoutes: () => Promise<void>;
37
37
  logout: (lastPath?: string) => Promise<void>;
38
38
  }, "changePassword" | "login" | "logout" | "getUserInfo" | "setAuthorization" | "addDynamicRoutes">>;
package/store/user.js CHANGED
@@ -20,6 +20,7 @@ const useUserStore = defineStore("cosey-user", () => {
20
20
  defineAuthority
21
21
  } = useGlobalConfig() || {};
22
22
  const filterRouteHandler = isFunction(filterRoute) ? filterRoute : filterRoute.hook();
23
+ const defineAuthorityHandler = isFunction(defineAuthority) ? defineAuthority : defineAuthority.hook();
23
24
  if (!apiConfig?.login) {
24
25
  warningOnce(!!apiConfig?.login, 'The "login" api is required.');
25
26
  }
@@ -57,7 +58,7 @@ const useUserStore = defineStore("cosey-user", () => {
57
58
  });
58
59
  };
59
60
  const setAuthorization = async () => {
60
- return defineAuthority?.(userInfo.value);
61
+ return defineAuthorityHandler(userInfo.value);
61
62
  };
62
63
  const mapRoute = (routes) => {
63
64
  return routes.map((route2) => {