mwl-components 0.1.6 → 0.1.8
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 +1191 -57
- package/dist/ContentWarp/index.vue.d.ts +21 -0
- package/dist/ContextMenu/index.d.ts +65 -0
- package/dist/Dialog/index.vue.d.ts +63 -0
- package/dist/EasyButton/index.vue.d.ts +17 -0
- package/dist/EasyContextMenu/index.vue.d.ts +61 -0
- package/dist/EasyForm/index.vue.d.ts +60 -0
- package/dist/EasyFormH/index.vue.d.ts +623 -0
- package/dist/EasyTable/index.vue.d.ts +124 -0
- package/dist/EasyTableH/index.vue.d.ts +114 -0
- package/dist/EasyTableH/tableColumnItem.vue.d.ts +19 -0
- package/dist/MenuTree/components/menuIcon.vue.d.ts +14 -0
- package/dist/MenuTree/components/subMenu.vue.d.ts +18 -0
- package/dist/MenuTree/index.vue.d.ts +44 -0
- package/dist/Pagination/index.vue.d.ts +54 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.es.js +1016 -0
- package/dist/index.umd.js +1 -0
- package/dist/mwl-components.css +1 -0
- package/dist/types/index.d.ts +103 -0
- package/package.json +1 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare function __VLS_template(): {
|
|
2
|
+
attrs: Partial<{}>;
|
|
3
|
+
slots: Readonly<Record<string, any>> & Record<string, any>;
|
|
4
|
+
refs: {};
|
|
5
|
+
rootEl: any;
|
|
6
|
+
};
|
|
7
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
8
|
+
declare const __VLS_component: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
|
|
9
|
+
title: StringConstructor;
|
|
10
|
+
message: StringConstructor;
|
|
11
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
12
|
+
title: StringConstructor;
|
|
13
|
+
message: StringConstructor;
|
|
14
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
15
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
16
|
+
export default _default;
|
|
17
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
18
|
+
new (): {
|
|
19
|
+
$slots: S;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
export type MenuItem = {
|
|
2
|
+
label?: string;
|
|
3
|
+
onClick?: (e: any) => void;
|
|
4
|
+
divider?: boolean;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
};
|
|
7
|
+
export interface MenuOptions {
|
|
8
|
+
target?: HTMLElement;
|
|
9
|
+
menuList: Array<MenuItem>;
|
|
10
|
+
style?: Partial<CSSStyleDeclaration>;
|
|
11
|
+
hoverStyle?: {
|
|
12
|
+
[key: string]: string;
|
|
13
|
+
};
|
|
14
|
+
event?: 'contextmenu' | 'click' | 'dblclick';
|
|
15
|
+
appendToBody?: boolean;
|
|
16
|
+
bindEvent?: boolean;
|
|
17
|
+
classNames?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare class ContextMenu {
|
|
20
|
+
#private;
|
|
21
|
+
vnode: HTMLElement | null;
|
|
22
|
+
defaultStyle: {
|
|
23
|
+
position: string;
|
|
24
|
+
'z-index': number;
|
|
25
|
+
'border-radius': string;
|
|
26
|
+
color: string;
|
|
27
|
+
'font-size': string;
|
|
28
|
+
'min-width': string;
|
|
29
|
+
'box-shadow': string;
|
|
30
|
+
'background-color': string;
|
|
31
|
+
padding: string;
|
|
32
|
+
overflow: string;
|
|
33
|
+
};
|
|
34
|
+
hoverStyle: {
|
|
35
|
+
'background-color': string;
|
|
36
|
+
};
|
|
37
|
+
menu: HTMLElement | null;
|
|
38
|
+
single: boolean;
|
|
39
|
+
private boundHide;
|
|
40
|
+
private boundShow;
|
|
41
|
+
static getInstance(): InstanceType<typeof ContextMenu>;
|
|
42
|
+
/**
|
|
43
|
+
* 这个函数的用途写在这里
|
|
44
|
+
* @param {type} single 是否单例 默认是true
|
|
45
|
+
*/
|
|
46
|
+
constructor(options?: MenuOptions);
|
|
47
|
+
create(options: MenuOptions): InstanceType<typeof ContextMenu>;
|
|
48
|
+
destroy(): void;
|
|
49
|
+
resetContextMenu(): void;
|
|
50
|
+
/**
|
|
51
|
+
* 这个函数的用途写在这里
|
|
52
|
+
* @param {menuList Array<MenuItem> } 右键菜单的列表
|
|
53
|
+
*/
|
|
54
|
+
setMenuList(menuList: Array<MenuItem>): void;
|
|
55
|
+
/**
|
|
56
|
+
* 手动显示右键菜单 需要传入一个事件对象
|
|
57
|
+
*/
|
|
58
|
+
showMenu(e: PointerEvent | MouseEvent): void;
|
|
59
|
+
/**
|
|
60
|
+
* 隐藏右键菜单
|
|
61
|
+
*/
|
|
62
|
+
hideMenu(): void;
|
|
63
|
+
}
|
|
64
|
+
export { ContextMenu as default };
|
|
65
|
+
export declare const contextMenu: ContextMenu;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
declare function __VLS_template(): {
|
|
2
|
+
attrs: Partial<{}>;
|
|
3
|
+
slots: Readonly<Record<string, any>> & Record<string, any>;
|
|
4
|
+
refs: {};
|
|
5
|
+
rootEl: any;
|
|
6
|
+
};
|
|
7
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
8
|
+
declare const __VLS_component: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
|
|
9
|
+
title: {
|
|
10
|
+
type: StringConstructor;
|
|
11
|
+
default: string;
|
|
12
|
+
};
|
|
13
|
+
fullscreen: {
|
|
14
|
+
type: BooleanConstructor;
|
|
15
|
+
default: boolean;
|
|
16
|
+
};
|
|
17
|
+
scroll: {
|
|
18
|
+
type: BooleanConstructor;
|
|
19
|
+
default: boolean;
|
|
20
|
+
};
|
|
21
|
+
width: {
|
|
22
|
+
type: StringConstructor;
|
|
23
|
+
default: string;
|
|
24
|
+
};
|
|
25
|
+
maxHeight: {
|
|
26
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
27
|
+
default: string;
|
|
28
|
+
};
|
|
29
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
30
|
+
title: {
|
|
31
|
+
type: StringConstructor;
|
|
32
|
+
default: string;
|
|
33
|
+
};
|
|
34
|
+
fullscreen: {
|
|
35
|
+
type: BooleanConstructor;
|
|
36
|
+
default: boolean;
|
|
37
|
+
};
|
|
38
|
+
scroll: {
|
|
39
|
+
type: BooleanConstructor;
|
|
40
|
+
default: boolean;
|
|
41
|
+
};
|
|
42
|
+
width: {
|
|
43
|
+
type: StringConstructor;
|
|
44
|
+
default: string;
|
|
45
|
+
};
|
|
46
|
+
maxHeight: {
|
|
47
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
48
|
+
default: string;
|
|
49
|
+
};
|
|
50
|
+
}>> & Readonly<{}>, {
|
|
51
|
+
title: string;
|
|
52
|
+
fullscreen: boolean;
|
|
53
|
+
scroll: boolean;
|
|
54
|
+
width: string;
|
|
55
|
+
maxHeight: string | number;
|
|
56
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
57
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
58
|
+
export default _default;
|
|
59
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
60
|
+
new (): {
|
|
61
|
+
$slots: S;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare function __VLS_template(): {
|
|
2
|
+
attrs: Partial<{}>;
|
|
3
|
+
slots: {
|
|
4
|
+
default?(_: {}): any;
|
|
5
|
+
};
|
|
6
|
+
refs: {};
|
|
7
|
+
rootEl: any;
|
|
8
|
+
};
|
|
9
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
10
|
+
declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
11
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
12
|
+
export default _default;
|
|
13
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
14
|
+
new (): {
|
|
15
|
+
$slots: S;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
type MenuType = Array<{
|
|
2
|
+
label: string;
|
|
3
|
+
onClick?: (e: any) => void;
|
|
4
|
+
}>;
|
|
5
|
+
declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
|
|
6
|
+
menuList: {
|
|
7
|
+
type: () => MenuType;
|
|
8
|
+
default: () => never[];
|
|
9
|
+
};
|
|
10
|
+
maxHeight: {
|
|
11
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
12
|
+
default: number;
|
|
13
|
+
};
|
|
14
|
+
backgroundColor: {
|
|
15
|
+
type: StringConstructor;
|
|
16
|
+
default: string;
|
|
17
|
+
};
|
|
18
|
+
hoverItemStyle: {
|
|
19
|
+
type: () => Record<string, string>;
|
|
20
|
+
default: () => {
|
|
21
|
+
backgroundColor: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
animationCurve: {
|
|
25
|
+
type: StringConstructor;
|
|
26
|
+
default: string;
|
|
27
|
+
};
|
|
28
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
29
|
+
menuList: {
|
|
30
|
+
type: () => MenuType;
|
|
31
|
+
default: () => never[];
|
|
32
|
+
};
|
|
33
|
+
maxHeight: {
|
|
34
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
35
|
+
default: number;
|
|
36
|
+
};
|
|
37
|
+
backgroundColor: {
|
|
38
|
+
type: StringConstructor;
|
|
39
|
+
default: string;
|
|
40
|
+
};
|
|
41
|
+
hoverItemStyle: {
|
|
42
|
+
type: () => Record<string, string>;
|
|
43
|
+
default: () => {
|
|
44
|
+
backgroundColor: string;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
animationCurve: {
|
|
48
|
+
type: StringConstructor;
|
|
49
|
+
default: string;
|
|
50
|
+
};
|
|
51
|
+
}>> & Readonly<{}>, {
|
|
52
|
+
maxHeight: string | number;
|
|
53
|
+
menuList: MenuType;
|
|
54
|
+
backgroundColor: string;
|
|
55
|
+
hoverItemStyle: Record<string, string>;
|
|
56
|
+
animationCurve: string;
|
|
57
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
58
|
+
contextMenu: HTMLDivElement;
|
|
59
|
+
menuListRef: HTMLDivElement;
|
|
60
|
+
}, HTMLDivElement>;
|
|
61
|
+
export default _default;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { FormItem, ComponentMapType } from '../types';
|
|
3
|
+
export declare const getPlaceholder: (item: FormItem) => string | undefined;
|
|
4
|
+
export declare const componentsMap: ComponentMapType[];
|
|
5
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<globalThis.ExtractPropTypes<{
|
|
6
|
+
inline: {
|
|
7
|
+
type: BooleanConstructor;
|
|
8
|
+
default: boolean;
|
|
9
|
+
};
|
|
10
|
+
formItems: {
|
|
11
|
+
type: PropType<FormItem[]>;
|
|
12
|
+
default: () => never[];
|
|
13
|
+
};
|
|
14
|
+
labelWidth: {
|
|
15
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
16
|
+
default: string;
|
|
17
|
+
};
|
|
18
|
+
itemWidth: {
|
|
19
|
+
type: StringConstructor[];
|
|
20
|
+
default: string;
|
|
21
|
+
};
|
|
22
|
+
modelValue: {
|
|
23
|
+
type: PropType<Record<string, any>>;
|
|
24
|
+
};
|
|
25
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
26
|
+
"update:modelValue": (value: Record<string, any>) => any;
|
|
27
|
+
}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
28
|
+
inline: {
|
|
29
|
+
type: BooleanConstructor;
|
|
30
|
+
default: boolean;
|
|
31
|
+
};
|
|
32
|
+
formItems: {
|
|
33
|
+
type: PropType<FormItem[]>;
|
|
34
|
+
default: () => never[];
|
|
35
|
+
};
|
|
36
|
+
labelWidth: {
|
|
37
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
38
|
+
default: string;
|
|
39
|
+
};
|
|
40
|
+
itemWidth: {
|
|
41
|
+
type: StringConstructor[];
|
|
42
|
+
default: string;
|
|
43
|
+
};
|
|
44
|
+
modelValue: {
|
|
45
|
+
type: PropType<Record<string, any>>;
|
|
46
|
+
};
|
|
47
|
+
}>> & Readonly<{
|
|
48
|
+
"onUpdate:modelValue"?: ((value: Record<string, any>) => any) | undefined;
|
|
49
|
+
}>, {
|
|
50
|
+
labelWidth: string | number;
|
|
51
|
+
inline: boolean;
|
|
52
|
+
formItems: FormItem[];
|
|
53
|
+
itemWidth: string;
|
|
54
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>, Readonly<Record<string, any>> & Record<string, any>>;
|
|
55
|
+
export default _default;
|
|
56
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
57
|
+
new (): {
|
|
58
|
+
$slots: S;
|
|
59
|
+
};
|
|
60
|
+
};
|