@dfsj/components 3.0.0
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/CHANGELOG.md +203 -0
- package/LICENSE +22 -0
- package/README.md +27 -0
- package/dist/components/Boards/index.d.ts +4 -0
- package/dist/components/Boards/src/Boards.vue.d.ts +33 -0
- package/dist/components/Boards/src/Boards.vue.js +5 -0
- package/dist/components/Boards/src/Boards.vue2.js +113 -0
- package/dist/components/Boards/src/props.d.ts +27 -0
- package/dist/components/Boards/src/props.js +18 -0
- package/dist/components/DatePicker/index.d.ts +2 -0
- package/dist/components/DatePicker/src/composables/use-month-range-header.d.ts +16 -0
- package/dist/components/DatePicker/src/composables/use-month-range-header.js +52 -0
- package/dist/components/DatePicker/src/composables/use-range-picker.d.ts +100 -0
- package/dist/components/DatePicker/src/composables/use-range-picker.js +99 -0
- package/dist/components/DatePicker/src/date-picker-com/panel-date-range.vue.d.ts +19 -0
- package/dist/components/DatePicker/src/date-picker-com/panel-date-range.vue.js +5 -0
- package/dist/components/DatePicker/src/date-picker-com/panel-date-range.vue2.js +564 -0
- package/dist/components/DatePicker/src/date-picker-com/panel-month-range.vue.d.ts +16 -0
- package/dist/components/DatePicker/src/date-picker-com/panel-month-range.vue.js +5 -0
- package/dist/components/DatePicker/src/date-picker-com/panel-month-range.vue2.js +210 -0
- package/dist/components/DatePicker/src/index.d.ts +196 -0
- package/dist/components/DatePicker/src/index.js +87 -0
- package/dist/components/DatePicker/src/panel-utils.d.ts +2 -0
- package/dist/components/DatePicker/src/panel-utils.js +25 -0
- package/dist/components/Editor/index.d.ts +6 -0
- package/dist/components/Editor/src/Editor.vue.d.ts +50 -0
- package/dist/components/Editor/src/Editor.vue.js +5 -0
- package/dist/components/Editor/src/Editor.vue2.js +138 -0
- package/dist/components/Form/index.d.ts +16 -0
- package/dist/components/Form/src/Form.vue.d.ts +164 -0
- package/dist/components/Form/src/Form.vue.js +5 -0
- package/dist/components/Form/src/Form.vue2.js +378 -0
- package/dist/components/Form/src/components/useRenderCheckbox.d.ts +4 -0
- package/dist/components/Form/src/components/useRenderCheckbox.js +33 -0
- package/dist/components/Form/src/components/useRenderRadio.d.ts +4 -0
- package/dist/components/Form/src/components/useRenderRadio.js +33 -0
- package/dist/components/Form/src/components/useRenderSelect.d.ts +4 -0
- package/dist/components/Form/src/components/useRenderSelect.js +52 -0
- package/dist/components/Form/src/helper/componentMap.d.ts +5 -0
- package/dist/components/Form/src/helper/componentMap.js +35 -0
- package/dist/components/Form/src/helper/index.d.ts +7 -0
- package/dist/components/Form/src/helper/index.js +109 -0
- package/dist/components/Form/src/types/index.d.ts +533 -0
- package/dist/components/Form/src/types/index.js +31 -0
- package/dist/components/Form/src/useForm.d.ts +1 -0
- package/dist/components/Form/src/useForm.js +290 -0
- package/dist/components/Highlight/index.d.ts +2 -0
- package/dist/components/Highlight/src/Highlight.vue.d.ts +41 -0
- package/dist/components/Highlight/src/Highlight.vue.js +5 -0
- package/dist/components/Highlight/src/Highlight.vue2.js +62 -0
- package/dist/components/Icon/index.d.ts +3 -0
- package/dist/components/Icon/src/Icon.vue.d.ts +49 -0
- package/dist/components/Icon/src/Icon.vue.js +5 -0
- package/dist/components/Icon/src/Icon.vue2.js +123 -0
- package/dist/components/Icon/src/SvgIcon.vue.d.ts +45 -0
- package/dist/components/Icon/src/SvgIcon.vue.js +7 -0
- package/dist/components/Icon/src/SvgIcon.vue2.js +45 -0
- package/dist/components/Icon/src/SvgIcon.vue3.js +14 -0
- package/dist/components/InputPassword/index.d.ts +2 -0
- package/dist/components/InputPassword/src/InputPassword.vue.d.ts +27 -0
- package/dist/components/InputPassword/src/InputPassword.vue.js +5 -0
- package/dist/components/InputPassword/src/InputPassword.vue2.js +58 -0
- package/dist/components/Modal/index.d.ts +2 -0
- package/dist/components/Modal/src/BasicModal.vue.d.ts +280 -0
- package/dist/components/Modal/src/BasicModal.vue.js +5 -0
- package/dist/components/Modal/src/BasicModal.vue2.js +150 -0
- package/dist/components/Modal/src/components/ModalFooter.vue.d.ts +86 -0
- package/dist/components/Modal/src/components/ModalFooter.vue.js +5 -0
- package/dist/components/Modal/src/components/ModalFooter.vue2.js +30 -0
- package/dist/components/Modal/src/components/ModalHeader.vue.d.ts +142 -0
- package/dist/components/Modal/src/components/ModalHeader.vue.js +5 -0
- package/dist/components/Modal/src/components/ModalHeader.vue2.js +63 -0
- package/dist/components/Modal/src/config.d.ts +24 -0
- package/dist/components/Modal/src/config.js +25 -0
- package/dist/components/Modal/src/hooks/useModalDrag.d.ts +24 -0
- package/dist/components/Modal/src/hooks/useModalDrag.js +108 -0
- package/dist/components/Modal/src/hooks/useTimeout.d.ts +15 -0
- package/dist/components/Modal/src/hooks/useTimeout.js +53 -0
- package/dist/components/Modal/src/props.d.ts +131 -0
- package/dist/components/Modal/src/props.js +107 -0
- package/dist/components/Modal/src/utils/index.d.ts +3 -0
- package/dist/components/Modal/src/utils/index.js +86 -0
- package/dist/components/Stateful/index.d.ts +4 -0
- package/dist/components/Stateful/src/State.d.ts +20 -0
- package/dist/components/Stateful/src/State.js +82 -0
- package/dist/components/Stateful/src/Stateful.vue.d.ts +44 -0
- package/dist/components/Stateful/src/Stateful.vue.js +5 -0
- package/dist/components/Stateful/src/Stateful.vue2.js +46 -0
- package/dist/components/Stateful/src/props.d.ts +39 -0
- package/dist/components/Stateful/src/props.js +29 -0
- package/dist/components/Table/index.d.ts +14 -0
- package/dist/components/Table/src/Table.vue.d.ts +537 -0
- package/dist/components/Table/src/Table.vue.js +5 -0
- package/dist/components/Table/src/Table.vue2.js +582 -0
- package/dist/components/Table/src/components/ColumnSetting.vue.d.ts +30 -0
- package/dist/components/Table/src/components/ColumnSetting.vue.js +5 -0
- package/dist/components/Table/src/components/ColumnSetting.vue2.js +264 -0
- package/dist/components/Table/src/components/TableActions.vue.d.ts +20 -0
- package/dist/components/Table/src/components/TableActions.vue.js +5 -0
- package/dist/components/Table/src/components/TableActions.vue2.js +108 -0
- package/dist/components/Table/src/helper/index.d.ts +2 -0
- package/dist/components/Table/src/helper/index.js +11 -0
- package/dist/components/Table/src/types/index.d.ts +87 -0
- package/dist/components/Table/src/useTable.d.ts +1 -0
- package/dist/components/Table/src/useTable.js +284 -0
- package/dist/components/UnifyChart/index.d.ts +4 -0
- package/dist/components/UnifyChart/src/ChartToolbox.vue.d.ts +63 -0
- package/dist/components/UnifyChart/src/ChartToolbox.vue.js +5 -0
- package/dist/components/UnifyChart/src/ChartToolbox.vue2.js +83 -0
- package/dist/components/UnifyChart/src/UnifyChart.vue.d.ts +185 -0
- package/dist/components/UnifyChart/src/UnifyChart.vue.js +5 -0
- package/dist/components/UnifyChart/src/UnifyChart.vue2.js +54 -0
- package/dist/components/UnifyChart/src/hooks/useLoader.d.ts +11 -0
- package/dist/components/UnifyChart/src/hooks/useRender.d.ts +24 -0
- package/dist/components/UnifyChart/src/hooks/useRender.js +49 -0
- package/dist/components/UnifyChart/src/props.d.ts +145 -0
- package/dist/components/UnifyChart/src/props.js +33 -0
- package/dist/components/Video/index.d.ts +2 -0
- package/dist/components/Video/src/VideoPlayer.vue.d.ts +60 -0
- package/dist/components/Video/src/VideoPlayer.vue.js +5 -0
- package/dist/components/Video/src/VideoPlayer.vue2.js +107 -0
- package/dist/components/Video/src/VideoPlayerToolbar.vue.d.ts +34 -0
- package/dist/components/Video/src/VideoPlayerToolbar.vue.js +5 -0
- package/dist/components/Video/src/VideoPlayerToolbar.vue2.js +65 -0
- package/dist/components/Video/src/abstract/AbstractVideoControl.d.ts +7 -0
- package/dist/components/Video/src/abstract/Observable.d.ts +6 -0
- package/dist/components/Video/src/abstract/Observable.js +89 -0
- package/dist/components/Video/src/abstract/VideoControl.d.ts +32 -0
- package/dist/components/Video/src/abstract/VideoControl.js +50 -0
- package/dist/components/Video/src/control/DaHua.d.ts +12 -0
- package/dist/components/Video/src/control/DaHua.js +156 -0
- package/dist/components/Video/src/control/Hikvision.d.ts +28 -0
- package/dist/components/Video/src/control/Hikvision.js +251 -0
- package/dist/components/Video/src/control/VideoFactory.d.ts +3 -0
- package/dist/components/Video/src/control/VideoFactory.js +32 -0
- package/dist/components/Video/src/enums/CommonEnum.d.ts +26 -0
- package/dist/components/Video/src/enums/CommonEnum.js +31 -0
- package/dist/components/Windows/index.d.ts +4 -0
- package/dist/components/Windows/src/ModalWrap.vue.d.ts +14 -0
- package/dist/components/Windows/src/ModalWrap.vue.js +5 -0
- package/dist/components/Windows/src/ModalWrap.vue2.js +90 -0
- package/dist/components/Windows/src/Windows.vue.d.ts +18 -0
- package/dist/components/Windows/src/Windows.vue.js +7 -0
- package/dist/components/Windows/src/Windows.vue2.js +51 -0
- package/dist/components/Windows/src/Windows.vue3.js +22 -0
- package/dist/components/Windows/src/props.d.ts +20 -0
- package/dist/components/Windows/src/props.js +9 -0
- package/dist/directives/clickOutside.d.ts +3 -0
- package/dist/directives/index.d.ts +2 -0
- package/dist/directives/repeatClick.d.ts +3 -0
- package/dist/helper/lang.d.ts +1 -0
- package/dist/helper/lang.js +546 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +36 -0
- package/dist/index.min.css +6 -0
- package/dist/node_modules/.pnpm/@vueuse_core@10.7.2_vue@3.4.21/node_modules/@vueuse/core/index.js +268 -0
- package/dist/node_modules/.pnpm/@vueuse_shared@10.7.2_vue@3.4.21/node_modules/@vueuse/shared/index.js +34 -0
- package/dist/themes/index.d.ts +1 -0
- package/dist/themes/index.js +1 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/utils/index.d.ts +11 -0
- package/dist/utils/index.js +24 -0
- package/dist/utils/is.d.ts +25 -0
- package/dist/utils/is.js +36 -0
- package/dist/utils/propTypes.d.ts +10 -0
- package/dist/utils/propTypes.js +35 -0
- package/dist/utils/tsxHelper.d.ts +5 -0
- package/dist/utils/tsxHelper.js +18 -0
- package/package.json +64 -0
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
header: {
|
|
3
|
+
type: BooleanConstructor;
|
|
4
|
+
default: boolean;
|
|
5
|
+
};
|
|
6
|
+
maximizer: {
|
|
7
|
+
type: BooleanConstructor;
|
|
8
|
+
default: boolean;
|
|
9
|
+
};
|
|
10
|
+
closer: {
|
|
11
|
+
type: BooleanConstructor;
|
|
12
|
+
default: boolean;
|
|
13
|
+
};
|
|
14
|
+
maximum: import("vue-types").VueTypeValidableDef<any, import("vue-types/dist/types").ValidatorFunction<any>> & {
|
|
15
|
+
default: any;
|
|
16
|
+
};
|
|
17
|
+
headerIcon: {
|
|
18
|
+
type: StringConstructor;
|
|
19
|
+
default: string;
|
|
20
|
+
};
|
|
21
|
+
title: import("vue-types").VueTypeDef<any> & {
|
|
22
|
+
default: any;
|
|
23
|
+
};
|
|
24
|
+
titleAlign: import("vue-types").VueTypeDef<string> & {
|
|
25
|
+
default: string;
|
|
26
|
+
};
|
|
27
|
+
titleBefore: import("vue-types").VueTypeValidableDef<(...args: any[]) => any, import("vue-types/dist/types").ValidatorFunction<(...args: any[]) => any>> & {
|
|
28
|
+
default: (...args: any[]) => any;
|
|
29
|
+
};
|
|
30
|
+
titleAfter: import("vue-types").VueTypeValidableDef<(...args: any[]) => any, import("vue-types/dist/types").ValidatorFunction<(...args: any[]) => any>> & {
|
|
31
|
+
default: (...args: any[]) => any;
|
|
32
|
+
};
|
|
33
|
+
switcherIcon: {
|
|
34
|
+
type: ObjectConstructor;
|
|
35
|
+
default: () => {
|
|
36
|
+
true: {
|
|
37
|
+
image: string;
|
|
38
|
+
color: string;
|
|
39
|
+
};
|
|
40
|
+
false: {
|
|
41
|
+
image: string;
|
|
42
|
+
color: string;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
closerIcon: {
|
|
47
|
+
type: ObjectConstructor;
|
|
48
|
+
default: () => {
|
|
49
|
+
image: string;
|
|
50
|
+
color: string;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
onSwitch: import("vue-types").VueTypeValidableDef<(...args: any[]) => any, import("vue-types/dist/types").ValidatorFunction<(...args: any[]) => any>> & {
|
|
54
|
+
default: (...args: any[]) => any;
|
|
55
|
+
} & {
|
|
56
|
+
default: (...args: any[]) => any;
|
|
57
|
+
};
|
|
58
|
+
onClose: import("vue-types").VueTypeValidableDef<(...args: any[]) => any, import("vue-types/dist/types").ValidatorFunction<(...args: any[]) => any>> & {
|
|
59
|
+
default: (...args: any[]) => any;
|
|
60
|
+
} & {
|
|
61
|
+
default: (...args: any[]) => any;
|
|
62
|
+
};
|
|
63
|
+
}, (_ctx: any, _cache: any) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
64
|
+
[key: string]: any;
|
|
65
|
+
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
66
|
+
header: {
|
|
67
|
+
type: BooleanConstructor;
|
|
68
|
+
default: boolean;
|
|
69
|
+
};
|
|
70
|
+
maximizer: {
|
|
71
|
+
type: BooleanConstructor;
|
|
72
|
+
default: boolean;
|
|
73
|
+
};
|
|
74
|
+
closer: {
|
|
75
|
+
type: BooleanConstructor;
|
|
76
|
+
default: boolean;
|
|
77
|
+
};
|
|
78
|
+
maximum: import("vue-types").VueTypeValidableDef<any, import("vue-types/dist/types").ValidatorFunction<any>> & {
|
|
79
|
+
default: any;
|
|
80
|
+
};
|
|
81
|
+
headerIcon: {
|
|
82
|
+
type: StringConstructor;
|
|
83
|
+
default: string;
|
|
84
|
+
};
|
|
85
|
+
title: import("vue-types").VueTypeDef<any> & {
|
|
86
|
+
default: any;
|
|
87
|
+
};
|
|
88
|
+
titleAlign: import("vue-types").VueTypeDef<string> & {
|
|
89
|
+
default: string;
|
|
90
|
+
};
|
|
91
|
+
titleBefore: import("vue-types").VueTypeValidableDef<(...args: any[]) => any, import("vue-types/dist/types").ValidatorFunction<(...args: any[]) => any>> & {
|
|
92
|
+
default: (...args: any[]) => any;
|
|
93
|
+
};
|
|
94
|
+
titleAfter: import("vue-types").VueTypeValidableDef<(...args: any[]) => any, import("vue-types/dist/types").ValidatorFunction<(...args: any[]) => any>> & {
|
|
95
|
+
default: (...args: any[]) => any;
|
|
96
|
+
};
|
|
97
|
+
switcherIcon: {
|
|
98
|
+
type: ObjectConstructor;
|
|
99
|
+
default: () => {
|
|
100
|
+
true: {
|
|
101
|
+
image: string;
|
|
102
|
+
color: string;
|
|
103
|
+
};
|
|
104
|
+
false: {
|
|
105
|
+
image: string;
|
|
106
|
+
color: string;
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
closerIcon: {
|
|
111
|
+
type: ObjectConstructor;
|
|
112
|
+
default: () => {
|
|
113
|
+
image: string;
|
|
114
|
+
color: string;
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
onSwitch: import("vue-types").VueTypeValidableDef<(...args: any[]) => any, import("vue-types/dist/types").ValidatorFunction<(...args: any[]) => any>> & {
|
|
118
|
+
default: (...args: any[]) => any;
|
|
119
|
+
} & {
|
|
120
|
+
default: (...args: any[]) => any;
|
|
121
|
+
};
|
|
122
|
+
onClose: import("vue-types").VueTypeValidableDef<(...args: any[]) => any, import("vue-types/dist/types").ValidatorFunction<(...args: any[]) => any>> & {
|
|
123
|
+
default: (...args: any[]) => any;
|
|
124
|
+
} & {
|
|
125
|
+
default: (...args: any[]) => any;
|
|
126
|
+
};
|
|
127
|
+
}>>, {
|
|
128
|
+
header: boolean;
|
|
129
|
+
maximizer: boolean;
|
|
130
|
+
closer: boolean;
|
|
131
|
+
maximum: any;
|
|
132
|
+
headerIcon: string;
|
|
133
|
+
title: any;
|
|
134
|
+
titleAlign: string;
|
|
135
|
+
titleBefore: (...args: any[]) => any;
|
|
136
|
+
titleAfter: (...args: any[]) => any;
|
|
137
|
+
switcherIcon: Record<string, any>;
|
|
138
|
+
closerIcon: Record<string, any>;
|
|
139
|
+
onSwitch: (...args: any[]) => any;
|
|
140
|
+
onClose: (...args: any[]) => any;
|
|
141
|
+
}, {}>;
|
|
142
|
+
export default _default;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { defineComponent, openBlock, createElementBlock, normalizeClass, unref, createCommentVNode, createElementVNode, normalizeStyle, renderSlot, createVNode, withModifiers } from 'vue';
|
|
2
|
+
import { headerProps } from '../props.js';
|
|
3
|
+
import '../../../Icon/src/Icon.vue.js';
|
|
4
|
+
import { moverClass } from '../config.js';
|
|
5
|
+
import script$1 from '../../../Icon/src/Icon.vue2.js';
|
|
6
|
+
|
|
7
|
+
var _hoisted_1 = {
|
|
8
|
+
key: 0,
|
|
9
|
+
"class": "header-before"
|
|
10
|
+
};
|
|
11
|
+
var _hoisted_2 = {
|
|
12
|
+
key: 1,
|
|
13
|
+
"class": "header--icon"
|
|
14
|
+
};
|
|
15
|
+
var _hoisted_3 = {
|
|
16
|
+
key: 2,
|
|
17
|
+
"class": "header--title"
|
|
18
|
+
};
|
|
19
|
+
var _hoisted_4 = {
|
|
20
|
+
key: 3,
|
|
21
|
+
"class": "header-before"
|
|
22
|
+
};
|
|
23
|
+
var _hoisted_5 = {
|
|
24
|
+
"class": "modal-header-right-control-wrap"
|
|
25
|
+
};
|
|
26
|
+
var _hoisted_6 = {
|
|
27
|
+
key: 0,
|
|
28
|
+
"class": "header--control"
|
|
29
|
+
};
|
|
30
|
+
var script = defineComponent({
|
|
31
|
+
__name: 'ModalHeader',
|
|
32
|
+
props: headerProps,
|
|
33
|
+
setup: function setup(__props) {
|
|
34
|
+
var props = __props;
|
|
35
|
+
return function (_ctx, _cache) {
|
|
36
|
+
var _ctx$switcherIcon;
|
|
37
|
+
return !!_ctx.header ? (openBlock(), createElementBlock("div", {
|
|
38
|
+
key: 0,
|
|
39
|
+
"class": normalizeClass(['component-modal-header', unref(moverClass)]),
|
|
40
|
+
onDblclick: _cache[0] || (_cache[0] = function () {
|
|
41
|
+
return _ctx.onSwitch();
|
|
42
|
+
})
|
|
43
|
+
}, [createCommentVNode(" 头部信息"), createElementVNode("div", {
|
|
44
|
+
"class": "modal-header-main-container-wrap",
|
|
45
|
+
style: normalizeStyle({
|
|
46
|
+
'justify-content': props.titleAlign
|
|
47
|
+
})
|
|
48
|
+
}, [createCommentVNode(" 左侧的信息"), _ctx.$slots.headerBefore ? (openBlock(), createElementBlock("div", _hoisted_1, [renderSlot(_ctx.$slots, "headerBefore")])) : createCommentVNode("v-if", true), createCommentVNode("图标"), _ctx.$slots.icon ? (openBlock(), createElementBlock("div", _hoisted_2, [renderSlot(_ctx.$slots, "icon")])) : createCommentVNode("v-if", true), createCommentVNode("文字"), _ctx.$slots.title ? (openBlock(), createElementBlock("div", _hoisted_3, [renderSlot(_ctx.$slots, "title")])) : createCommentVNode("v-if", true), createCommentVNode("追加"), _ctx.$slots.headerAfter ? (openBlock(), createElementBlock("div", _hoisted_4, [renderSlot(_ctx.$slots, "headerAfter")])) : createCommentVNode("v-if", true)], 4), createCommentVNode(" 右侧的按钮"), createElementVNode("div", _hoisted_5, [!!_ctx.switcherIcon || !!_ctx.closerIcon ? (openBlock(), createElementBlock("div", _hoisted_6, [createCommentVNode(" @ts-ignore"), createVNode(script$1, {
|
|
49
|
+
"class": "cursor-pointer",
|
|
50
|
+
size: 24,
|
|
51
|
+
onClick: withModifiers(_ctx.onSwitch, ["stop"]),
|
|
52
|
+
icon: (_ctx$switcherIcon = _ctx.switcherIcon) === null || _ctx$switcherIcon === void 0 ? void 0 : _ctx$switcherIcon[props.maximum].image
|
|
53
|
+
}, null, 8, ["onClick", "icon"]), createVNode(script$1, {
|
|
54
|
+
size: 24,
|
|
55
|
+
"class": "cursor-pointer",
|
|
56
|
+
onClick: withModifiers(_ctx.onClose, ["stop"]),
|
|
57
|
+
icon: _ctx.closerIcon.image
|
|
58
|
+
}, null, 8, ["onClick", "icon"])])) : createCommentVNode("v-if", true)])], 34)) : createCommentVNode("v-if", true);
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
export { script as default };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
declare const moverClass = "modal-dom-el";
|
|
2
|
+
declare const switcher: {
|
|
3
|
+
true: {
|
|
4
|
+
image: string;
|
|
5
|
+
color: string;
|
|
6
|
+
};
|
|
7
|
+
false: {
|
|
8
|
+
image: string;
|
|
9
|
+
color: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
declare const closer: {
|
|
13
|
+
image: string;
|
|
14
|
+
color: string;
|
|
15
|
+
};
|
|
16
|
+
declare const cancel: {
|
|
17
|
+
label: string;
|
|
18
|
+
color: string;
|
|
19
|
+
};
|
|
20
|
+
declare const submit: {
|
|
21
|
+
label: string;
|
|
22
|
+
color: string;
|
|
23
|
+
};
|
|
24
|
+
export { switcher, closer, cancel, submit, moverClass };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
var moverClass = "modal-dom-el";
|
|
2
|
+
var switcher = {
|
|
3
|
+
"true": {
|
|
4
|
+
image: 'mdi:window-restore',
|
|
5
|
+
color: 'transparent'
|
|
6
|
+
},
|
|
7
|
+
"false": {
|
|
8
|
+
image: 'mdi:window-maximize',
|
|
9
|
+
color: 'transparent'
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
var closer = {
|
|
13
|
+
image: 'mdi:close',
|
|
14
|
+
color: 'transparent'
|
|
15
|
+
};
|
|
16
|
+
var cancel = {
|
|
17
|
+
label: '取消',
|
|
18
|
+
color: 'warning'
|
|
19
|
+
};
|
|
20
|
+
var submit = {
|
|
21
|
+
label: '提交',
|
|
22
|
+
color: 'warning'
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export { cancel, closer, moverClass, submit, switcher };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
export interface UseModalDragMoveContext {
|
|
3
|
+
maximum: Ref<boolean>;
|
|
4
|
+
props: any;
|
|
5
|
+
draggable: Ref<boolean>;
|
|
6
|
+
destroyOnClose: Ref<boolean | undefined> | undefined;
|
|
7
|
+
visible: Ref<boolean>;
|
|
8
|
+
moverEl?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function useModalDragMove(context: UseModalDragMoveContext): {
|
|
11
|
+
locator: {
|
|
12
|
+
top: any;
|
|
13
|
+
bottom: any;
|
|
14
|
+
left: any;
|
|
15
|
+
right: any;
|
|
16
|
+
};
|
|
17
|
+
sign: {
|
|
18
|
+
x: any;
|
|
19
|
+
y: any;
|
|
20
|
+
l: any;
|
|
21
|
+
t: any;
|
|
22
|
+
};
|
|
23
|
+
moving: Ref<boolean>;
|
|
24
|
+
};
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { ref, reactive, getCurrentInstance, watchEffect, unref } from 'vue';
|
|
2
|
+
import { useTimeoutFn } from './useTimeout.js';
|
|
3
|
+
import { clamp } from '../utils/index.js';
|
|
4
|
+
|
|
5
|
+
function useModalDragMove(context) {
|
|
6
|
+
console.log('拖拽..............................................................');
|
|
7
|
+
var moving = ref(false);
|
|
8
|
+
var locator = reactive({
|
|
9
|
+
top: null,
|
|
10
|
+
bottom: null,
|
|
11
|
+
left: null,
|
|
12
|
+
right: null
|
|
13
|
+
});
|
|
14
|
+
var sign = reactive({
|
|
15
|
+
x: undefined,
|
|
16
|
+
y: undefined,
|
|
17
|
+
l: undefined,
|
|
18
|
+
t: undefined
|
|
19
|
+
});
|
|
20
|
+
var that = getCurrentInstance();
|
|
21
|
+
var getStyle = function getStyle(dom, attr) {
|
|
22
|
+
return getComputedStyle(dom)[attr];
|
|
23
|
+
};
|
|
24
|
+
var drag = function drag(wrap) {
|
|
25
|
+
if (!wrap) return;
|
|
26
|
+
wrap.setAttribute('data-drag', unref(context.draggable));
|
|
27
|
+
var dialogHeaderEl = wrap.querySelector(".".concat(context.moverEl));
|
|
28
|
+
var proxy = that.proxy;
|
|
29
|
+
var dragDom = proxy.$el;
|
|
30
|
+
if (!dialogHeaderEl || !dragDom || !unref(context.draggable)) return;
|
|
31
|
+
dialogHeaderEl.style.cursor = 'move';
|
|
32
|
+
dialogHeaderEl.onmousedown = function (e) {
|
|
33
|
+
if (!e) return;
|
|
34
|
+
var element = context.props.modally ? that.refs.body : proxy.$el;
|
|
35
|
+
var bounder = element.getBoundingClientRect();
|
|
36
|
+
sign.l = bounder.left;
|
|
37
|
+
sign.t = bounder.top;
|
|
38
|
+
sign.x = e.x;
|
|
39
|
+
sign.y = e.y;
|
|
40
|
+
moving.value = true;
|
|
41
|
+
document.onmousemove = function (event) {
|
|
42
|
+
var moved = sign.x !== event.x || sign.y !== event.y;
|
|
43
|
+
if (moved && moving.value && !context.maximum.value) {
|
|
44
|
+
event.preventDefault();
|
|
45
|
+
delete locator.right;
|
|
46
|
+
delete locator.bottom;
|
|
47
|
+
if (context.props.extent) {
|
|
48
|
+
var ex = context.props.extent;
|
|
49
|
+
var dx = event.x - sign.x;
|
|
50
|
+
var dy = event.y - sign.y;
|
|
51
|
+
console.log('that.refs', that.refs, that);
|
|
52
|
+
var br = that.refs.body.getBoundingClientRect();
|
|
53
|
+
var el = ex.left != null ? ex.left : -Number.MAX_VALUE;
|
|
54
|
+
var et = ex.top != null ? ex.top : -Number.MAX_VALUE;
|
|
55
|
+
var mr = ex.right != null ? window.innerWidth - ex.right - br.width : Number.MAX_VALUE;
|
|
56
|
+
var mb = ex.bottom != null ? window.innerHeight - ex.bottom - br.height : Number.MAX_VALUE;
|
|
57
|
+
locator.left = clamp(sign.l + dx, el, mr);
|
|
58
|
+
locator.top = clamp(sign.t + dy, et, mb);
|
|
59
|
+
} else {
|
|
60
|
+
var Δx = event.x - sign.x;
|
|
61
|
+
var Δy = event.y - sign.y;
|
|
62
|
+
locator.left = sign.l + Δx;
|
|
63
|
+
locator.top = sign.t + Δy;
|
|
64
|
+
}
|
|
65
|
+
that.emit('update:offset', locator);
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
document.onmouseup = function () {
|
|
69
|
+
moving.value = false;
|
|
70
|
+
document.onmousemove = null;
|
|
71
|
+
document.onmouseup = null;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
var handleDrag = function handleDrag() {
|
|
76
|
+
var _dragWrap$getAttribut;
|
|
77
|
+
var proxy = that.proxy;
|
|
78
|
+
var dragWrap = proxy.$el;
|
|
79
|
+
console.log('dragWrap', dragWrap);
|
|
80
|
+
if (!dragWrap) return;
|
|
81
|
+
var display = getStyle(dragWrap, 'display');
|
|
82
|
+
var draggable = (_dragWrap$getAttribut = dragWrap.getAttribute('data-drag')) !== null && _dragWrap$getAttribut !== void 0 ? _dragWrap$getAttribut : true;
|
|
83
|
+
console.log({
|
|
84
|
+
display: display,
|
|
85
|
+
draggable: draggable
|
|
86
|
+
});
|
|
87
|
+
if (display !== 'none') {
|
|
88
|
+
if (draggable === null || unref(context.destroyOnClose)) {
|
|
89
|
+
drag(dragWrap);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
watchEffect(function () {
|
|
94
|
+
if (!unref(context.visible) || !unref(context.draggable)) {
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
useTimeoutFn(function () {
|
|
98
|
+
handleDrag();
|
|
99
|
+
}, 30);
|
|
100
|
+
});
|
|
101
|
+
return {
|
|
102
|
+
locator: locator,
|
|
103
|
+
sign: sign,
|
|
104
|
+
moving: moving
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export { useModalDragMove };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare function isFunction(val: unknown): val is Function;
|
|
2
|
+
declare interface Fn<T = any, R = T> {
|
|
3
|
+
(...arg: T[]): R;
|
|
4
|
+
}
|
|
5
|
+
export declare function useTimeoutFn(handle: Fn<any>, wait: number, native?: boolean): {
|
|
6
|
+
readyRef: import("vue").Ref<boolean>;
|
|
7
|
+
stop: () => void;
|
|
8
|
+
start: () => void;
|
|
9
|
+
};
|
|
10
|
+
export declare function useTimeoutRef(wait: number): {
|
|
11
|
+
readyRef: import("vue").Ref<boolean>;
|
|
12
|
+
stop: () => void;
|
|
13
|
+
start: () => void;
|
|
14
|
+
};
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { watch, ref } from 'vue';
|
|
2
|
+
import { tryOnUnmounted } from '../../../../node_modules/.pnpm/@vueuse_shared@10.7.2_vue@3.4.21/node_modules/@vueuse/shared/index.js';
|
|
3
|
+
|
|
4
|
+
function isFunction(val) {
|
|
5
|
+
return typeof val === 'function';
|
|
6
|
+
}
|
|
7
|
+
function useTimeoutFn(handle, wait) {
|
|
8
|
+
var _native = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
9
|
+
if (!isFunction(handle)) {
|
|
10
|
+
throw new Error('handle is not Function!');
|
|
11
|
+
}
|
|
12
|
+
var _useTimeoutRef = useTimeoutRef(wait),
|
|
13
|
+
readyRef = _useTimeoutRef.readyRef,
|
|
14
|
+
stop = _useTimeoutRef.stop,
|
|
15
|
+
start = _useTimeoutRef.start;
|
|
16
|
+
if (_native) {
|
|
17
|
+
handle();
|
|
18
|
+
} else {
|
|
19
|
+
watch(readyRef, function (maturity) {
|
|
20
|
+
maturity && handle();
|
|
21
|
+
}, {
|
|
22
|
+
immediate: false
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
return {
|
|
26
|
+
readyRef: readyRef,
|
|
27
|
+
stop: stop,
|
|
28
|
+
start: start
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
function useTimeoutRef(wait) {
|
|
32
|
+
var readyRef = ref(false);
|
|
33
|
+
var timer;
|
|
34
|
+
function stop() {
|
|
35
|
+
readyRef.value = false;
|
|
36
|
+
timer && window.clearTimeout(timer);
|
|
37
|
+
}
|
|
38
|
+
function start() {
|
|
39
|
+
stop();
|
|
40
|
+
timer = setTimeout(function () {
|
|
41
|
+
readyRef.value = true;
|
|
42
|
+
}, wait);
|
|
43
|
+
}
|
|
44
|
+
start();
|
|
45
|
+
tryOnUnmounted(stop);
|
|
46
|
+
return {
|
|
47
|
+
readyRef: readyRef,
|
|
48
|
+
stop: stop,
|
|
49
|
+
start: start
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export { isFunction, useTimeoutFn, useTimeoutRef };
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
export declare const baseProps: {
|
|
2
|
+
visible: BooleanConstructor;
|
|
3
|
+
zIndex: {
|
|
4
|
+
type: NumberConstructor;
|
|
5
|
+
default: () => number;
|
|
6
|
+
};
|
|
7
|
+
sizes: ArrayConstructor;
|
|
8
|
+
offset: ObjectConstructor;
|
|
9
|
+
overflow: StringConstructor;
|
|
10
|
+
maximum: BooleanConstructor;
|
|
11
|
+
modally: BooleanConstructor;
|
|
12
|
+
movable: {
|
|
13
|
+
type: (BooleanConstructor | StringConstructor)[];
|
|
14
|
+
default: boolean;
|
|
15
|
+
};
|
|
16
|
+
position: {
|
|
17
|
+
type: StringConstructor;
|
|
18
|
+
default: string;
|
|
19
|
+
};
|
|
20
|
+
resizeable: BooleanConstructor;
|
|
21
|
+
extent: {
|
|
22
|
+
type: ObjectConstructor;
|
|
23
|
+
default: () => {
|
|
24
|
+
top: number;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
modalClass: StringConstructor;
|
|
28
|
+
contentClass: StringConstructor;
|
|
29
|
+
animation: ObjectConstructor;
|
|
30
|
+
};
|
|
31
|
+
export declare const headerProps: {
|
|
32
|
+
header: {
|
|
33
|
+
type: BooleanConstructor;
|
|
34
|
+
default: boolean;
|
|
35
|
+
};
|
|
36
|
+
maximizer: {
|
|
37
|
+
type: BooleanConstructor;
|
|
38
|
+
default: boolean;
|
|
39
|
+
};
|
|
40
|
+
closer: {
|
|
41
|
+
type: BooleanConstructor;
|
|
42
|
+
default: boolean;
|
|
43
|
+
};
|
|
44
|
+
maximum: import("vue-types").VueTypeValidableDef<any, import("vue-types/dist/types").ValidatorFunction<any>> & {
|
|
45
|
+
default: any;
|
|
46
|
+
};
|
|
47
|
+
headerIcon: {
|
|
48
|
+
type: StringConstructor;
|
|
49
|
+
default: string;
|
|
50
|
+
};
|
|
51
|
+
title: import("vue-types").VueTypeDef<any> & {
|
|
52
|
+
default: any;
|
|
53
|
+
};
|
|
54
|
+
titleAlign: import("vue-types").VueTypeDef<string> & {
|
|
55
|
+
default: string;
|
|
56
|
+
};
|
|
57
|
+
titleBefore: import("vue-types").VueTypeValidableDef<(...args: any[]) => any, import("vue-types/dist/types").ValidatorFunction<(...args: any[]) => any>> & {
|
|
58
|
+
default: (...args: any[]) => any;
|
|
59
|
+
};
|
|
60
|
+
titleAfter: import("vue-types").VueTypeValidableDef<(...args: any[]) => any, import("vue-types/dist/types").ValidatorFunction<(...args: any[]) => any>> & {
|
|
61
|
+
default: (...args: any[]) => any;
|
|
62
|
+
};
|
|
63
|
+
switcherIcon: {
|
|
64
|
+
type: ObjectConstructor;
|
|
65
|
+
default: () => {
|
|
66
|
+
true: {
|
|
67
|
+
image: string;
|
|
68
|
+
color: string;
|
|
69
|
+
};
|
|
70
|
+
false: {
|
|
71
|
+
image: string;
|
|
72
|
+
color: string;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
closerIcon: {
|
|
77
|
+
type: ObjectConstructor;
|
|
78
|
+
default: () => {
|
|
79
|
+
image: string;
|
|
80
|
+
color: string;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
onSwitch: import("vue-types").VueTypeValidableDef<(...args: any[]) => any, import("vue-types/dist/types").ValidatorFunction<(...args: any[]) => any>> & {
|
|
84
|
+
default: (...args: any[]) => any;
|
|
85
|
+
} & {
|
|
86
|
+
default: (...args: any[]) => any;
|
|
87
|
+
};
|
|
88
|
+
onClose: import("vue-types").VueTypeValidableDef<(...args: any[]) => any, import("vue-types/dist/types").ValidatorFunction<(...args: any[]) => any>> & {
|
|
89
|
+
default: (...args: any[]) => any;
|
|
90
|
+
} & {
|
|
91
|
+
default: (...args: any[]) => any;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
export declare const footerProps: {
|
|
95
|
+
footer: {
|
|
96
|
+
type: BooleanConstructor;
|
|
97
|
+
default: boolean;
|
|
98
|
+
};
|
|
99
|
+
cancel: {
|
|
100
|
+
type: BooleanConstructor;
|
|
101
|
+
default: boolean;
|
|
102
|
+
};
|
|
103
|
+
submit: {
|
|
104
|
+
type: BooleanConstructor;
|
|
105
|
+
default: boolean;
|
|
106
|
+
};
|
|
107
|
+
submitOpt: {
|
|
108
|
+
type: ObjectConstructor;
|
|
109
|
+
default: () => {
|
|
110
|
+
label: string;
|
|
111
|
+
color: string;
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
cancelOpt: {
|
|
115
|
+
type: ObjectConstructor;
|
|
116
|
+
default: () => {
|
|
117
|
+
label: string;
|
|
118
|
+
color: string;
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
onCancel: import("vue-types").VueTypeValidableDef<(...args: any[]) => any, import("vue-types/dist/types").ValidatorFunction<(...args: any[]) => any>> & {
|
|
122
|
+
default: (...args: any[]) => any;
|
|
123
|
+
} & {
|
|
124
|
+
default: (...args: any[]) => any;
|
|
125
|
+
};
|
|
126
|
+
onSubmit: import("vue-types").VueTypeValidableDef<(...args: any[]) => any, import("vue-types/dist/types").ValidatorFunction<(...args: any[]) => any>> & {
|
|
127
|
+
default: (...args: any[]) => any;
|
|
128
|
+
} & {
|
|
129
|
+
default: (...args: any[]) => any;
|
|
130
|
+
};
|
|
131
|
+
};
|