morghulis 1.0.12 → 1.0.14
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/dist/morghulis.es.js +42 -38
- package/dist/morghulis.es.js.map +1 -1
- package/dist/morghulis.umd.js +5 -1
- package/dist/morghulis.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +3 -2
- package/types/index.d.ts +71 -3
package/package.json
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
{
|
2
2
|
"name": "morghulis",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.14",
|
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",
|
@@ -34,7 +35,7 @@
|
|
34
35
|
"peerDependencies": {
|
35
36
|
"vue": "^3.3.0"
|
36
37
|
},
|
37
|
-
"types": "
|
38
|
+
"types": "types/index.d.ts",
|
38
39
|
"keywords": [
|
39
40
|
"vue",
|
40
41
|
"typescript",
|
package/types/index.d.ts
CHANGED
@@ -1,6 +1,47 @@
|
|
1
1
|
import { App } from 'vue';
|
2
|
-
import {
|
3
|
-
|
2
|
+
import type { ElDialog, ElButton, ElText, ElDivider, ElSpace } from 'element-plus';
|
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
|
+
}
|
4
45
|
|
5
46
|
export { MorDialogProps, MorOption };
|
6
47
|
|
@@ -8,8 +49,35 @@ export declare function createMorghulis(options?: MorOption): {
|
|
8
49
|
install: (Vue: App) => void;
|
9
50
|
};
|
10
51
|
|
52
|
+
// 导出MDialog组件
|
53
|
+
export declare const MDialog: typeof import('../src/components/dialog/MDialog.vue')['default'];
|
54
|
+
|
55
|
+
// 声明全局组件类型
|
11
56
|
declare module '@vue/runtime-core' {
|
12
57
|
export interface GlobalComponents {
|
13
|
-
|
58
|
+
// Morghulis组件
|
59
|
+
MDialog: {
|
60
|
+
new (): {
|
61
|
+
$props: MorDialogProps & {
|
62
|
+
modelValue?: boolean;
|
63
|
+
};
|
64
|
+
$slots: {
|
65
|
+
default: (props: { data: any }) => any;
|
66
|
+
title: (props: { data: any }) => any;
|
67
|
+
'sub-title': (props: { data: any }) => any;
|
68
|
+
header: (props: { data: any }) => any;
|
69
|
+
footer: (props: { data: any }) => any;
|
70
|
+
};
|
71
|
+
$emit: (event: 'update:modelValue' | 'close' | 'update:title' | 'update:subTitle', value: any) => void;
|
72
|
+
};
|
73
|
+
};
|
74
|
+
|
75
|
+
// Element Plus组件
|
76
|
+
ElButton: typeof ElButton;
|
77
|
+
ElDialog: typeof ElDialog;
|
78
|
+
ElText: typeof ElText;
|
79
|
+
ElDivider: typeof ElDivider;
|
80
|
+
ElSpace: typeof ElSpace;
|
81
|
+
// 可以根据需要添加更多Element Plus组件
|
14
82
|
}
|
15
83
|
}
|