morghulis 1.0.13 → 1.0.15

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.
package/package.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "name": "morghulis",
3
- "version": "1.0.13",
3
+ "version": "1.0.15",
4
4
  "description": "基于Vue 3和TypeScript的数据库便捷搭建UI组件库",
5
5
  "main": "dist/morghulis.umd.js",
6
6
  "module": "dist/morghulis.es.js",
7
+ "style": "dist/index.css",
7
8
  "files": [
8
9
  "dist",
9
10
  "README.md",
package/types/index.d.ts CHANGED
@@ -1,8 +1,48 @@
1
1
  import { App } from 'vue';
2
- import { MorDialogProps } from '../src/types/dialog.types';
3
- import { MorOption } from '../src/types/io.types';
4
2
  import type { ElDialog, ElButton, ElText, ElDivider, ElSpace } from 'element-plus';
5
3
 
4
+ // 直接在类型定义文件中定义MorDialogProps,避免相对路径引用
5
+ export interface MorDialogProps {
6
+ modelValue?: boolean,
7
+ title?: string,
8
+ subTitle?: string,
9
+ width?: string | number,
10
+ fullscreen?: boolean,
11
+ top?: string,
12
+ modal?: boolean,
13
+ modalClass?: string,
14
+ headerClass?: string,
15
+ bodyClass?: string,
16
+ footerClass?: string,
17
+ appendToBody?: boolean,
18
+ appendTo?: string,
19
+ lockScroll?: boolean,
20
+ openDelay?: number,
21
+ closeDelay?: number,
22
+ closeOnClickModal?: boolean,
23
+ closeOnPressEscape?: boolean,
24
+ showClose?: boolean,
25
+ beforeClose?: Function,
26
+ draggable?: boolean,
27
+ overFlow?: boolean,
28
+ center?: boolean,
29
+ alignCenter?: boolean,
30
+ destroyOnClose?: boolean,
31
+ closeIcon?: string,
32
+ zIndex?: number,
33
+ headerAriaLevel?: string,
34
+ confirm?: Function,
35
+ cancel?: Function,
36
+ confirmButtonText?: string,
37
+ cancelButtonText?: string,
38
+ data?: any
39
+ };
40
+
41
+ // 定义MorOption接口
42
+ export interface MorOption {
43
+ [key: string]: any
44
+ }
45
+
6
46
  export { MorDialogProps, MorOption };
7
47
 
8
48
  export declare function createMorghulis(options?: MorOption): {
@@ -10,13 +50,45 @@ export declare function createMorghulis(options?: MorOption): {
10
50
  };
11
51
 
12
52
  // 导出MDialog组件
13
- export declare const MDialog: typeof import('../src/components/dialog/MDialog.vue')['default'];
53
+ export declare const MDialog: typeof import('../src/components/dialog/MDialog.vue')['default'] & {
54
+ new (): {
55
+ $props: MorDialogProps & {
56
+ modelValue?: boolean;
57
+ };
58
+ $slots: {
59
+ default: (props: { data: any }) => any;
60
+ title: (props: { data: any }) => any;
61
+ 'sub-title': (props: { data: any }) => any;
62
+ header: (props: { data: any }) => any;
63
+ footer: (props: { data: any }) => any;
64
+ };
65
+ $emit: (event: 'update:modelValue' | 'close' | 'update:title' | 'update:subTitle', value: any) => void;
66
+ open: (data?: any, config?: { title: string, subTitle: string }) => void;
67
+ close: () => void;
68
+ };
69
+ };
14
70
 
15
71
  // 声明全局组件类型
16
72
  declare module '@vue/runtime-core' {
17
73
  export interface GlobalComponents {
18
74
  // Morghulis组件
19
- MDialog: typeof import('../src/components/dialog/MDialog.vue')['default'];
75
+ MDialog: {
76
+ new (): {
77
+ $props: MorDialogProps & {
78
+ modelValue?: boolean;
79
+ };
80
+ $slots: {
81
+ default: (props: { data: any }) => any;
82
+ title: (props: { data: any }) => any;
83
+ 'sub-title': (props: { data: any }) => any;
84
+ header: (props: { data: any }) => any;
85
+ footer: (props: { data: any }) => any;
86
+ };
87
+ $emit: (event: 'update:modelValue' | 'close' | 'update:title' | 'update:subTitle', value: any) => void;
88
+ open: (data?: any, config?: { title: string, subTitle: string }) => void;
89
+ close: () => void;
90
+ };
91
+ };
20
92
 
21
93
  // Element Plus组件
22
94
  ElButton: typeof ElButton;