morghulis 2.0.65 → 2.0.67
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/README.md +443 -57
- package/dist/morghulis.es.js +2732 -80
- package/dist/morghulis.es.js.map +1 -0
- package/dist/morghulis.umd.js +11 -1
- package/dist/morghulis.umd.js.map +1 -0
- package/dist/style.css +4 -0
- package/package.json +34 -42
- package/types/index.d.ts +151 -4
- package/dist/components/MButton.vue.d.ts +0 -47
- package/dist/components/MButton.vue.d.ts.map +0 -47
- package/dist/components/index.d.ts +0 -22
- package/dist/components/index.d.ts.map +0 -1
- package/dist/favicon.ico +0 -0
- package/dist/index.d.ts +0 -46
- package/dist/index.d.ts.map +0 -1
- package/dist/morghulis.css +0 -1
- package/types/MButton.d.ts +0 -114
- package/vetur/attributes.json +0 -36
- package/vetur/tags.json +0 -6
- package/web-types.json +0 -124
package/package.json
CHANGED
@@ -1,61 +1,53 @@
|
|
1
1
|
{
|
2
2
|
"name": "morghulis",
|
3
|
-
"version": "2.0.
|
4
|
-
"
|
5
|
-
"description": "A Material Design inspired button for Vue 3",
|
6
|
-
"keywords": [
|
7
|
-
"vue",
|
8
|
-
"button",
|
9
|
-
"material design",
|
10
|
-
"component",
|
11
|
-
"vue3"
|
12
|
-
],
|
13
|
-
"author": "jm",
|
14
|
-
"license": "MIT",
|
15
|
-
"repository": {
|
16
|
-
"type": "git",
|
17
|
-
"url": "git+https://github.com/username/morghulis.git"
|
18
|
-
},
|
19
|
-
"bugs": {
|
20
|
-
"url": "https://github.com/username/morghulis/issues"
|
21
|
-
},
|
22
|
-
"homepage": "https://github.com/username/morghulis#readme",
|
3
|
+
"version": "2.0.67",
|
4
|
+
"description": "基于Vue 3和TypeScript的数据库便捷搭建UI组件库",
|
23
5
|
"main": "dist/morghulis.umd.js",
|
24
6
|
"module": "dist/morghulis.es.js",
|
25
|
-
"
|
26
|
-
"typings": "types/index.d.ts",
|
27
|
-
"exports": {
|
28
|
-
".": {
|
29
|
-
"types": "./types/index.d.ts",
|
30
|
-
"import": "./dist/morghulis.es.js",
|
31
|
-
"require": "./dist/morghulis.umd.js"
|
32
|
-
},
|
33
|
-
"./styles": "./dist/morghulis.css"
|
34
|
-
},
|
7
|
+
"style": "dist/style.css",
|
35
8
|
"files": [
|
36
9
|
"dist",
|
37
|
-
"
|
38
|
-
"
|
39
|
-
"vetur"
|
10
|
+
"README.md",
|
11
|
+
"types"
|
40
12
|
],
|
41
|
-
"sideEffects": false,
|
42
13
|
"scripts": {
|
43
14
|
"dev": "vite",
|
44
15
|
"build": "vite build",
|
45
|
-
"
|
46
|
-
"preview": "vite preview",
|
47
|
-
"prepublishOnly": "npm run build-lib"
|
16
|
+
"preview": "vite preview"
|
48
17
|
},
|
49
18
|
"dependencies": {
|
50
|
-
"
|
19
|
+
"@fortawesome/fontawesome-svg-core": "^6.4.0",
|
20
|
+
"@fortawesome/free-solid-svg-icons": "^6.4.0",
|
21
|
+
"@fortawesome/vue-fontawesome": "^3.0.3",
|
22
|
+
"axios": "^1.8.4",
|
23
|
+
"element-plus": "^2.3.0",
|
24
|
+
"font-awesome": "^4.7.0",
|
25
|
+
"js-cookie": "^3.0.5",
|
26
|
+
"lodash": "^4.17.21",
|
27
|
+
"nanoid": "^5.0.6",
|
28
|
+
"nprogress": "^0.2.0",
|
29
|
+
"sortablejs": "^1.15.6",
|
30
|
+
"vue": "^3.3.0"
|
51
31
|
},
|
52
32
|
"devDependencies": {
|
33
|
+
"@types/lodash": "^4.14.195",
|
53
34
|
"@types/node": "^20.3.1",
|
35
|
+
"@types/sortablejs": "^1.15.8",
|
54
36
|
"@vitejs/plugin-vue": "^4.2.3",
|
55
|
-
"typescript": "^5.
|
37
|
+
"typescript": "^5.8.2",
|
56
38
|
"vite": "^4.3.9",
|
57
|
-
"
|
58
|
-
|
39
|
+
"vue-tsc": "^1.8.27"
|
40
|
+
},
|
41
|
+
"peerDependencies": {
|
42
|
+
"vue": "^3.3.0"
|
59
43
|
},
|
60
|
-
"
|
44
|
+
"types": "types/index.d.ts",
|
45
|
+
"keywords": [
|
46
|
+
"vue",
|
47
|
+
"typescript",
|
48
|
+
"ui",
|
49
|
+
"components"
|
50
|
+
],
|
51
|
+
"author": "",
|
52
|
+
"license": "MIT"
|
61
53
|
}
|
package/types/index.d.ts
CHANGED
@@ -1,5 +1,152 @@
|
|
1
|
-
|
1
|
+
import { App } from 'vue';
|
2
|
+
import type { ElDialog, ElButton, ElText, ElDivider, ElSpace } from 'element-plus';
|
2
3
|
|
3
|
-
//
|
4
|
-
import {
|
5
|
-
|
4
|
+
// 导入Vue组件实例类型
|
5
|
+
import type { DefineComponent, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, EmitsOptions } from 'vue';
|
6
|
+
|
7
|
+
// 直接在类型定义文件中定义MorDialogProps,避免相对路径引用
|
8
|
+
export interface MorDialogProps {
|
9
|
+
modelValue?: boolean,
|
10
|
+
title?: string,
|
11
|
+
subTitle?: string,
|
12
|
+
width?: string | number,
|
13
|
+
fullscreen?: boolean,
|
14
|
+
top?: string,
|
15
|
+
modal?: boolean,
|
16
|
+
modalClass?: string,
|
17
|
+
headerClass?: string,
|
18
|
+
bodyClass?: string,
|
19
|
+
footerClass?: string,
|
20
|
+
appendToBody?: boolean,
|
21
|
+
appendTo?: string,
|
22
|
+
lockScroll?: boolean,
|
23
|
+
openDelay?: number,
|
24
|
+
closeDelay?: number,
|
25
|
+
closeOnClickModal?: boolean,
|
26
|
+
closeOnPressEscape?: boolean,
|
27
|
+
showClose?: boolean,
|
28
|
+
beforeClose?: (done: () => void) => void,
|
29
|
+
draggable?: boolean,
|
30
|
+
overFlow?: boolean,
|
31
|
+
center?: boolean,
|
32
|
+
alignCenter?: boolean,
|
33
|
+
destroyOnClose?: boolean,
|
34
|
+
closeIcon?: string,
|
35
|
+
zIndex?: number,
|
36
|
+
headerAriaLevel?: string,
|
37
|
+
confirm?: (data: any, done: () => void) => void,
|
38
|
+
cancel?: (data: any, done: () => void) => void,
|
39
|
+
confirmButtonText?: string,
|
40
|
+
cancelButtonText?: string,
|
41
|
+
data?: any
|
42
|
+
};
|
43
|
+
|
44
|
+
// 定义MorDialogConfig接口
|
45
|
+
export interface MorDialogConfig {
|
46
|
+
title: string,
|
47
|
+
subTitle: string
|
48
|
+
}
|
49
|
+
|
50
|
+
// 定义MorOption接口
|
51
|
+
export interface MorOption {
|
52
|
+
[key: string]: any
|
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
|
+
}
|
63
|
+
|
64
|
+
// 导出接口
|
65
|
+
export { MorDialogProps, MorOption, MorghulisAuthorize };
|
66
|
+
|
67
|
+
export declare function createMorghulis(options?: MorOption): {
|
68
|
+
install: (Vue: App) => void;
|
69
|
+
};
|
70
|
+
|
71
|
+
// 导出MDialog组件
|
72
|
+
export declare const MDialog: DefineComponent<
|
73
|
+
MorDialogProps,
|
74
|
+
{},
|
75
|
+
{},
|
76
|
+
{},
|
77
|
+
{},
|
78
|
+
ComponentOptionsMixin,
|
79
|
+
ComponentOptionsMixin,
|
80
|
+
{
|
81
|
+
'update:modelValue': (value: boolean) => true;
|
82
|
+
'close': () => true;
|
83
|
+
'update:title': (value: string) => true;
|
84
|
+
'update:subTitle': (value: string) => true;
|
85
|
+
},
|
86
|
+
string,
|
87
|
+
VNodeProps & AllowedComponentProps & ComponentCustomProps,
|
88
|
+
Readonly<MorDialogProps> & {
|
89
|
+
onClose?: () => any;
|
90
|
+
'onUpdate:modelValue'?: (value: boolean) => any;
|
91
|
+
'onUpdate:title'?: (value: string) => any;
|
92
|
+
'onUpdate:subTitle'?: (value: string) => any;
|
93
|
+
},
|
94
|
+
{
|
95
|
+
title: string;
|
96
|
+
width: string | number;
|
97
|
+
fullscreen: boolean;
|
98
|
+
top: string;
|
99
|
+
modal: boolean;
|
100
|
+
modalClass: string;
|
101
|
+
headerClass: string;
|
102
|
+
bodyClass: string;
|
103
|
+
footerClass: string;
|
104
|
+
appendToBody: boolean;
|
105
|
+
appendTo: string;
|
106
|
+
lockScroll: boolean;
|
107
|
+
openDelay: number;
|
108
|
+
closeDelay: number;
|
109
|
+
closeOnClickModal: boolean;
|
110
|
+
closeOnPressEscape: boolean;
|
111
|
+
showClose: boolean;
|
112
|
+
draggable: boolean;
|
113
|
+
overFlow: boolean;
|
114
|
+
center: boolean;
|
115
|
+
alignCenter: boolean;
|
116
|
+
destroyOnClose: boolean;
|
117
|
+
closeIcon: string;
|
118
|
+
confirmButtonText: string;
|
119
|
+
cancelButtonText: string;
|
120
|
+
}
|
121
|
+
> & {
|
122
|
+
open: (data?: any, config?: MorDialogConfig) => void;
|
123
|
+
close: () => void;
|
124
|
+
};
|
125
|
+
|
126
|
+
// 导出MCell组件
|
127
|
+
export declare const MCell: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<{}>, {}>;
|
128
|
+
|
129
|
+
// 导出数据表格相关组件
|
130
|
+
export declare const DTable: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<{}>, {}>;
|
131
|
+
export declare const DForm: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<{}>, {}>;
|
132
|
+
export declare const DCell: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<{}>, {}>;
|
133
|
+
export declare const DController: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<{}>, {}>;
|
134
|
+
|
135
|
+
// 声明useMorghulisAuthorize函数
|
136
|
+
export declare function useMorghulisAuthorize(): MorghulisAuthorize;
|
137
|
+
|
138
|
+
// 声明全局组件类型
|
139
|
+
declare module '@vue/runtime-core' {
|
140
|
+
export interface GlobalComponents {
|
141
|
+
// Morghulis组件
|
142
|
+
MDialog: typeof MDialog;
|
143
|
+
|
144
|
+
// Element Plus组件
|
145
|
+
ElButton: typeof ElButton;
|
146
|
+
ElDialog: typeof ElDialog;
|
147
|
+
ElText: typeof ElText;
|
148
|
+
ElDivider: typeof ElDivider;
|
149
|
+
ElSpace: typeof ElSpace;
|
150
|
+
// 可以根据需要添加更多Element Plus组件
|
151
|
+
}
|
152
|
+
}
|
@@ -1,47 +0,0 @@
|
|
1
|
-
import { DefineComponent, ComponentOptionsMixin, ComponentPropsOptions, EmitsOptions } from 'vue';
|
2
|
-
import { ButtonProps, ButtonEmits, ButtonExpose } from './MButton';
|
3
|
-
|
4
|
-
declare type Props = {
|
5
|
-
/**
|
6
|
-
* 按钮颜色
|
7
|
-
*/
|
8
|
-
color?: 'primary' | 'success' | 'warning' | 'danger' | 'info';
|
9
|
-
/**
|
10
|
-
* 是否为圆角按钮
|
11
|
-
*/
|
12
|
-
round?: boolean;
|
13
|
-
/**
|
14
|
-
* 按钮尺寸
|
15
|
-
*/
|
16
|
-
size?: 'small' | 'medium' | 'large';
|
17
|
-
/**
|
18
|
-
* 是否禁用
|
19
|
-
*/
|
20
|
-
disabled?: boolean;
|
21
|
-
/**
|
22
|
-
* 自定义弹窗消息
|
23
|
-
*/
|
24
|
-
popupMessage?: string;
|
25
|
-
};
|
26
|
-
|
27
|
-
declare type Emits = {
|
28
|
-
/**
|
29
|
-
* 点击事件
|
30
|
-
*/
|
31
|
-
(e: 'click', event: MouseEvent): void;
|
32
|
-
/**
|
33
|
-
* 弹窗显示事件
|
34
|
-
*/
|
35
|
-
(e: 'popup', message: string): void;
|
36
|
-
};
|
37
|
-
|
38
|
-
declare type Expose = {
|
39
|
-
/**
|
40
|
-
* 显示弹窗
|
41
|
-
* @param message 弹窗消息
|
42
|
-
*/
|
43
|
-
popup?: (message: string) => string;
|
44
|
-
};
|
45
|
-
|
46
|
-
declare const MButton: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, Emits, string, ButtonProps, Expose>;
|
47
|
-
export default MButton;
|
@@ -1,47 +0,0 @@
|
|
1
|
-
import { DefineComponent, ComponentOptionsMixin, ComponentPropsOptions, EmitsOptions } from 'vue';
|
2
|
-
import { ButtonProps, ButtonEmits, ButtonExpose } from './MButton';
|
3
|
-
|
4
|
-
declare type Props = {
|
5
|
-
/**
|
6
|
-
* 按钮颜色
|
7
|
-
*/
|
8
|
-
color?: 'primary' | 'success' | 'warning' | 'danger' | 'info';
|
9
|
-
/**
|
10
|
-
* 是否为圆角按钮
|
11
|
-
*/
|
12
|
-
round?: boolean;
|
13
|
-
/**
|
14
|
-
* 按钮尺寸
|
15
|
-
*/
|
16
|
-
size?: 'small' | 'medium' | 'large';
|
17
|
-
/**
|
18
|
-
* 是否禁用
|
19
|
-
*/
|
20
|
-
disabled?: boolean;
|
21
|
-
/**
|
22
|
-
* 自定义弹窗消息
|
23
|
-
*/
|
24
|
-
popupMessage?: string;
|
25
|
-
};
|
26
|
-
|
27
|
-
declare type Emits = {
|
28
|
-
/**
|
29
|
-
* 点击事件
|
30
|
-
*/
|
31
|
-
(e: 'click', event: MouseEvent): void;
|
32
|
-
/**
|
33
|
-
* 弹窗显示事件
|
34
|
-
*/
|
35
|
-
(e: 'popup', message: string): void;
|
36
|
-
};
|
37
|
-
|
38
|
-
declare type Expose = {
|
39
|
-
/**
|
40
|
-
* 显示弹窗
|
41
|
-
* @param message 弹窗消息
|
42
|
-
*/
|
43
|
-
popup?: (message: string) => string;
|
44
|
-
};
|
45
|
-
|
46
|
-
declare const MButton: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, Emits, string, ButtonProps, Expose>;
|
47
|
-
export default MButton;
|
@@ -1,22 +0,0 @@
|
|
1
|
-
import { default as MButton } from './MButton.vue';
|
2
|
-
|
3
|
-
export type { ButtonColor, ButtonSize, ButtonProps, ButtonEmits, ButtonExpose } from './MButton.d.ts';
|
4
|
-
/**
|
5
|
-
* 按钮组件
|
6
|
-
*
|
7
|
-
* @component MButton
|
8
|
-
* @property {string} color - 按钮颜色,可选值为 'primary', 'success', 'warning', 'danger', 'info'
|
9
|
-
* @property {boolean} round - 是否为圆角按钮
|
10
|
-
* @property {string} size - 按钮尺寸,可选值为 'small', 'medium', 'large'
|
11
|
-
* @property {boolean} disabled - 是否禁用
|
12
|
-
* @property {string} popupMessage - 自定义弹窗消息
|
13
|
-
* @method {Function} popup - 显示弹窗,参数为弹窗消息
|
14
|
-
*
|
15
|
-
* @example
|
16
|
-
* <MButton>默认按钮</MButton>
|
17
|
-
* <MButton color="success" round>成功按钮</MButton>
|
18
|
-
* <MButton color="warning" size="large">警告按钮</MButton>
|
19
|
-
*/
|
20
|
-
export { MButton };
|
21
|
-
export default MButton;
|
22
|
-
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,eAAe,CAAA;AACnC,YAAY,EACV,WAAW,EACX,UAAU,EACV,WAAW,EACX,WAAW,EACX,YAAY,EACb,MAAM,gBAAgB,CAAA;AAEvB;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,EAAE,OAAO,EAAE,CAAA;AAClB,eAAe,OAAO,CAAA"}
|
package/dist/favicon.ico
DELETED
Binary file
|
package/dist/index.d.ts
DELETED
@@ -1,46 +0,0 @@
|
|
1
|
-
export { MButton } from './components/index';
|
2
|
-
export type { ButtonColor, ButtonSize, ButtonProps, ButtonEmits, ButtonExpose } from './components/index';
|
3
|
-
export interface MButtonProps {
|
4
|
-
/**
|
5
|
-
* 按钮颜色
|
6
|
-
*/
|
7
|
-
color?: 'primary' | 'success' | 'warning' | 'danger' | 'info';
|
8
|
-
/**
|
9
|
-
* 是否为圆角按钮
|
10
|
-
*/
|
11
|
-
round?: boolean;
|
12
|
-
/**
|
13
|
-
* 按钮尺寸
|
14
|
-
*/
|
15
|
-
size?: 'small' | 'medium' | 'large';
|
16
|
-
/**
|
17
|
-
* 是否禁用
|
18
|
-
*/
|
19
|
-
disabled?: boolean;
|
20
|
-
/**
|
21
|
-
* 自定义弹窗消息
|
22
|
-
*/
|
23
|
-
popupMessage?: string;
|
24
|
-
}
|
25
|
-
export interface MButtonEvents {
|
26
|
-
/**
|
27
|
-
* 点击事件
|
28
|
-
*/
|
29
|
-
onClick?: (event: MouseEvent) => void;
|
30
|
-
/**
|
31
|
-
* 弹窗显示事件
|
32
|
-
*/
|
33
|
-
onPopup?: (message: string) => void;
|
34
|
-
}
|
35
|
-
export interface MButtonExpose {
|
36
|
-
/**
|
37
|
-
* 显示弹窗
|
38
|
-
* @param message 弹窗消息
|
39
|
-
*/
|
40
|
-
popup: (message: string) => string;
|
41
|
-
}
|
42
|
-
declare const _default: {
|
43
|
-
MButton: any;
|
44
|
-
};
|
45
|
-
export default _default;
|
46
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAG5C,YAAY,EAEV,WAAW,EAEX,UAAU,EAEV,WAAW,EAEX,WAAW,EAEX,YAAY,EACb,MAAM,oBAAoB,CAAA;AAG3B,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAA;IAC7D;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;IACf;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;IACnC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAA;IACrC;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;CACpC;AAED,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,CAAA;CACnC;;;;AAID,wBAAkC"}
|
package/dist/morghulis.css
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
.m-btn[data-v-51bacf79]{border:none;cursor:pointer;padding:.5em 1.2em;font-size:1em;transition:all .3s;display:inline-block;line-height:1;white-space:nowrap;background:#fff;border:1px solid #dcdfe6;color:#606266;-webkit-appearance:none;text-align:center;box-sizing:border-box;outline:none;margin:0;font-weight:500}.m-btn.round[data-v-51bacf79]{border-radius:20px}.m-btn.primary[data-v-51bacf79]{background-color:#409eff;border-color:#409eff;color:#fff}.m-btn.success[data-v-51bacf79]{background-color:#67c23a;border-color:#67c23a;color:#fff}.m-btn.warning[data-v-51bacf79]{background-color:#e6a23c;border-color:#e6a23c;color:#fff}.m-btn.danger[data-v-51bacf79]{background-color:#f56c6c;border-color:#f56c6c;color:#fff}.m-btn.info[data-v-51bacf79]{background-color:#909399;border-color:#909399;color:#fff}.m-btn.small[data-v-51bacf79]{font-size:.8em;padding:.3em .8em}.m-btn.medium[data-v-51bacf79]{font-size:1em;padding:.5em 1.2em}.m-btn.large[data-v-51bacf79]{font-size:1.2em;padding:.7em 1.6em}.m-btn.disabled[data-v-51bacf79]{opacity:.6;cursor:not-allowed;pointer-events:none}.m-btn[data-v-51bacf79]:hover:not(.disabled){opacity:.8}
|
package/types/MButton.d.ts
DELETED
@@ -1,114 +0,0 @@
|
|
1
|
-
import { DefineComponent, VNode, AllowedComponentProps, ComponentCustomProps } from 'vue'
|
2
|
-
|
3
|
-
/**
|
4
|
-
* 按钮颜色类型
|
5
|
-
* @public
|
6
|
-
*/
|
7
|
-
export type ButtonColor =
|
8
|
-
/** 主要按钮 */
|
9
|
-
'primary' |
|
10
|
-
/** 成功按钮 */
|
11
|
-
'success' |
|
12
|
-
/** 警告按钮 */
|
13
|
-
'warning' |
|
14
|
-
/** 危险按钮 */
|
15
|
-
'danger' |
|
16
|
-
/** 信息按钮 */
|
17
|
-
'info';
|
18
|
-
|
19
|
-
/**
|
20
|
-
* 按钮尺寸类型
|
21
|
-
* @public
|
22
|
-
*/
|
23
|
-
export type ButtonSize =
|
24
|
-
/** 小型按钮 */
|
25
|
-
'small' |
|
26
|
-
/** 中型按钮 */
|
27
|
-
'medium' |
|
28
|
-
/** 大型按钮 */
|
29
|
-
'large';
|
30
|
-
|
31
|
-
/**
|
32
|
-
* 按钮属性
|
33
|
-
* @public
|
34
|
-
*/
|
35
|
-
export interface ButtonProps {
|
36
|
-
/**
|
37
|
-
* 按钮颜色
|
38
|
-
* @default 'primary'
|
39
|
-
*/
|
40
|
-
color?: ButtonColor;
|
41
|
-
|
42
|
-
/**
|
43
|
-
* 是否为圆角按钮
|
44
|
-
* @default false
|
45
|
-
*/
|
46
|
-
round?: boolean;
|
47
|
-
|
48
|
-
/**
|
49
|
-
* 按钮尺寸
|
50
|
-
* @default 'medium'
|
51
|
-
*/
|
52
|
-
size?: ButtonSize;
|
53
|
-
|
54
|
-
/**
|
55
|
-
* 是否禁用
|
56
|
-
* @default false
|
57
|
-
*/
|
58
|
-
disabled?: boolean;
|
59
|
-
|
60
|
-
/**
|
61
|
-
* 自定义弹窗消息
|
62
|
-
* @default '按钮被点击!'
|
63
|
-
*/
|
64
|
-
popupMessage?: string;
|
65
|
-
}
|
66
|
-
|
67
|
-
/**
|
68
|
-
* 按钮暴露的方法
|
69
|
-
* @public
|
70
|
-
*/
|
71
|
-
export interface ButtonExpose {
|
72
|
-
/**
|
73
|
-
* 显示弹窗
|
74
|
-
* @param message - 弹窗消息
|
75
|
-
* @returns 弹窗消息
|
76
|
-
*/
|
77
|
-
popup(message: string): string;
|
78
|
-
}
|
79
|
-
|
80
|
-
/**
|
81
|
-
* 按钮事件
|
82
|
-
* @public
|
83
|
-
*/
|
84
|
-
export interface ButtonEvents {
|
85
|
-
/**
|
86
|
-
* 点击事件
|
87
|
-
* @param e - 鼠标事件对象
|
88
|
-
*/
|
89
|
-
onClick?: (e: MouseEvent) => void;
|
90
|
-
|
91
|
-
/**
|
92
|
-
* 弹窗事件
|
93
|
-
* @param message - 弹窗消息
|
94
|
-
*/
|
95
|
-
onPopup?: (message: string) => void;
|
96
|
-
}
|
97
|
-
|
98
|
-
/**
|
99
|
-
* 按钮组件
|
100
|
-
*
|
101
|
-
* @description 一个简单的按钮组件,具有多种颜色主题、尺寸选项和弹窗功能
|
102
|
-
* @example
|
103
|
-
* ```vue
|
104
|
-
* <MButton>默认按钮</MButton>
|
105
|
-
* <MButton color="success" round>成功按钮</MButton>
|
106
|
-
* <MButton color="warning" size="large">警告按钮</MButton>
|
107
|
-
* <MButton color="danger" disabled>危险按钮</MButton>
|
108
|
-
* <MButton popup-message="自定义消息">弹窗按钮</MButton>
|
109
|
-
* ```
|
110
|
-
*
|
111
|
-
* @see [文档](https://github.com/morghulis/morghulis)
|
112
|
-
* @public
|
113
|
-
*/
|
114
|
-
export declare const MButton: DefineComponent<ButtonProps>;
|
package/vetur/attributes.json
DELETED
@@ -1,36 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"m-button/color": {
|
3
|
-
"type": "string",
|
4
|
-
"description": "按钮颜色,可选值为 'primary', 'success', 'warning', 'danger', 'info'",
|
5
|
-
"options": ["primary", "success", "warning", "danger", "info"],
|
6
|
-
"optionDescriptions": {
|
7
|
-
"primary": "主要按钮",
|
8
|
-
"success": "成功按钮",
|
9
|
-
"warning": "警告按钮",
|
10
|
-
"danger": "危险按钮",
|
11
|
-
"info": "信息按钮"
|
12
|
-
}
|
13
|
-
},
|
14
|
-
"m-button/round": {
|
15
|
-
"type": "boolean",
|
16
|
-
"description": "是否为圆角按钮"
|
17
|
-
},
|
18
|
-
"m-button/size": {
|
19
|
-
"type": "string",
|
20
|
-
"description": "按钮尺寸,可选值为 'small', 'medium', 'large'",
|
21
|
-
"options": ["small", "medium", "large"],
|
22
|
-
"optionDescriptions": {
|
23
|
-
"small": "小型按钮",
|
24
|
-
"medium": "中型按钮",
|
25
|
-
"large": "大型按钮"
|
26
|
-
}
|
27
|
-
},
|
28
|
-
"m-button/disabled": {
|
29
|
-
"type": "boolean",
|
30
|
-
"description": "是否禁用"
|
31
|
-
},
|
32
|
-
"m-button/popup-message": {
|
33
|
-
"type": "string",
|
34
|
-
"description": "自定义弹窗消息"
|
35
|
-
}
|
36
|
-
}
|