morghulis 1.0.18 → 1.0.19

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/types/index.d.ts +14 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "morghulis",
3
- "version": "1.0.18",
3
+ "version": "1.0.19",
4
4
  "description": "基于Vue 3和TypeScript的数据库便捷搭建UI组件库",
5
5
  "main": "dist/morghulis.umd.js",
6
6
  "module": "dist/morghulis.es.js",
package/types/index.d.ts CHANGED
@@ -51,8 +51,18 @@ export interface MorDialogConfig {
51
51
  export interface MorOption {
52
52
  [key: string]: any
53
53
  }
54
+ // 定义useMorghulisAuthorize函数的返回类型
55
+ export interface MorghulisAuthorize {
56
+ $client: string;
57
+ user: () => any;
58
+ check: (uid?: any) => boolean;
59
+ login: (uid: any) => void;
60
+ logout: () => void;
61
+ bearer: () => string | null;
62
+ }
54
63
 
55
- export { MorDialogProps, MorOption };
64
+ // 导出接口
65
+ export { MorDialogProps, MorOption, MorghulisAuthorize };
56
66
 
57
67
  export declare function createMorghulis(options?: MorOption): {
58
68
  install: (Vue: App) => void;
@@ -113,6 +123,9 @@ export declare const MDialog: DefineComponent<
113
123
  close: () => void;
114
124
  };
115
125
 
126
+ // 声明useMorghulisAuthorize函数
127
+ export declare function useMorghulisAuthorize(): MorghulisAuthorize;
128
+
116
129
  // 声明全局组件类型
117
130
  declare module '@vue/runtime-core' {
118
131
  export interface GlobalComponents {