@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,156 @@
|
|
|
1
|
+
import { PropType, CSSProperties, VNode } from 'vue';
|
|
2
|
+
import { ModalWrapperProps } from './typing';
|
|
3
|
+
import { ButtonProps, ButtonType } from 'ant-design-vue/es/button/buttonTypes';
|
|
4
|
+
export declare const modalProps: {
|
|
5
|
+
visible: {
|
|
6
|
+
type: BooleanConstructor;
|
|
7
|
+
};
|
|
8
|
+
scrollTop: {
|
|
9
|
+
type: BooleanConstructor;
|
|
10
|
+
default: boolean;
|
|
11
|
+
};
|
|
12
|
+
height: {
|
|
13
|
+
type: NumberConstructor;
|
|
14
|
+
};
|
|
15
|
+
outHeight: {
|
|
16
|
+
type: NumberConstructor;
|
|
17
|
+
};
|
|
18
|
+
minHeight: {
|
|
19
|
+
type: NumberConstructor;
|
|
20
|
+
};
|
|
21
|
+
draggable: {
|
|
22
|
+
type: BooleanConstructor;
|
|
23
|
+
default: boolean;
|
|
24
|
+
};
|
|
25
|
+
centered: {
|
|
26
|
+
type: BooleanConstructor;
|
|
27
|
+
};
|
|
28
|
+
cancelText: {
|
|
29
|
+
type: StringConstructor;
|
|
30
|
+
default: string;
|
|
31
|
+
};
|
|
32
|
+
okText: {
|
|
33
|
+
type: StringConstructor;
|
|
34
|
+
default: string;
|
|
35
|
+
};
|
|
36
|
+
closeFunc: PropType<() => Promise<boolean>>;
|
|
37
|
+
};
|
|
38
|
+
export declare const basicProps: {
|
|
39
|
+
visible: {
|
|
40
|
+
type: BooleanConstructor;
|
|
41
|
+
};
|
|
42
|
+
scrollTop: {
|
|
43
|
+
type: BooleanConstructor;
|
|
44
|
+
default: boolean;
|
|
45
|
+
};
|
|
46
|
+
height: {
|
|
47
|
+
type: NumberConstructor;
|
|
48
|
+
};
|
|
49
|
+
outHeight: {
|
|
50
|
+
type: NumberConstructor;
|
|
51
|
+
};
|
|
52
|
+
minHeight: {
|
|
53
|
+
type: NumberConstructor;
|
|
54
|
+
};
|
|
55
|
+
draggable: {
|
|
56
|
+
type: BooleanConstructor;
|
|
57
|
+
default: boolean;
|
|
58
|
+
};
|
|
59
|
+
centered: {
|
|
60
|
+
type: BooleanConstructor;
|
|
61
|
+
};
|
|
62
|
+
cancelText: {
|
|
63
|
+
type: StringConstructor;
|
|
64
|
+
default: string;
|
|
65
|
+
};
|
|
66
|
+
okText: {
|
|
67
|
+
type: StringConstructor;
|
|
68
|
+
default: string;
|
|
69
|
+
};
|
|
70
|
+
closeFunc: PropType<() => Promise<boolean>>;
|
|
71
|
+
} & {
|
|
72
|
+
defaultFullscreen: {
|
|
73
|
+
type: BooleanConstructor;
|
|
74
|
+
};
|
|
75
|
+
canFullscreen: {
|
|
76
|
+
type: BooleanConstructor;
|
|
77
|
+
default: boolean;
|
|
78
|
+
};
|
|
79
|
+
wrapperFooterOffset: {
|
|
80
|
+
type: NumberConstructor;
|
|
81
|
+
default: number;
|
|
82
|
+
};
|
|
83
|
+
helpMessage: PropType<string | string[]>;
|
|
84
|
+
useWrapper: {
|
|
85
|
+
type: BooleanConstructor;
|
|
86
|
+
default: boolean;
|
|
87
|
+
};
|
|
88
|
+
loading: {
|
|
89
|
+
type: BooleanConstructor;
|
|
90
|
+
};
|
|
91
|
+
loadingTip: {
|
|
92
|
+
type: StringConstructor;
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* @description: Show close button
|
|
96
|
+
*/
|
|
97
|
+
showCancelBtn: {
|
|
98
|
+
type: BooleanConstructor;
|
|
99
|
+
default: boolean;
|
|
100
|
+
};
|
|
101
|
+
/**
|
|
102
|
+
* @description: Show confirmation button
|
|
103
|
+
*/
|
|
104
|
+
showOkBtn: {
|
|
105
|
+
type: BooleanConstructor;
|
|
106
|
+
default: boolean;
|
|
107
|
+
};
|
|
108
|
+
wrapperProps: PropType<Partial<ModalWrapperProps>>;
|
|
109
|
+
afterClose: FunctionConstructor;
|
|
110
|
+
bodyStyle: PropType<CSSProperties>;
|
|
111
|
+
closable: {
|
|
112
|
+
type: BooleanConstructor;
|
|
113
|
+
default: boolean;
|
|
114
|
+
};
|
|
115
|
+
closeIcon: PropType<VNode>;
|
|
116
|
+
confirmLoading: {
|
|
117
|
+
type: BooleanConstructor;
|
|
118
|
+
};
|
|
119
|
+
destroyOnClose: {
|
|
120
|
+
type: BooleanConstructor;
|
|
121
|
+
};
|
|
122
|
+
footer: PropType<VNode>;
|
|
123
|
+
getContainer: PropType<() => IObject>;
|
|
124
|
+
mask: {
|
|
125
|
+
type: BooleanConstructor;
|
|
126
|
+
default: boolean;
|
|
127
|
+
};
|
|
128
|
+
maskClosable: {
|
|
129
|
+
type: BooleanConstructor;
|
|
130
|
+
default: boolean;
|
|
131
|
+
};
|
|
132
|
+
keyboard: {
|
|
133
|
+
type: BooleanConstructor;
|
|
134
|
+
default: boolean;
|
|
135
|
+
};
|
|
136
|
+
maskStyle: PropType<CSSProperties>;
|
|
137
|
+
okType: {
|
|
138
|
+
type: PropType<ButtonType>;
|
|
139
|
+
default: string;
|
|
140
|
+
};
|
|
141
|
+
okButtonProps: PropType<ButtonProps>;
|
|
142
|
+
cancelButtonProps: PropType<ButtonProps>;
|
|
143
|
+
title: {
|
|
144
|
+
type: StringConstructor;
|
|
145
|
+
};
|
|
146
|
+
visible: {
|
|
147
|
+
type: BooleanConstructor;
|
|
148
|
+
};
|
|
149
|
+
width: PropType<string | number>;
|
|
150
|
+
wrapClassName: {
|
|
151
|
+
type: StringConstructor;
|
|
152
|
+
};
|
|
153
|
+
zIndex: {
|
|
154
|
+
type: NumberConstructor;
|
|
155
|
+
};
|
|
156
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
const modalProps = {
|
|
2
|
+
visible: { type: Boolean },
|
|
3
|
+
scrollTop: { type: Boolean, default: true },
|
|
4
|
+
height: { type: Number },
|
|
5
|
+
outHeight: { type: Number },
|
|
6
|
+
minHeight: { type: Number },
|
|
7
|
+
// open drag
|
|
8
|
+
draggable: { type: Boolean, default: true },
|
|
9
|
+
centered: { type: Boolean },
|
|
10
|
+
cancelText: { type: String, default: "sys.cancelText" },
|
|
11
|
+
okText: { type: String, default: "sys.okText" },
|
|
12
|
+
closeFunc: Function
|
|
13
|
+
};
|
|
14
|
+
const basicProps = Object.assign({}, modalProps, {
|
|
15
|
+
defaultFullscreen: { type: Boolean },
|
|
16
|
+
// Can it be full screen
|
|
17
|
+
canFullscreen: { type: Boolean, default: true },
|
|
18
|
+
// After enabling the wrapper, the bottom can be increased in height
|
|
19
|
+
wrapperFooterOffset: { type: Number, default: 0 },
|
|
20
|
+
// Warm reminder message
|
|
21
|
+
helpMessage: [String, Array],
|
|
22
|
+
// Whether to setting wrapper
|
|
23
|
+
useWrapper: { type: Boolean, default: true },
|
|
24
|
+
loading: { type: Boolean },
|
|
25
|
+
loadingTip: { type: String },
|
|
26
|
+
/**
|
|
27
|
+
* @description: Show close button
|
|
28
|
+
*/
|
|
29
|
+
showCancelBtn: { type: Boolean, default: true },
|
|
30
|
+
/**
|
|
31
|
+
* @description: Show confirmation button
|
|
32
|
+
*/
|
|
33
|
+
showOkBtn: { type: Boolean, default: true },
|
|
34
|
+
wrapperProps: Object,
|
|
35
|
+
afterClose: Function,
|
|
36
|
+
bodyStyle: Object,
|
|
37
|
+
closable: { type: Boolean, default: true },
|
|
38
|
+
closeIcon: Object,
|
|
39
|
+
confirmLoading: { type: Boolean },
|
|
40
|
+
destroyOnClose: { type: Boolean },
|
|
41
|
+
footer: Object,
|
|
42
|
+
getContainer: Function,
|
|
43
|
+
mask: { type: Boolean, default: true },
|
|
44
|
+
maskClosable: { type: Boolean, default: false },
|
|
45
|
+
keyboard: { type: Boolean, default: true },
|
|
46
|
+
maskStyle: Object,
|
|
47
|
+
okType: { type: String, default: "primary" },
|
|
48
|
+
okButtonProps: Object,
|
|
49
|
+
cancelButtonProps: Object,
|
|
50
|
+
title: { type: String },
|
|
51
|
+
visible: { type: Boolean },
|
|
52
|
+
width: [String, Number],
|
|
53
|
+
wrapClassName: { type: String },
|
|
54
|
+
zIndex: { type: Number }
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
export { basicProps, modalProps };
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { ButtonProps } from 'ant-design-vue/lib/button/buttonTypes';
|
|
2
|
+
import { CSSProperties, VNodeChild, ComputedRef } from 'vue';
|
|
3
|
+
import { JSX } from 'vue/jsx-runtime';
|
|
4
|
+
/**
|
|
5
|
+
* @description: 弹窗对外暴露的方法
|
|
6
|
+
*/
|
|
7
|
+
export interface ModalMethods {
|
|
8
|
+
setModalProps: (props: Partial<ModalProps>) => void;
|
|
9
|
+
emitVisible?: (visible: boolean, uid: number) => void;
|
|
10
|
+
redoModalHeight?: () => void;
|
|
11
|
+
}
|
|
12
|
+
export type RegisterFn = (modalMethods: ModalMethods, uuid?: string) => void;
|
|
13
|
+
export interface ReturnMethods extends ModalMethods {
|
|
14
|
+
openModal: <T = IObject>(props?: boolean, data?: T, openOnSet?: boolean) => void;
|
|
15
|
+
closeModal: () => void;
|
|
16
|
+
getVisible?: ComputedRef<boolean>;
|
|
17
|
+
}
|
|
18
|
+
export type UseModalReturnType = [RegisterFn, ReturnMethods];
|
|
19
|
+
export interface ReturnInnerMethods extends ModalMethods {
|
|
20
|
+
closeModal: () => void;
|
|
21
|
+
changeLoading: (loading: boolean) => void;
|
|
22
|
+
changeOkLoading: (loading: boolean) => void;
|
|
23
|
+
getVisible?: ComputedRef<boolean>;
|
|
24
|
+
redoModalHeight: () => void;
|
|
25
|
+
}
|
|
26
|
+
export type UseModalInnerReturnType = [RegisterFn, ReturnInnerMethods];
|
|
27
|
+
export interface ModalProps {
|
|
28
|
+
minHeight?: number;
|
|
29
|
+
height?: number;
|
|
30
|
+
wrapperFooterOffset?: number;
|
|
31
|
+
draggable?: boolean;
|
|
32
|
+
scrollTop?: boolean;
|
|
33
|
+
canFullscreen?: boolean;
|
|
34
|
+
defaultFullscreen?: boolean;
|
|
35
|
+
visible?: boolean;
|
|
36
|
+
helpMessage: string | string[];
|
|
37
|
+
useWrapper: boolean;
|
|
38
|
+
loading: boolean;
|
|
39
|
+
loadingTip?: string;
|
|
40
|
+
wrapperProps: Omit<ModalWrapperProps, 'loading'>;
|
|
41
|
+
showOkBtn: boolean;
|
|
42
|
+
showCancelBtn: boolean;
|
|
43
|
+
closeFunc: () => Promise<any>;
|
|
44
|
+
/**
|
|
45
|
+
* Specify a function that will be called when modal is closed completely.
|
|
46
|
+
* @type Function
|
|
47
|
+
*/
|
|
48
|
+
afterClose?: () => any;
|
|
49
|
+
/**
|
|
50
|
+
* Body style for modal body element. Such as height, padding etc.
|
|
51
|
+
* @default {}
|
|
52
|
+
* @type object
|
|
53
|
+
*/
|
|
54
|
+
bodyStyle?: CSSProperties;
|
|
55
|
+
/**
|
|
56
|
+
* Text of the Cancel button
|
|
57
|
+
* @default 'cancel'
|
|
58
|
+
* @type string
|
|
59
|
+
*/
|
|
60
|
+
cancelText?: string;
|
|
61
|
+
/**
|
|
62
|
+
* Centered Modal
|
|
63
|
+
* @default false
|
|
64
|
+
* @type boolean
|
|
65
|
+
*/
|
|
66
|
+
centered?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Whether a close (x) button is visible on top right of the modal dialog or not
|
|
69
|
+
* @default true
|
|
70
|
+
* @type boolean
|
|
71
|
+
*/
|
|
72
|
+
closable?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Whether a close (x) button is visible on top right of the modal dialog or not
|
|
75
|
+
*/
|
|
76
|
+
closeIcon?: VNodeChild | JSX.Element;
|
|
77
|
+
/**
|
|
78
|
+
* Whether to apply loading visual effect for OK button or not
|
|
79
|
+
* @default false
|
|
80
|
+
* @type boolean
|
|
81
|
+
*/
|
|
82
|
+
confirmLoading?: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* Whether to unmount child components on onClose
|
|
85
|
+
* @default false
|
|
86
|
+
* @type boolean
|
|
87
|
+
*/
|
|
88
|
+
destroyOnClose?: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* Footer content, set as :footer="null" when you don't need default buttons
|
|
91
|
+
* @default OK and Cancel buttons
|
|
92
|
+
* @type any (string | slot)
|
|
93
|
+
*/
|
|
94
|
+
footer?: VNodeChild | JSX.Element;
|
|
95
|
+
/**
|
|
96
|
+
* Return the mount node for Modal
|
|
97
|
+
* @default () => document.body
|
|
98
|
+
* @type Function
|
|
99
|
+
*/
|
|
100
|
+
getContainer?: (instance: any) => HTMLElement;
|
|
101
|
+
/**
|
|
102
|
+
* Whether show mask or not.
|
|
103
|
+
* @default true
|
|
104
|
+
* @type boolean
|
|
105
|
+
*/
|
|
106
|
+
mask?: boolean;
|
|
107
|
+
/**
|
|
108
|
+
* Whether to close the modal dialog when the mask (area outside the modal) is clicked
|
|
109
|
+
* @default true
|
|
110
|
+
* @type boolean
|
|
111
|
+
*/
|
|
112
|
+
maskClosable?: boolean;
|
|
113
|
+
/**
|
|
114
|
+
* Style for modal's mask element.
|
|
115
|
+
* @default {}
|
|
116
|
+
* @type object
|
|
117
|
+
*/
|
|
118
|
+
maskStyle?: CSSProperties;
|
|
119
|
+
/**
|
|
120
|
+
* Text of the OK button
|
|
121
|
+
* @default 'OK'
|
|
122
|
+
* @type string
|
|
123
|
+
*/
|
|
124
|
+
okText?: string;
|
|
125
|
+
/**
|
|
126
|
+
* Button type of the OK button
|
|
127
|
+
* @default 'primary'
|
|
128
|
+
* @type string
|
|
129
|
+
*/
|
|
130
|
+
okType?: 'primary' | 'danger' | 'dashed' | 'ghost' | 'default';
|
|
131
|
+
/**
|
|
132
|
+
* The ok button props, follow jsx rules
|
|
133
|
+
* @type object
|
|
134
|
+
*/
|
|
135
|
+
okButtonProps?: ButtonProps;
|
|
136
|
+
/**
|
|
137
|
+
* The cancel button props, follow jsx rules
|
|
138
|
+
* @type object
|
|
139
|
+
*/
|
|
140
|
+
cancelButtonProps?: ButtonProps;
|
|
141
|
+
/**
|
|
142
|
+
* The modal dialog's title
|
|
143
|
+
* @type any (string | slot)
|
|
144
|
+
*/
|
|
145
|
+
title?: VNodeChild | JSX.Element;
|
|
146
|
+
/**
|
|
147
|
+
* Width of the modal dialog
|
|
148
|
+
* @default 520
|
|
149
|
+
* @type string | number
|
|
150
|
+
*/
|
|
151
|
+
width?: string | number;
|
|
152
|
+
/**
|
|
153
|
+
* The class name of the container of the modal dialog
|
|
154
|
+
* @type string
|
|
155
|
+
*/
|
|
156
|
+
wrapClassName?: string;
|
|
157
|
+
/**
|
|
158
|
+
* The z-index of the Modal
|
|
159
|
+
* @default 1000
|
|
160
|
+
* @type number
|
|
161
|
+
*/
|
|
162
|
+
zIndex?: number;
|
|
163
|
+
}
|
|
164
|
+
export interface ModalWrapperProps {
|
|
165
|
+
footerOffset?: number;
|
|
166
|
+
loading: boolean;
|
|
167
|
+
modalHeaderHeight: number;
|
|
168
|
+
modalFooterHeight: number;
|
|
169
|
+
minHeight: number;
|
|
170
|
+
height: number;
|
|
171
|
+
visible: boolean;
|
|
172
|
+
fullScreen: boolean;
|
|
173
|
+
useWrapper: boolean;
|
|
174
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { VNode } from 'vue';
|
|
2
|
+
import { LoadingProps } from './typing';
|
|
3
|
+
export declare function createLoading(props?: Partial<LoadingProps>, target?: HTMLElement, wait?: boolean): {
|
|
4
|
+
vm: VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
}>;
|
|
7
|
+
close: () => void;
|
|
8
|
+
open: (target?: HTMLElement) => void;
|
|
9
|
+
setTip: (tip: string) => void;
|
|
10
|
+
setLoading: (loading: boolean) => void;
|
|
11
|
+
readonly loading: boolean;
|
|
12
|
+
readonly $el: HTMLElement;
|
|
13
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { reactive, defineComponent, h, createVNode, render } from 'vue';
|
|
2
|
+
import Loading from './target-loading.vue3.mjs';
|
|
3
|
+
|
|
4
|
+
function createLoading(props, target, wait = false) {
|
|
5
|
+
let vm = null;
|
|
6
|
+
const data = reactive({
|
|
7
|
+
tip: "",
|
|
8
|
+
loading: true,
|
|
9
|
+
...props
|
|
10
|
+
});
|
|
11
|
+
const LoadingWrap = defineComponent({
|
|
12
|
+
render() {
|
|
13
|
+
return h(Loading, { ...data });
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
vm = createVNode(LoadingWrap);
|
|
17
|
+
if (wait) {
|
|
18
|
+
setTimeout(() => {
|
|
19
|
+
render(vm, document.createElement("div"));
|
|
20
|
+
}, 0);
|
|
21
|
+
} else {
|
|
22
|
+
render(vm, document.createElement("div"));
|
|
23
|
+
}
|
|
24
|
+
function close() {
|
|
25
|
+
if (vm?.el && vm.el.parentNode) {
|
|
26
|
+
vm.el.parentNode.removeChild(vm.el);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
function open(target2 = document.body) {
|
|
30
|
+
if (!vm || !vm.el) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
target2.appendChild(vm.el);
|
|
34
|
+
}
|
|
35
|
+
if (target) {
|
|
36
|
+
open(target);
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
vm,
|
|
40
|
+
close,
|
|
41
|
+
open,
|
|
42
|
+
setTip: (tip) => {
|
|
43
|
+
data.tip = tip;
|
|
44
|
+
},
|
|
45
|
+
setLoading: (loading) => {
|
|
46
|
+
data.loading = loading;
|
|
47
|
+
},
|
|
48
|
+
get loading() {
|
|
49
|
+
return data.loading;
|
|
50
|
+
},
|
|
51
|
+
get $el() {
|
|
52
|
+
return vm?.el;
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export { createLoading };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
.full-loading[data-v-d448466c] {
|
|
2
|
+
display: flex;
|
|
3
|
+
position: fixed;
|
|
4
|
+
z-index: 200;
|
|
5
|
+
top: 0;
|
|
6
|
+
left: 0;
|
|
7
|
+
align-items: center;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
width: 100%;
|
|
10
|
+
height: 100%;
|
|
11
|
+
background-color: rgba(240, 242, 245, 0.4);
|
|
12
|
+
}
|
|
13
|
+
.full-loading.absolute[data-v-d448466c] {
|
|
14
|
+
position: absolute;
|
|
15
|
+
z-index: 300;
|
|
16
|
+
top: 0;
|
|
17
|
+
left: 0;
|
|
18
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { SizeEnum } from '@gct-paas/core';
|
|
3
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
4
|
+
tip: {
|
|
5
|
+
type: PropType<string>;
|
|
6
|
+
default: string;
|
|
7
|
+
};
|
|
8
|
+
size: {
|
|
9
|
+
type: PropType<SizeEnum>;
|
|
10
|
+
default: SizeEnum;
|
|
11
|
+
validator: (v: SizeEnum) => boolean;
|
|
12
|
+
};
|
|
13
|
+
absolute: {
|
|
14
|
+
type: PropType<boolean>;
|
|
15
|
+
default: boolean;
|
|
16
|
+
};
|
|
17
|
+
loading: {
|
|
18
|
+
type: PropType<boolean>;
|
|
19
|
+
default: boolean;
|
|
20
|
+
};
|
|
21
|
+
background: {
|
|
22
|
+
type: PropType<string>;
|
|
23
|
+
};
|
|
24
|
+
theme: {
|
|
25
|
+
type: PropType<"dark" | "light">;
|
|
26
|
+
};
|
|
27
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
28
|
+
tip: {
|
|
29
|
+
type: PropType<string>;
|
|
30
|
+
default: string;
|
|
31
|
+
};
|
|
32
|
+
size: {
|
|
33
|
+
type: PropType<SizeEnum>;
|
|
34
|
+
default: SizeEnum;
|
|
35
|
+
validator: (v: SizeEnum) => boolean;
|
|
36
|
+
};
|
|
37
|
+
absolute: {
|
|
38
|
+
type: PropType<boolean>;
|
|
39
|
+
default: boolean;
|
|
40
|
+
};
|
|
41
|
+
loading: {
|
|
42
|
+
type: PropType<boolean>;
|
|
43
|
+
default: boolean;
|
|
44
|
+
};
|
|
45
|
+
background: {
|
|
46
|
+
type: PropType<string>;
|
|
47
|
+
};
|
|
48
|
+
theme: {
|
|
49
|
+
type: PropType<"dark" | "light">;
|
|
50
|
+
};
|
|
51
|
+
}>> & Readonly<{}>, {
|
|
52
|
+
loading: boolean;
|
|
53
|
+
size: SizeEnum;
|
|
54
|
+
absolute: boolean;
|
|
55
|
+
tip: string;
|
|
56
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLElement>;
|
|
57
|
+
export default _default;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { defineComponent, withDirectives, openBlock, createElementBlock, normalizeStyle, normalizeClass, createVNode, unref, mergeProps, vShow } from 'vue';
|
|
2
|
+
import { Spin } from 'ant-design-vue';
|
|
3
|
+
import { SizeEnum } from '@gct-paas/core';
|
|
4
|
+
|
|
5
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
|
+
__name: "target-loading",
|
|
7
|
+
props: {
|
|
8
|
+
tip: {
|
|
9
|
+
type: String,
|
|
10
|
+
default: ""
|
|
11
|
+
},
|
|
12
|
+
size: {
|
|
13
|
+
type: String,
|
|
14
|
+
default: SizeEnum.LARGE,
|
|
15
|
+
validator: (v) => {
|
|
16
|
+
return [SizeEnum.DEFAULT, SizeEnum.SMALL, SizeEnum.LARGE].includes(v);
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
absolute: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: false
|
|
22
|
+
},
|
|
23
|
+
loading: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
default: false
|
|
26
|
+
},
|
|
27
|
+
background: {
|
|
28
|
+
type: String
|
|
29
|
+
},
|
|
30
|
+
theme: {
|
|
31
|
+
type: String
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
setup(__props) {
|
|
35
|
+
return (_ctx, _cache) => {
|
|
36
|
+
return withDirectives((openBlock(), createElementBlock("section", {
|
|
37
|
+
class: normalizeClass(["full-loading", { absolute: __props.absolute, [__props.theme]: !!__props.theme }]),
|
|
38
|
+
style: normalizeStyle([__props.background ? `background-color: ${__props.background}` : ""])
|
|
39
|
+
}, [
|
|
40
|
+
createVNode(unref(Spin), mergeProps(_ctx.$attrs, {
|
|
41
|
+
tip: __props.tip,
|
|
42
|
+
size: __props.size,
|
|
43
|
+
spinning: __props.loading
|
|
44
|
+
}), null, 16, ["tip", "size", "spinning"])
|
|
45
|
+
], 6)), [
|
|
46
|
+
[vShow, __props.loading]
|
|
47
|
+
]);
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
export { _sfc_main as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import _sfc_main from './target-loading.vue.mjs';
|
|
2
|
+
import './target-loading.css';/* empty css */
|
|
3
|
+
import _export_sfc from '../../../_virtual/_plugin-vue_export-helper.mjs';
|
|
4
|
+
|
|
5
|
+
const Loading = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-d448466c"]]);
|
|
6
|
+
|
|
7
|
+
export { Loading as default };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { LoadingProps } from './typing';
|
|
2
|
+
import { Ref } from 'vue';
|
|
3
|
+
export interface UseLoadingOptions {
|
|
4
|
+
target?: HTMLElement | Ref<HTMLElement>;
|
|
5
|
+
props?: Partial<LoadingProps>;
|
|
6
|
+
}
|
|
7
|
+
type Fn = () => void;
|
|
8
|
+
export declare function useLoading(props: Partial<LoadingProps> | Partial<UseLoadingOptions>): [Fn, Fn, (str: string) => void];
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function coreWebSetupApp(): void;
|
package/es/setup-app.mjs
ADDED