@gct-paas/core-web 0.1.4-dev.8 → 0.1.4-dev.9
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/index-BghCpvxN.js +76 -0
- package/dist/index-PLrMc0gl.cjs +76 -0
- package/dist/index-oVPMi6Ep.js +29160 -0
- package/dist/index.esm.min.mjs +34 -24962
- package/dist/index.min.cjs +1 -67
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -67
- package/dist/monaco-editor-B8X-ou0h.js +20245 -0
- package/dist/monaco-editor-Bdgpd_KL.cjs +19 -0
- package/dist/monaco-editor-NIWDtQNB.js +19 -0
- package/es/_virtual/_plugin-vue_export-helper.mjs +9 -0
- package/es/components/app-modal/app-modal-component.css +149 -0
- package/es/components/app-modal/app-modal-component.d.ts +26 -0
- package/es/components/app-modal/app-modal-component.mjs +140 -0
- package/es/components/base-button/base-button.css +74 -0
- package/es/components/base-button/base-button.vue.d.ts +173 -0
- package/es/components/base-button/base-button.vue.mjs +7 -0
- package/es/components/base-button/base-button.vue3.mjs +179 -0
- package/es/components/basic-button/basic-button.css +25 -0
- package/es/components/basic-button/basic-button.vue.d.ts +100 -0
- package/es/components/basic-button/basic-button.vue.mjs +7 -0
- package/es/components/basic-button/basic-button.vue3.mjs +130 -0
- package/es/components/code-editor/code-editor.d.ts +1 -1
- package/es/components/index.d.ts +10 -1
- package/es/components/index.mjs +22 -0
- package/es/components/layout/flex-container/flex-container.mjs +94 -0
- package/es/components/layout/flex-item/flex-item.mjs +55 -0
- package/es/components/layout/grid-container/grid-container.mjs +51 -0
- package/es/components/layout/view-container/view-container.mjs +38 -0
- package/es/components/svg-icon/svg-icon.css +73 -0
- package/es/components/svg-icon/svg-icon.vue.d.ts +40 -0
- package/es/components/svg-icon/svg-icon.vue.mjs +50 -0
- package/es/components/svg-icon/svg-icon.vue3.mjs +6 -0
- package/es/create-app-vue.d.ts +9 -0
- package/es/create-app-vue.mjs +17 -0
- package/es/directives/drag-resize.d.ts +4 -0
- package/es/directives/drag-resize.mjs +42 -0
- package/es/directives/index.d.ts +8 -0
- package/es/directives/index.mjs +9 -0
- package/es/directives/target-loading.d.ts +4 -0
- package/es/directives/target-loading.mjs +40 -0
- package/es/hooks/index.d.ts +1 -0
- package/es/hooks/useDragLine.d.ts +6 -0
- package/es/hooks/useDragLine.mjs +79 -0
- package/es/index.d.ts +5 -4
- package/es/index.mjs +29 -13
- package/es/modules/code-editor/index.d.ts +163 -0
- package/es/modules/code-editor/index.mjs +8 -0
- package/es/modules/code-editor/monaco-editor.css +49 -0
- package/es/modules/code-editor/monaco-editor.vue.d.ts +143 -0
- package/es/modules/code-editor/monaco-editor.vue.mjs +7 -0
- package/es/modules/code-editor/monaco-editor.vue2.mjs +440 -0
- package/es/modules/code-editor/useEditorConsole.d.ts +54 -0
- package/es/modules/code-editor/useEditorConsole.mjs +194 -0
- package/es/modules/code-editor/useMonacoEditor.d.ts +26 -0
- package/es/modules/code-editor/useMonacoEditor.mjs +26 -0
- package/es/modules/color-picker/index.d.ts +2 -0
- package/es/modules/color-picker/src/ColorPicker.css +16 -0
- package/es/modules/color-picker/src/ColorPicker.vue.d.ts +49 -0
- package/es/modules/color-picker/src/ColorPicker.vue.mjs +8 -0
- package/es/modules/color-picker/src/ColorPicker.vue2.mjs +545 -0
- package/es/modules/color-picker/src/ColorPicker2.css +156 -0
- package/es/modules/gct-dnd/constants/index.d.ts +7 -9
- package/es/modules/gct-dnd/constants/index.mjs +18 -7
- package/es/modules/global-modal/index.d.ts +5 -0
- package/es/modules/global-modal/index.mjs +16 -0
- package/es/modules/global-modal/src/BasicModal.vue.d.ts +518 -0
- package/es/modules/global-modal/src/BasicModal.vue.mjs +221 -0
- package/es/modules/global-modal/src/BasicModal.vue2.mjs +5 -0
- package/es/modules/global-modal/src/components/GlboalModal.d.ts +251 -0
- package/es/modules/global-modal/src/components/GlboalModal.mjs +40 -0
- package/es/modules/global-modal/src/components/ModalClose.css +95 -0
- package/es/modules/global-modal/src/components/ModalClose.vue.d.ts +27 -0
- package/es/modules/global-modal/src/components/ModalClose.vue.mjs +79 -0
- package/es/modules/global-modal/src/components/ModalClose.vue3.mjs +6 -0
- package/es/modules/global-modal/src/components/ModalFooter.vue.d.ts +270 -0
- package/es/modules/global-modal/src/components/ModalFooter.vue.mjs +44 -0
- package/es/modules/global-modal/src/components/ModalFooter.vue2.mjs +5 -0
- package/es/modules/global-modal/src/components/ModalHeader.vue.d.ts +17 -0
- package/es/modules/global-modal/src/components/ModalHeader.vue.mjs +11 -0
- package/es/modules/global-modal/src/components/ModalHeader.vue2.mjs +13 -0
- package/es/modules/global-modal/src/components/ModalWrapper.vue.d.ts +95 -0
- package/es/modules/global-modal/src/components/ModalWrapper.vue.mjs +26 -0
- package/es/modules/global-modal/src/components/ModalWrapper.vue2.mjs +136 -0
- package/es/modules/global-modal/src/hooks/useModal.d.ts +6 -0
- package/es/modules/global-modal/src/hooks/useModal.mjs +120 -0
- package/es/modules/global-modal/src/hooks/useModalContext.d.ts +5 -0
- package/es/modules/global-modal/src/hooks/useModalContext.mjs +11 -0
- package/es/modules/global-modal/src/hooks/useModalDrag.d.ts +7 -0
- package/es/modules/global-modal/src/hooks/useModalDrag.mjs +82 -0
- package/es/modules/global-modal/src/hooks/useModalFullScreen.d.ts +11 -0
- package/es/modules/global-modal/src/hooks/useModalFullScreen.mjs +16 -0
- package/es/modules/global-modal/src/index.css +153 -0
- package/es/modules/global-modal/src/props.d.ts +156 -0
- package/es/modules/global-modal/src/props.mjs +57 -0
- package/es/modules/global-modal/src/typing.d.ts +174 -0
- package/es/modules/target-loading/index.d.ts +4 -0
- package/es/modules/target-loading/src/createLoading.d.ts +13 -0
- package/es/modules/target-loading/src/createLoading.mjs +57 -0
- package/es/modules/target-loading/src/target-loading.css +18 -0
- package/es/modules/target-loading/src/target-loading.vue.d.ts +57 -0
- package/es/modules/target-loading/src/target-loading.vue.mjs +52 -0
- package/es/modules/target-loading/src/target-loading.vue3.mjs +7 -0
- package/es/modules/target-loading/src/typing.d.ts +9 -0
- package/es/modules/target-loading/src/useLoading.d.ts +9 -0
- package/es/setup-app.d.ts +1 -0
- package/es/setup-app.mjs +4 -0
- package/es/types/index.d.ts +190 -0
- package/es/utils/index.d.ts +4 -1
- package/es/utils/message-util/message-util.d.ts +7 -0
- package/es/utils/message-util/message-util.mjs +26 -0
- package/es/utils/monaco-loader/monaco-loader.d.ts +59 -0
- package/es/utils/monaco-loader/monaco-loader.mjs +88 -0
- package/es/utils/overlay-controller/overlay-controller.d.ts +18 -0
- package/es/utils/overlay-controller/overlay-controller.mjs +23 -0
- package/es/widgets/gct-edit-form/gct-edit-form.d.ts +1 -1
- package/es/widgets/gct-form/gct-form-collapse/gct-form-collapse.d.ts +1 -1
- package/package.json +14 -6
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import { defineComponent, useAttrs, ref, getCurrentInstance, computed, unref, toRef, watchEffect, watch, nextTick, openBlock, createBlock, mergeProps, createSlots, withCtx, renderSlot, createCommentVNode, createVNode } from 'vue';
|
|
2
|
+
import Modal from './components/GlboalModal.mjs';
|
|
3
|
+
import ModalWrapper from './components/ModalWrapper.vue.mjs';
|
|
4
|
+
import _sfc_main$1 from './components/ModalClose.vue.mjs';
|
|
5
|
+
import './components/ModalClose.css';/* empty css */
|
|
6
|
+
import _sfc_main$2 from './components/ModalFooter.vue.mjs';
|
|
7
|
+
import ModalHeader from './components/ModalHeader.vue.mjs';
|
|
8
|
+
import { omit, isFunction } from 'lodash-es';
|
|
9
|
+
import { basicProps } from './props.mjs';
|
|
10
|
+
import { useFullScreen } from './hooks/useModalFullScreen.mjs';
|
|
11
|
+
import { useNamespace, deepMerge } from '@gct-paas/core';
|
|
12
|
+
|
|
13
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
14
|
+
__name: "BasicModal",
|
|
15
|
+
props: basicProps,
|
|
16
|
+
emits: [
|
|
17
|
+
"visible-change",
|
|
18
|
+
"height-change",
|
|
19
|
+
"cancel",
|
|
20
|
+
"ok",
|
|
21
|
+
"register",
|
|
22
|
+
"update:visible"
|
|
23
|
+
],
|
|
24
|
+
setup(__props, { emit: __emit }) {
|
|
25
|
+
const attrs = useAttrs();
|
|
26
|
+
const props = __props;
|
|
27
|
+
const emit = __emit;
|
|
28
|
+
const visibleRef = ref(false);
|
|
29
|
+
const propsRef = ref(null);
|
|
30
|
+
const modalWrapperRef = ref(null);
|
|
31
|
+
const ns = useNamespace("basic-modal");
|
|
32
|
+
const extHeightRef = ref(0);
|
|
33
|
+
const modalMethods = {
|
|
34
|
+
setModalProps,
|
|
35
|
+
emitVisible: void 0,
|
|
36
|
+
redoModalHeight: () => {
|
|
37
|
+
nextTick(() => {
|
|
38
|
+
if (unref(modalWrapperRef)) {
|
|
39
|
+
unref(modalWrapperRef).setModalHeight();
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
const instance = getCurrentInstance();
|
|
45
|
+
if (instance) {
|
|
46
|
+
emit("register", modalMethods, instance.uid);
|
|
47
|
+
}
|
|
48
|
+
const getMergeProps = computed(() => {
|
|
49
|
+
return {
|
|
50
|
+
...props,
|
|
51
|
+
height: props.outHeight ? props.outHeight : props.height && props.height + 120,
|
|
52
|
+
...unref(propsRef)
|
|
53
|
+
};
|
|
54
|
+
});
|
|
55
|
+
const { handleFullScreen, getWrapClassName, fullScreenRef } = useFullScreen({
|
|
56
|
+
wrapClassName: ref(`vben ${toRef(getMergeProps.value, "wrapClassName")}`)
|
|
57
|
+
});
|
|
58
|
+
const getProps = computed(() => {
|
|
59
|
+
const opt = {
|
|
60
|
+
...unref(getMergeProps),
|
|
61
|
+
visible: unref(visibleRef),
|
|
62
|
+
okButtonProps: void 0,
|
|
63
|
+
cancelButtonProps: void 0,
|
|
64
|
+
title: void 0
|
|
65
|
+
};
|
|
66
|
+
return {
|
|
67
|
+
...opt,
|
|
68
|
+
wrapClassName: unref(getWrapClassName)
|
|
69
|
+
};
|
|
70
|
+
});
|
|
71
|
+
const getBindValue = computed(() => {
|
|
72
|
+
const attr = {
|
|
73
|
+
...attrs,
|
|
74
|
+
...unref(getMergeProps),
|
|
75
|
+
visible: unref(visibleRef)
|
|
76
|
+
};
|
|
77
|
+
attr["wrapClassName"] = `${attr?.["wrapClassName"] || ""} ${unref(getWrapClassName)}`;
|
|
78
|
+
if (unref(fullScreenRef)) {
|
|
79
|
+
return omit(attr, ["height", "title"]);
|
|
80
|
+
}
|
|
81
|
+
return omit(attr, "title");
|
|
82
|
+
});
|
|
83
|
+
const getWrapperHeight = computed(() => {
|
|
84
|
+
if (unref(fullScreenRef)) return void 0;
|
|
85
|
+
return unref(getProps).height;
|
|
86
|
+
});
|
|
87
|
+
watchEffect(() => {
|
|
88
|
+
visibleRef.value = !!props.visible;
|
|
89
|
+
fullScreenRef.value = !!props.defaultFullscreen;
|
|
90
|
+
});
|
|
91
|
+
const resetState = () => {
|
|
92
|
+
fullScreenRef.value = props.defaultFullscreen;
|
|
93
|
+
};
|
|
94
|
+
watch(
|
|
95
|
+
() => unref(visibleRef),
|
|
96
|
+
(v) => {
|
|
97
|
+
emit("visible-change", v);
|
|
98
|
+
emit("update:visible", v);
|
|
99
|
+
instance && modalMethods.emitVisible?.(v, instance.uid);
|
|
100
|
+
nextTick(() => {
|
|
101
|
+
if (props.scrollTop && v && unref(modalWrapperRef)) {
|
|
102
|
+
unref(modalWrapperRef).scrollTop();
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
if (props.destroyOnClose && v === false) {
|
|
106
|
+
resetState();
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
immediate: false
|
|
111
|
+
}
|
|
112
|
+
);
|
|
113
|
+
async function handleCancel(e) {
|
|
114
|
+
e?.stopPropagation();
|
|
115
|
+
if (e.target?.classList?.contains(ns.b() + "-close--custom"))
|
|
116
|
+
return;
|
|
117
|
+
if (props.closeFunc && isFunction(props.closeFunc)) {
|
|
118
|
+
const isClose = await props.closeFunc();
|
|
119
|
+
visibleRef.value = !isClose;
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
visibleRef.value = false;
|
|
123
|
+
emit("cancel", e);
|
|
124
|
+
}
|
|
125
|
+
function setModalProps(props2) {
|
|
126
|
+
const _props = unref(propsRef) || {};
|
|
127
|
+
propsRef.value = deepMerge(_props, props2);
|
|
128
|
+
if (Reflect.has(props2, "visible")) {
|
|
129
|
+
visibleRef.value = !!props2.visible;
|
|
130
|
+
}
|
|
131
|
+
if (Reflect.has(props2, "defaultFullscreen")) {
|
|
132
|
+
fullScreenRef.value = !!props2.defaultFullscreen;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
function handleOk(e) {
|
|
136
|
+
emit("ok", e);
|
|
137
|
+
}
|
|
138
|
+
function handleHeightChange(height) {
|
|
139
|
+
emit("height-change", height);
|
|
140
|
+
}
|
|
141
|
+
function handleExtHeight(height) {
|
|
142
|
+
extHeightRef.value = height;
|
|
143
|
+
}
|
|
144
|
+
function handleTitleDbClick(e) {
|
|
145
|
+
if (!props.canFullscreen) return;
|
|
146
|
+
e.stopPropagation();
|
|
147
|
+
handleFullScreen(e);
|
|
148
|
+
}
|
|
149
|
+
return (_ctx, _cache) => {
|
|
150
|
+
return openBlock(), createBlock(unref(Modal), mergeProps(getBindValue.value, { onCancel: handleCancel }), createSlots({
|
|
151
|
+
default: withCtx(() => [
|
|
152
|
+
_ctx.$slots.closeIcon ? renderSlot(_ctx.$slots, "closeIcon", { key: 0 }) : createCommentVNode("", true),
|
|
153
|
+
_ctx.$slots.title ? renderSlot(_ctx.$slots, "title", { key: 1 }) : createCommentVNode("", true),
|
|
154
|
+
_ctx.$slots.footer ? renderSlot(_ctx.$slots, "footer", { key: 2 }) : createCommentVNode("", true),
|
|
155
|
+
createVNode(ModalWrapper, mergeProps(
|
|
156
|
+
{
|
|
157
|
+
ref_key: "modalWrapperRef",
|
|
158
|
+
ref: modalWrapperRef,
|
|
159
|
+
"use-wrapper": getProps.value.useWrapper,
|
|
160
|
+
"footer-offset": _ctx.wrapperFooterOffset,
|
|
161
|
+
"full-screen": unref(fullScreenRef),
|
|
162
|
+
loading: getProps.value.loading,
|
|
163
|
+
"loading-tip": getProps.value.loadingTip,
|
|
164
|
+
"min-height": getProps.value.minHeight,
|
|
165
|
+
height: getWrapperHeight.value,
|
|
166
|
+
visible: visibleRef.value,
|
|
167
|
+
"modal-footer-height": _ctx.footer !== void 0 && !_ctx.footer ? 0 : void 0
|
|
168
|
+
},
|
|
169
|
+
unref(omit)(getProps.value.wrapperProps, "visible", "height", "modalFooterHeight"),
|
|
170
|
+
{
|
|
171
|
+
onExtHeight: handleExtHeight,
|
|
172
|
+
onHeightChange: handleHeightChange
|
|
173
|
+
}
|
|
174
|
+
), {
|
|
175
|
+
default: withCtx(() => [
|
|
176
|
+
renderSlot(_ctx.$slots, "default")
|
|
177
|
+
]),
|
|
178
|
+
_: 3
|
|
179
|
+
}, 16, ["use-wrapper", "footer-offset", "full-screen", "loading", "loading-tip", "min-height", "height", "visible", "modal-footer-height"])
|
|
180
|
+
]),
|
|
181
|
+
_: 2
|
|
182
|
+
}, [
|
|
183
|
+
!_ctx.$slots.closeIcon ? {
|
|
184
|
+
name: "closeIcon",
|
|
185
|
+
fn: withCtx(() => [
|
|
186
|
+
createVNode(_sfc_main$1, {
|
|
187
|
+
"can-fullscreen": getProps.value.canFullscreen,
|
|
188
|
+
"full-screen": unref(fullScreenRef),
|
|
189
|
+
onCancel: handleCancel,
|
|
190
|
+
onFullscreen: unref(handleFullScreen)
|
|
191
|
+
}, null, 8, ["can-fullscreen", "full-screen", "onFullscreen"])
|
|
192
|
+
]),
|
|
193
|
+
key: "0"
|
|
194
|
+
} : void 0,
|
|
195
|
+
!_ctx.$slots.title ? {
|
|
196
|
+
name: "title",
|
|
197
|
+
fn: withCtx(() => [
|
|
198
|
+
createVNode(ModalHeader, {
|
|
199
|
+
"help-message": getProps.value.helpMessage,
|
|
200
|
+
title: getMergeProps.value.title,
|
|
201
|
+
onDblclick: handleTitleDbClick
|
|
202
|
+
}, null, 8, ["help-message", "title"])
|
|
203
|
+
]),
|
|
204
|
+
key: "1"
|
|
205
|
+
} : void 0,
|
|
206
|
+
!_ctx.$slots.footer ? {
|
|
207
|
+
name: "footer",
|
|
208
|
+
fn: withCtx(() => [
|
|
209
|
+
createVNode(_sfc_main$2, mergeProps(getBindValue.value, {
|
|
210
|
+
onOk: handleOk,
|
|
211
|
+
onCancel: handleCancel
|
|
212
|
+
}), null, 16)
|
|
213
|
+
]),
|
|
214
|
+
key: "2"
|
|
215
|
+
} : void 0
|
|
216
|
+
]), 1040);
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
|
|
221
|
+
export { _sfc_main as default };
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
|
+
visible: {
|
|
3
|
+
type: BooleanConstructor;
|
|
4
|
+
};
|
|
5
|
+
scrollTop: {
|
|
6
|
+
type: BooleanConstructor;
|
|
7
|
+
default: boolean;
|
|
8
|
+
};
|
|
9
|
+
height: {
|
|
10
|
+
type: NumberConstructor;
|
|
11
|
+
};
|
|
12
|
+
outHeight: {
|
|
13
|
+
type: NumberConstructor;
|
|
14
|
+
};
|
|
15
|
+
minHeight: {
|
|
16
|
+
type: NumberConstructor;
|
|
17
|
+
};
|
|
18
|
+
draggable: {
|
|
19
|
+
type: BooleanConstructor;
|
|
20
|
+
default: boolean;
|
|
21
|
+
};
|
|
22
|
+
centered: {
|
|
23
|
+
type: BooleanConstructor;
|
|
24
|
+
};
|
|
25
|
+
cancelText: {
|
|
26
|
+
type: StringConstructor;
|
|
27
|
+
default: string;
|
|
28
|
+
};
|
|
29
|
+
okText: {
|
|
30
|
+
type: StringConstructor;
|
|
31
|
+
default: string;
|
|
32
|
+
};
|
|
33
|
+
closeFunc: import('vue').PropType<() => Promise<boolean>>;
|
|
34
|
+
} & {
|
|
35
|
+
defaultFullscreen: {
|
|
36
|
+
type: BooleanConstructor;
|
|
37
|
+
};
|
|
38
|
+
canFullscreen: {
|
|
39
|
+
type: BooleanConstructor;
|
|
40
|
+
default: boolean;
|
|
41
|
+
};
|
|
42
|
+
wrapperFooterOffset: {
|
|
43
|
+
type: NumberConstructor;
|
|
44
|
+
default: number;
|
|
45
|
+
};
|
|
46
|
+
helpMessage: import('vue').PropType<string | string[]>;
|
|
47
|
+
useWrapper: {
|
|
48
|
+
type: BooleanConstructor;
|
|
49
|
+
default: boolean;
|
|
50
|
+
};
|
|
51
|
+
loading: {
|
|
52
|
+
type: BooleanConstructor;
|
|
53
|
+
};
|
|
54
|
+
loadingTip: {
|
|
55
|
+
type: StringConstructor;
|
|
56
|
+
};
|
|
57
|
+
showCancelBtn: {
|
|
58
|
+
type: BooleanConstructor;
|
|
59
|
+
default: boolean;
|
|
60
|
+
};
|
|
61
|
+
showOkBtn: {
|
|
62
|
+
type: BooleanConstructor;
|
|
63
|
+
default: boolean;
|
|
64
|
+
};
|
|
65
|
+
wrapperProps: import('vue').PropType<Partial<import('../typing').ModalWrapperProps>>;
|
|
66
|
+
afterClose: FunctionConstructor;
|
|
67
|
+
bodyStyle: import('vue').PropType<import('vue').CSSProperties>;
|
|
68
|
+
closable: {
|
|
69
|
+
type: BooleanConstructor;
|
|
70
|
+
default: boolean;
|
|
71
|
+
};
|
|
72
|
+
closeIcon: import('vue').PropType<import('vue').VNode>;
|
|
73
|
+
confirmLoading: {
|
|
74
|
+
type: BooleanConstructor;
|
|
75
|
+
};
|
|
76
|
+
destroyOnClose: {
|
|
77
|
+
type: BooleanConstructor;
|
|
78
|
+
};
|
|
79
|
+
footer: import('vue').PropType<import('vue').VNode>;
|
|
80
|
+
getContainer: import('vue').PropType<() => IObject>;
|
|
81
|
+
mask: {
|
|
82
|
+
type: BooleanConstructor;
|
|
83
|
+
default: boolean;
|
|
84
|
+
};
|
|
85
|
+
maskClosable: {
|
|
86
|
+
type: BooleanConstructor;
|
|
87
|
+
default: boolean;
|
|
88
|
+
};
|
|
89
|
+
keyboard: {
|
|
90
|
+
type: BooleanConstructor;
|
|
91
|
+
default: boolean;
|
|
92
|
+
};
|
|
93
|
+
maskStyle: import('vue').PropType<import('vue').CSSProperties>;
|
|
94
|
+
okType: {
|
|
95
|
+
type: import('vue').PropType<import('ant-design-vue/es/button').ButtonType>;
|
|
96
|
+
default: string;
|
|
97
|
+
};
|
|
98
|
+
okButtonProps: import('vue').PropType<import('ant-design-vue/es/button').ButtonProps>;
|
|
99
|
+
cancelButtonProps: import('vue').PropType<import('ant-design-vue/es/button').ButtonProps>;
|
|
100
|
+
title: {
|
|
101
|
+
type: StringConstructor;
|
|
102
|
+
};
|
|
103
|
+
visible: {
|
|
104
|
+
type: BooleanConstructor;
|
|
105
|
+
};
|
|
106
|
+
width: import('vue').PropType<string | number>;
|
|
107
|
+
wrapClassName: {
|
|
108
|
+
type: StringConstructor;
|
|
109
|
+
};
|
|
110
|
+
zIndex: {
|
|
111
|
+
type: NumberConstructor;
|
|
112
|
+
};
|
|
113
|
+
}>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
114
|
+
[key: string]: any;
|
|
115
|
+
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "cancel"[], "cancel", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
116
|
+
visible: {
|
|
117
|
+
type: BooleanConstructor;
|
|
118
|
+
};
|
|
119
|
+
scrollTop: {
|
|
120
|
+
type: BooleanConstructor;
|
|
121
|
+
default: boolean;
|
|
122
|
+
};
|
|
123
|
+
height: {
|
|
124
|
+
type: NumberConstructor;
|
|
125
|
+
};
|
|
126
|
+
outHeight: {
|
|
127
|
+
type: NumberConstructor;
|
|
128
|
+
};
|
|
129
|
+
minHeight: {
|
|
130
|
+
type: NumberConstructor;
|
|
131
|
+
};
|
|
132
|
+
draggable: {
|
|
133
|
+
type: BooleanConstructor;
|
|
134
|
+
default: boolean;
|
|
135
|
+
};
|
|
136
|
+
centered: {
|
|
137
|
+
type: BooleanConstructor;
|
|
138
|
+
};
|
|
139
|
+
cancelText: {
|
|
140
|
+
type: StringConstructor;
|
|
141
|
+
default: string;
|
|
142
|
+
};
|
|
143
|
+
okText: {
|
|
144
|
+
type: StringConstructor;
|
|
145
|
+
default: string;
|
|
146
|
+
};
|
|
147
|
+
closeFunc: import('vue').PropType<() => Promise<boolean>>;
|
|
148
|
+
} & {
|
|
149
|
+
defaultFullscreen: {
|
|
150
|
+
type: BooleanConstructor;
|
|
151
|
+
};
|
|
152
|
+
canFullscreen: {
|
|
153
|
+
type: BooleanConstructor;
|
|
154
|
+
default: boolean;
|
|
155
|
+
};
|
|
156
|
+
wrapperFooterOffset: {
|
|
157
|
+
type: NumberConstructor;
|
|
158
|
+
default: number;
|
|
159
|
+
};
|
|
160
|
+
helpMessage: import('vue').PropType<string | string[]>;
|
|
161
|
+
useWrapper: {
|
|
162
|
+
type: BooleanConstructor;
|
|
163
|
+
default: boolean;
|
|
164
|
+
};
|
|
165
|
+
loading: {
|
|
166
|
+
type: BooleanConstructor;
|
|
167
|
+
};
|
|
168
|
+
loadingTip: {
|
|
169
|
+
type: StringConstructor;
|
|
170
|
+
};
|
|
171
|
+
showCancelBtn: {
|
|
172
|
+
type: BooleanConstructor;
|
|
173
|
+
default: boolean;
|
|
174
|
+
};
|
|
175
|
+
showOkBtn: {
|
|
176
|
+
type: BooleanConstructor;
|
|
177
|
+
default: boolean;
|
|
178
|
+
};
|
|
179
|
+
wrapperProps: import('vue').PropType<Partial<import('../typing').ModalWrapperProps>>;
|
|
180
|
+
afterClose: FunctionConstructor;
|
|
181
|
+
bodyStyle: import('vue').PropType<import('vue').CSSProperties>;
|
|
182
|
+
closable: {
|
|
183
|
+
type: BooleanConstructor;
|
|
184
|
+
default: boolean;
|
|
185
|
+
};
|
|
186
|
+
closeIcon: import('vue').PropType<import('vue').VNode>;
|
|
187
|
+
confirmLoading: {
|
|
188
|
+
type: BooleanConstructor;
|
|
189
|
+
};
|
|
190
|
+
destroyOnClose: {
|
|
191
|
+
type: BooleanConstructor;
|
|
192
|
+
};
|
|
193
|
+
footer: import('vue').PropType<import('vue').VNode>;
|
|
194
|
+
getContainer: import('vue').PropType<() => IObject>;
|
|
195
|
+
mask: {
|
|
196
|
+
type: BooleanConstructor;
|
|
197
|
+
default: boolean;
|
|
198
|
+
};
|
|
199
|
+
maskClosable: {
|
|
200
|
+
type: BooleanConstructor;
|
|
201
|
+
default: boolean;
|
|
202
|
+
};
|
|
203
|
+
keyboard: {
|
|
204
|
+
type: BooleanConstructor;
|
|
205
|
+
default: boolean;
|
|
206
|
+
};
|
|
207
|
+
maskStyle: import('vue').PropType<import('vue').CSSProperties>;
|
|
208
|
+
okType: {
|
|
209
|
+
type: import('vue').PropType<import('ant-design-vue/es/button').ButtonType>;
|
|
210
|
+
default: string;
|
|
211
|
+
};
|
|
212
|
+
okButtonProps: import('vue').PropType<import('ant-design-vue/es/button').ButtonProps>;
|
|
213
|
+
cancelButtonProps: import('vue').PropType<import('ant-design-vue/es/button').ButtonProps>;
|
|
214
|
+
title: {
|
|
215
|
+
type: StringConstructor;
|
|
216
|
+
};
|
|
217
|
+
visible: {
|
|
218
|
+
type: BooleanConstructor;
|
|
219
|
+
};
|
|
220
|
+
width: import('vue').PropType<string | number>;
|
|
221
|
+
wrapClassName: {
|
|
222
|
+
type: StringConstructor;
|
|
223
|
+
};
|
|
224
|
+
zIndex: {
|
|
225
|
+
type: NumberConstructor;
|
|
226
|
+
};
|
|
227
|
+
}>> & Readonly<{
|
|
228
|
+
onCancel?: ((...args: any[]) => any) | undefined;
|
|
229
|
+
}>, {
|
|
230
|
+
visible: boolean;
|
|
231
|
+
scrollTop: boolean;
|
|
232
|
+
draggable: boolean;
|
|
233
|
+
centered: boolean;
|
|
234
|
+
cancelText: string;
|
|
235
|
+
okText: string;
|
|
236
|
+
defaultFullscreen: boolean;
|
|
237
|
+
canFullscreen: boolean;
|
|
238
|
+
wrapperFooterOffset: number;
|
|
239
|
+
useWrapper: boolean;
|
|
240
|
+
loading: boolean;
|
|
241
|
+
showCancelBtn: boolean;
|
|
242
|
+
showOkBtn: boolean;
|
|
243
|
+
closable: boolean;
|
|
244
|
+
confirmLoading: boolean;
|
|
245
|
+
destroyOnClose: boolean;
|
|
246
|
+
mask: boolean;
|
|
247
|
+
maskClosable: boolean;
|
|
248
|
+
keyboard: boolean;
|
|
249
|
+
okType: import('ant-design-vue/es/button').ButtonType;
|
|
250
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
251
|
+
export default _default;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Modal as Modal$1 } from 'ant-design-vue';
|
|
2
|
+
import { defineComponent, toRefs, h } from 'vue';
|
|
3
|
+
import { basicProps } from '../props.mjs';
|
|
4
|
+
import { useModalDragMove } from '../hooks/useModalDrag.mjs';
|
|
5
|
+
|
|
6
|
+
const Modal = /* @__PURE__ */ defineComponent({
|
|
7
|
+
name: 'GlobalModal',
|
|
8
|
+
inheritAttrs: false,
|
|
9
|
+
props: basicProps,
|
|
10
|
+
emits: ['cancel'],
|
|
11
|
+
setup(props, {
|
|
12
|
+
slots,
|
|
13
|
+
emit,
|
|
14
|
+
attrs
|
|
15
|
+
}) {
|
|
16
|
+
const {
|
|
17
|
+
visible,
|
|
18
|
+
draggable,
|
|
19
|
+
destroyOnClose
|
|
20
|
+
} = toRefs(props);
|
|
21
|
+
useModalDragMove({
|
|
22
|
+
visible,
|
|
23
|
+
destroyOnClose,
|
|
24
|
+
draggable
|
|
25
|
+
});
|
|
26
|
+
const onCancel = e => {
|
|
27
|
+
emit('cancel', e);
|
|
28
|
+
};
|
|
29
|
+
return () => {
|
|
30
|
+
const propsData = {
|
|
31
|
+
...attrs,
|
|
32
|
+
...props,
|
|
33
|
+
onCancel
|
|
34
|
+
};
|
|
35
|
+
return h(Modal$1, propsData, slots);
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
export { Modal as default };
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
/* stylelint-disable scss/no-global-function-names */
|
|
3
|
+
/* bem('block', 'element', 'modifier') => 'ibiz-block__element--modifier' */
|
|
4
|
+
/**
|
|
5
|
+
* 定义 Block 块
|
|
6
|
+
* @param {String} $block - Block 块名称
|
|
7
|
+
* @example
|
|
8
|
+
* @include b('button') {
|
|
9
|
+
* padding: 10px;
|
|
10
|
+
* }
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* 定义 Element 元素
|
|
14
|
+
* @param {String|List} $element - Element 元素名称,支持单个或多个
|
|
15
|
+
* @example
|
|
16
|
+
* @include b('button') {
|
|
17
|
+
* @include e('text') {
|
|
18
|
+
* color: #000;
|
|
19
|
+
* }
|
|
20
|
+
* }
|
|
21
|
+
* // 或传入多个元素
|
|
22
|
+
* @include b('button') {
|
|
23
|
+
* @include e(('text', 'icon')) {
|
|
24
|
+
* margin: 5px;
|
|
25
|
+
* }
|
|
26
|
+
* }
|
|
27
|
+
*/
|
|
28
|
+
/**
|
|
29
|
+
* 定义 Modifier 修饰符
|
|
30
|
+
* @param {String|List} $modifier - Modifier 修饰符名称,支持单个或多个
|
|
31
|
+
* @example
|
|
32
|
+
* @include b('button') {
|
|
33
|
+
* @include m('primary') {
|
|
34
|
+
* background: blue;
|
|
35
|
+
* }
|
|
36
|
+
* }
|
|
37
|
+
* // 或传入多个修饰符
|
|
38
|
+
* @include b('button') {
|
|
39
|
+
* @include m(('primary', 'large')) {
|
|
40
|
+
* background: blue;
|
|
41
|
+
* font-size: 16px;
|
|
42
|
+
* }
|
|
43
|
+
* }
|
|
44
|
+
*/
|
|
45
|
+
/**
|
|
46
|
+
* 定义状态选择器
|
|
47
|
+
* @param {String} $state - 状态名称
|
|
48
|
+
* @example
|
|
49
|
+
* @include b('button') {
|
|
50
|
+
* @include when('disabled') {
|
|
51
|
+
* opacity: 0.5;
|
|
52
|
+
* }
|
|
53
|
+
* }
|
|
54
|
+
*/
|
|
55
|
+
/**
|
|
56
|
+
* 深色主题样式
|
|
57
|
+
* @param {String} $block - Block 块名称
|
|
58
|
+
* @example
|
|
59
|
+
* @include dark('button') {
|
|
60
|
+
* background: #333;
|
|
61
|
+
* color: #fff;
|
|
62
|
+
* }
|
|
63
|
+
*/
|
|
64
|
+
/* stylelint-disable scss/no-global-function-names */
|
|
65
|
+
.vben .ant-modal-close {
|
|
66
|
+
right: 16px;
|
|
67
|
+
}
|
|
68
|
+
.vben .ant-modal-close-x .anticon.anticon-close {
|
|
69
|
+
margin-left: 27px;
|
|
70
|
+
}
|
|
71
|
+
.gct-basic-modal-close {
|
|
72
|
+
display: flex;
|
|
73
|
+
align-items: center;
|
|
74
|
+
height: 95%;
|
|
75
|
+
}
|
|
76
|
+
.gct-basic-modal-close > span {
|
|
77
|
+
margin-left: 48px;
|
|
78
|
+
font-size: 16px;
|
|
79
|
+
}
|
|
80
|
+
.gct-basic-modal-close--can-full > span {
|
|
81
|
+
margin-left: 12px;
|
|
82
|
+
}
|
|
83
|
+
.gct-basic-modal-close:not(.gct-basic-modal-close--can-full) > span:nth-child(1):hover {
|
|
84
|
+
font-weight: 700;
|
|
85
|
+
}
|
|
86
|
+
.gct-basic-modal-close span:nth-child(1) {
|
|
87
|
+
display: inline-block;
|
|
88
|
+
padding: 10px;
|
|
89
|
+
}
|
|
90
|
+
.gct-basic-modal-close span:nth-child(1):hover {
|
|
91
|
+
color: var(--ant-primary-color);
|
|
92
|
+
}
|
|
93
|
+
.gct-basic-modal-close span:last-child:hover {
|
|
94
|
+
color: var(--ant-error-color);
|
|
95
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
|
+
canFullscreen: {
|
|
3
|
+
type: BooleanConstructor;
|
|
4
|
+
default: boolean;
|
|
5
|
+
};
|
|
6
|
+
fullScreen: {
|
|
7
|
+
type: BooleanConstructor;
|
|
8
|
+
};
|
|
9
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
10
|
+
cancel: (...args: any[]) => void;
|
|
11
|
+
fullscreen: (...args: any[]) => void;
|
|
12
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
13
|
+
canFullscreen: {
|
|
14
|
+
type: BooleanConstructor;
|
|
15
|
+
default: boolean;
|
|
16
|
+
};
|
|
17
|
+
fullScreen: {
|
|
18
|
+
type: BooleanConstructor;
|
|
19
|
+
};
|
|
20
|
+
}>> & Readonly<{
|
|
21
|
+
onCancel?: ((...args: any[]) => any) | undefined;
|
|
22
|
+
onFullscreen?: ((...args: any[]) => any) | undefined;
|
|
23
|
+
}>, {
|
|
24
|
+
canFullscreen: boolean;
|
|
25
|
+
fullScreen: boolean;
|
|
26
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
27
|
+
export default _default;
|