@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.
Files changed (118) hide show
  1. package/dist/index-BghCpvxN.js +76 -0
  2. package/dist/index-PLrMc0gl.cjs +76 -0
  3. package/dist/index-oVPMi6Ep.js +29160 -0
  4. package/dist/index.esm.min.mjs +34 -24962
  5. package/dist/index.min.cjs +1 -67
  6. package/dist/index.min.css +1 -1
  7. package/dist/index.system.min.js +1 -67
  8. package/dist/monaco-editor-B8X-ou0h.js +20245 -0
  9. package/dist/monaco-editor-Bdgpd_KL.cjs +19 -0
  10. package/dist/monaco-editor-NIWDtQNB.js +19 -0
  11. package/es/_virtual/_plugin-vue_export-helper.mjs +9 -0
  12. package/es/components/app-modal/app-modal-component.css +149 -0
  13. package/es/components/app-modal/app-modal-component.d.ts +26 -0
  14. package/es/components/app-modal/app-modal-component.mjs +140 -0
  15. package/es/components/base-button/base-button.css +74 -0
  16. package/es/components/base-button/base-button.vue.d.ts +173 -0
  17. package/es/components/base-button/base-button.vue.mjs +7 -0
  18. package/es/components/base-button/base-button.vue3.mjs +179 -0
  19. package/es/components/basic-button/basic-button.css +25 -0
  20. package/es/components/basic-button/basic-button.vue.d.ts +100 -0
  21. package/es/components/basic-button/basic-button.vue.mjs +7 -0
  22. package/es/components/basic-button/basic-button.vue3.mjs +130 -0
  23. package/es/components/code-editor/code-editor.d.ts +1 -1
  24. package/es/components/index.d.ts +10 -1
  25. package/es/components/index.mjs +22 -0
  26. package/es/components/layout/flex-container/flex-container.mjs +94 -0
  27. package/es/components/layout/flex-item/flex-item.mjs +55 -0
  28. package/es/components/layout/grid-container/grid-container.mjs +51 -0
  29. package/es/components/layout/view-container/view-container.mjs +38 -0
  30. package/es/components/svg-icon/svg-icon.css +73 -0
  31. package/es/components/svg-icon/svg-icon.vue.d.ts +40 -0
  32. package/es/components/svg-icon/svg-icon.vue.mjs +50 -0
  33. package/es/components/svg-icon/svg-icon.vue3.mjs +6 -0
  34. package/es/create-app-vue.d.ts +9 -0
  35. package/es/create-app-vue.mjs +17 -0
  36. package/es/directives/drag-resize.d.ts +4 -0
  37. package/es/directives/drag-resize.mjs +42 -0
  38. package/es/directives/index.d.ts +8 -0
  39. package/es/directives/index.mjs +9 -0
  40. package/es/directives/target-loading.d.ts +4 -0
  41. package/es/directives/target-loading.mjs +40 -0
  42. package/es/hooks/index.d.ts +1 -0
  43. package/es/hooks/useDragLine.d.ts +6 -0
  44. package/es/hooks/useDragLine.mjs +79 -0
  45. package/es/index.d.ts +5 -4
  46. package/es/index.mjs +29 -13
  47. package/es/modules/code-editor/index.d.ts +163 -0
  48. package/es/modules/code-editor/index.mjs +8 -0
  49. package/es/modules/code-editor/monaco-editor.css +49 -0
  50. package/es/modules/code-editor/monaco-editor.vue.d.ts +143 -0
  51. package/es/modules/code-editor/monaco-editor.vue.mjs +7 -0
  52. package/es/modules/code-editor/monaco-editor.vue2.mjs +440 -0
  53. package/es/modules/code-editor/useEditorConsole.d.ts +54 -0
  54. package/es/modules/code-editor/useEditorConsole.mjs +194 -0
  55. package/es/modules/code-editor/useMonacoEditor.d.ts +26 -0
  56. package/es/modules/code-editor/useMonacoEditor.mjs +26 -0
  57. package/es/modules/color-picker/index.d.ts +2 -0
  58. package/es/modules/color-picker/src/ColorPicker.css +16 -0
  59. package/es/modules/color-picker/src/ColorPicker.vue.d.ts +49 -0
  60. package/es/modules/color-picker/src/ColorPicker.vue.mjs +8 -0
  61. package/es/modules/color-picker/src/ColorPicker.vue2.mjs +545 -0
  62. package/es/modules/color-picker/src/ColorPicker2.css +156 -0
  63. package/es/modules/gct-dnd/constants/index.d.ts +7 -9
  64. package/es/modules/gct-dnd/constants/index.mjs +18 -7
  65. package/es/modules/global-modal/index.d.ts +5 -0
  66. package/es/modules/global-modal/index.mjs +16 -0
  67. package/es/modules/global-modal/src/BasicModal.vue.d.ts +518 -0
  68. package/es/modules/global-modal/src/BasicModal.vue.mjs +221 -0
  69. package/es/modules/global-modal/src/BasicModal.vue2.mjs +5 -0
  70. package/es/modules/global-modal/src/components/GlboalModal.d.ts +251 -0
  71. package/es/modules/global-modal/src/components/GlboalModal.mjs +40 -0
  72. package/es/modules/global-modal/src/components/ModalClose.css +95 -0
  73. package/es/modules/global-modal/src/components/ModalClose.vue.d.ts +27 -0
  74. package/es/modules/global-modal/src/components/ModalClose.vue.mjs +79 -0
  75. package/es/modules/global-modal/src/components/ModalClose.vue3.mjs +6 -0
  76. package/es/modules/global-modal/src/components/ModalFooter.vue.d.ts +270 -0
  77. package/es/modules/global-modal/src/components/ModalFooter.vue.mjs +44 -0
  78. package/es/modules/global-modal/src/components/ModalFooter.vue2.mjs +5 -0
  79. package/es/modules/global-modal/src/components/ModalHeader.vue.d.ts +17 -0
  80. package/es/modules/global-modal/src/components/ModalHeader.vue.mjs +11 -0
  81. package/es/modules/global-modal/src/components/ModalHeader.vue2.mjs +13 -0
  82. package/es/modules/global-modal/src/components/ModalWrapper.vue.d.ts +95 -0
  83. package/es/modules/global-modal/src/components/ModalWrapper.vue.mjs +26 -0
  84. package/es/modules/global-modal/src/components/ModalWrapper.vue2.mjs +136 -0
  85. package/es/modules/global-modal/src/hooks/useModal.d.ts +6 -0
  86. package/es/modules/global-modal/src/hooks/useModal.mjs +120 -0
  87. package/es/modules/global-modal/src/hooks/useModalContext.d.ts +5 -0
  88. package/es/modules/global-modal/src/hooks/useModalContext.mjs +11 -0
  89. package/es/modules/global-modal/src/hooks/useModalDrag.d.ts +7 -0
  90. package/es/modules/global-modal/src/hooks/useModalDrag.mjs +82 -0
  91. package/es/modules/global-modal/src/hooks/useModalFullScreen.d.ts +11 -0
  92. package/es/modules/global-modal/src/hooks/useModalFullScreen.mjs +16 -0
  93. package/es/modules/global-modal/src/index.css +153 -0
  94. package/es/modules/global-modal/src/props.d.ts +156 -0
  95. package/es/modules/global-modal/src/props.mjs +57 -0
  96. package/es/modules/global-modal/src/typing.d.ts +174 -0
  97. package/es/modules/target-loading/index.d.ts +4 -0
  98. package/es/modules/target-loading/src/createLoading.d.ts +13 -0
  99. package/es/modules/target-loading/src/createLoading.mjs +57 -0
  100. package/es/modules/target-loading/src/target-loading.css +18 -0
  101. package/es/modules/target-loading/src/target-loading.vue.d.ts +57 -0
  102. package/es/modules/target-loading/src/target-loading.vue.mjs +52 -0
  103. package/es/modules/target-loading/src/target-loading.vue3.mjs +7 -0
  104. package/es/modules/target-loading/src/typing.d.ts +9 -0
  105. package/es/modules/target-loading/src/useLoading.d.ts +9 -0
  106. package/es/setup-app.d.ts +1 -0
  107. package/es/setup-app.mjs +4 -0
  108. package/es/types/index.d.ts +190 -0
  109. package/es/utils/index.d.ts +4 -1
  110. package/es/utils/message-util/message-util.d.ts +7 -0
  111. package/es/utils/message-util/message-util.mjs +26 -0
  112. package/es/utils/monaco-loader/monaco-loader.d.ts +59 -0
  113. package/es/utils/monaco-loader/monaco-loader.mjs +88 -0
  114. package/es/utils/overlay-controller/overlay-controller.d.ts +18 -0
  115. package/es/utils/overlay-controller/overlay-controller.mjs +23 -0
  116. package/es/widgets/gct-edit-form/gct-edit-form.d.ts +1 -1
  117. package/es/widgets/gct-form/gct-form-collapse/gct-form-collapse.d.ts +1 -1
  118. package/package.json +14 -6
@@ -0,0 +1,136 @@
1
+ import { defineComponent, ref, watch, computed, watchEffect, unref, onMounted, onUnmounted, nextTick } from 'vue';
2
+ import { useWindowSize, useMutationObserver } from '@vueuse/core';
3
+ import { createModalContext } from '../hooks/useModalContext.mjs';
4
+
5
+ const props = {
6
+ loading: { type: Boolean },
7
+ useWrapper: { type: Boolean, default: true },
8
+ modalHeaderHeight: { type: Number, default: 57 },
9
+ modalFooterHeight: { type: Number, default: 74 },
10
+ minHeight: { type: Number, default: 320 },
11
+ height: { type: Number },
12
+ footerOffset: { type: Number, default: 0 },
13
+ visible: { type: Boolean },
14
+ fullScreen: { type: Boolean },
15
+ loadingTip: { type: String }
16
+ };
17
+ const _sfc_main = defineComponent({
18
+ name: "ModalWrapper",
19
+ inheritAttrs: false,
20
+ props,
21
+ emits: ["height-change", "ext-height"],
22
+ setup(props2, { emit }) {
23
+ const wrapperRef = ref();
24
+ const spinRef = ref(null);
25
+ const realHeightRef = ref(0);
26
+ const minRealHeightRef = ref(0);
27
+ let realHeight = 0;
28
+ const spinStyle = ref();
29
+ const { width, height } = useWindowSize();
30
+ watch([height, width], () => {
31
+ setModalHeight();
32
+ });
33
+ useMutationObserver(
34
+ spinRef,
35
+ () => {
36
+ setModalHeight();
37
+ },
38
+ {
39
+ attributes: true,
40
+ subtree: true
41
+ }
42
+ );
43
+ createModalContext({
44
+ redoModalHeight: setModalHeight
45
+ });
46
+ const scrollHeight = computed(() => {
47
+ const modalheight = window.innerHeight * 0.88 - 120;
48
+ return {
49
+ height: `${props2.height ? modalheight > props2.height - 120 ? props2.height - 120 : modalheight : props2.height}px`
50
+ };
51
+ });
52
+ watchEffect(() => {
53
+ props2.useWrapper && setModalHeight();
54
+ });
55
+ watch(
56
+ () => props2.fullScreen,
57
+ (v) => {
58
+ setModalHeight();
59
+ if (!v) {
60
+ realHeightRef.value = minRealHeightRef.value;
61
+ } else {
62
+ minRealHeightRef.value = realHeightRef.value;
63
+ }
64
+ }
65
+ );
66
+ const observer = new ResizeObserver((entries) => {
67
+ for (let entry of entries) {
68
+ const height2 = entry.contentRect.height;
69
+ const modalheight = height2 * 0.88 - 152;
70
+ spinStyle.value = {
71
+ height: `${props2.height ? modalheight > props2.height - 152 ? props2.height - 152 : modalheight : props2.height}px`,
72
+ minHeight: `${props2.minHeight - 152}px`,
73
+ [props2.fullScreen ? "height" : "maxHeight"]: `${unref(realHeightRef)}px`,
74
+ maxHeight: `calc(88vh - 152px)`
75
+ };
76
+ }
77
+ });
78
+ observer.observe(document.documentElement);
79
+ onMounted(() => {
80
+ const { modalHeaderHeight, modalFooterHeight } = props2;
81
+ emit("ext-height", modalHeaderHeight + modalFooterHeight);
82
+ });
83
+ onUnmounted(() => {
84
+ });
85
+ async function scrollTop() {
86
+ nextTick(() => {
87
+ if (wrapperRef.value) {
88
+ wrapperRef.value.getElement()?.scrollTo(0, 0);
89
+ }
90
+ });
91
+ }
92
+ async function setModalHeight() {
93
+ if (!props2.visible) return;
94
+ if (!wrapperRef.value) {
95
+ return;
96
+ }
97
+ const bodyDom = wrapperRef.value?.getElement()?.parentElement;
98
+ if (!bodyDom) return;
99
+ bodyDom.style.padding = "0";
100
+ await nextTick();
101
+ try {
102
+ const modalDom = bodyDom.parentElement && bodyDom.parentElement.parentElement;
103
+ if (!modalDom) return;
104
+ const modalRect = getComputedStyle(modalDom).top;
105
+ const modalTop = Number.parseInt(modalRect);
106
+ let maxHeight = window.innerHeight - modalTop * 2 + (props2.footerOffset || 0) - props2.modalFooterHeight - props2.modalHeaderHeight;
107
+ if (modalTop < 40) {
108
+ maxHeight -= 26;
109
+ }
110
+ await nextTick();
111
+ const spinEl = unref(spinRef);
112
+ if (!spinEl) return;
113
+ await nextTick();
114
+ realHeight = spinEl.scrollHeight;
115
+ if (props2.fullScreen) {
116
+ realHeightRef.value = window.innerHeight - props2.modalFooterHeight - props2.modalHeaderHeight - 28;
117
+ } else {
118
+ realHeightRef.value = props2.height ? props2.height : realHeight > maxHeight ? maxHeight : realHeight;
119
+ }
120
+ emit("height-change", unref(realHeightRef));
121
+ } catch (error) {
122
+ console.error(error);
123
+ }
124
+ }
125
+ return {
126
+ wrapperRef,
127
+ spinRef,
128
+ spinStyle,
129
+ scrollTop,
130
+ setModalHeight,
131
+ scrollHeight
132
+ };
133
+ }
134
+ });
135
+
136
+ export { _sfc_main as default };
@@ -0,0 +1,6 @@
1
+ import { UseModalReturnType, UseModalInnerReturnType } from '../typing';
2
+ /**
3
+ * @description: Applicable to independent modal and call outside
4
+ */
5
+ export declare function useModal(): UseModalReturnType;
6
+ export declare const useModalInner: (callbackFn?: Fn) => UseModalInnerReturnType;
@@ -0,0 +1,120 @@
1
+ import { reactive, ref, computed, unref, getCurrentInstance, watchEffect, nextTick, onUnmounted, toRaw } from 'vue';
2
+ import { isFunction, isEqual } from 'lodash-es';
3
+ import { tryOnUnmounted } from '@vueuse/core';
4
+
5
+ const dataTransfer = reactive({});
6
+ const visibleData = reactive({});
7
+ function useModal() {
8
+ const modal = ref(null);
9
+ const loaded = ref(false);
10
+ const uid = ref("");
11
+ function register(modalMethod, uuid) {
12
+ if (!getCurrentInstance()) {
13
+ throw new Error(
14
+ "useModal() can only be used inside setup() or functional components!"
15
+ );
16
+ }
17
+ uid.value = uuid || "";
18
+ onUnmounted(() => {
19
+ modal.value = null;
20
+ loaded.value = false;
21
+ dataTransfer[unref(uid)] = null;
22
+ });
23
+ if (unref(loaded) && modalMethod === unref(modal)) return;
24
+ modal.value = modalMethod;
25
+ loaded.value = true;
26
+ modalMethod.emitVisible = (visible, uid2) => {
27
+ visibleData[uid2] = visible;
28
+ };
29
+ }
30
+ const getInstance = () => {
31
+ const instance = unref(modal);
32
+ if (!instance) {
33
+ throw new Error("useModal instance is undefined!");
34
+ }
35
+ return instance;
36
+ };
37
+ const methods = {
38
+ setModalProps: (props) => {
39
+ getInstance()?.setModalProps(props);
40
+ },
41
+ getVisible: computed(() => {
42
+ return visibleData[~~unref(uid)];
43
+ }),
44
+ redoModalHeight: () => {
45
+ getInstance()?.redoModalHeight?.();
46
+ },
47
+ openModal: (visible = true, data, openOnSet = true) => {
48
+ getInstance()?.setModalProps({
49
+ visible
50
+ });
51
+ const id = unref(uid);
52
+ if (openOnSet) {
53
+ dataTransfer[id] = null;
54
+ dataTransfer[id] = toRaw(data);
55
+ return;
56
+ }
57
+ const equal = isEqual(toRaw(dataTransfer[id]), toRaw(data));
58
+ if (!equal) {
59
+ dataTransfer[id] = toRaw(data);
60
+ }
61
+ },
62
+ closeModal: () => {
63
+ getInstance()?.setModalProps({ visible: false });
64
+ }
65
+ };
66
+ return [register, methods];
67
+ }
68
+ const useModalInner = (callbackFn) => {
69
+ const modalInstanceRef = ref(null);
70
+ const currentInstance = getCurrentInstance();
71
+ const uidRef = ref("");
72
+ const getInstance = () => {
73
+ const instance = unref(modalInstanceRef);
74
+ if (!instance) {
75
+ throw new Error("useModalInner instance is undefined!");
76
+ }
77
+ return instance;
78
+ };
79
+ const register = (modalInstance, uuid) => {
80
+ tryOnUnmounted(() => {
81
+ modalInstanceRef.value = null;
82
+ });
83
+ uidRef.value = uuid || "";
84
+ modalInstanceRef.value = modalInstance;
85
+ currentInstance?.emit("register", modalInstance, uuid);
86
+ };
87
+ watchEffect(() => {
88
+ const data = dataTransfer[unref(uidRef)];
89
+ if (!callbackFn || !isFunction(callbackFn)) return;
90
+ nextTick(() => {
91
+ callbackFn(data);
92
+ });
93
+ });
94
+ return [
95
+ register,
96
+ {
97
+ changeLoading: (loading = true) => {
98
+ getInstance()?.setModalProps({ loading });
99
+ },
100
+ getVisible: computed(() => {
101
+ return visibleData[~~unref(uidRef)];
102
+ }),
103
+ changeOkLoading: (loading = true) => {
104
+ getInstance()?.setModalProps({ confirmLoading: loading });
105
+ },
106
+ closeModal: () => {
107
+ getInstance()?.setModalProps({ visible: false });
108
+ },
109
+ setModalProps: (props) => {
110
+ getInstance()?.setModalProps(props);
111
+ },
112
+ redoModalHeight: () => {
113
+ const callRedo = getInstance()?.redoModalHeight;
114
+ callRedo?.();
115
+ }
116
+ }
117
+ ];
118
+ };
119
+
120
+ export { useModal, useModalInner };
@@ -0,0 +1,5 @@
1
+ export interface ModalContextProps {
2
+ redoModalHeight: () => void;
3
+ }
4
+ export declare function createModalContext(context: ModalContextProps): void;
5
+ export declare function useModalContext(): ModalContextProps | undefined;
@@ -0,0 +1,11 @@
1
+ import { provide, inject } from 'vue';
2
+
3
+ const key = /* @__PURE__ */ Symbol();
4
+ function createModalContext(context) {
5
+ return provide(key, context);
6
+ }
7
+ function useModalContext() {
8
+ return inject(key);
9
+ }
10
+
11
+ export { createModalContext, useModalContext };
@@ -0,0 +1,7 @@
1
+ import { Ref } from 'vue';
2
+ export interface UseModalDragMoveContext {
3
+ draggable: Ref<boolean>;
4
+ destroyOnClose: Ref<boolean | undefined> | undefined;
5
+ visible: Ref<boolean>;
6
+ }
7
+ export declare function useModalDragMove(context: UseModalDragMoveContext): void;
@@ -0,0 +1,82 @@
1
+ import { useTimeoutFn } from '@vueuse/core';
2
+ import { watchEffect, unref } from 'vue';
3
+
4
+ function useModalDragMove(context) {
5
+ const getStyle = (dom, attr) => {
6
+ return getComputedStyle(dom)[attr];
7
+ };
8
+ const drag = (wrap) => {
9
+ if (!wrap) return;
10
+ wrap.setAttribute("data-drag", unref(context.draggable));
11
+ const dialogHeaderEl = wrap.querySelector(".ant-modal-header");
12
+ const dragDom = wrap.querySelector(".ant-modal");
13
+ if (!dialogHeaderEl || !dragDom || !unref(context.draggable)) return;
14
+ dialogHeaderEl.style.cursor = "move";
15
+ dialogHeaderEl.onmousedown = (e) => {
16
+ if (!e) return;
17
+ const disX = e.clientX;
18
+ const disY = e.clientY;
19
+ const screenWidth = document.body.clientWidth;
20
+ const screenHeight = document.documentElement.clientHeight;
21
+ const dragDomWidth = dragDom.offsetWidth;
22
+ const dragDomheight = dragDom.offsetHeight;
23
+ const minDragDomLeft = dragDom.offsetLeft;
24
+ const maxDragDomLeft = screenWidth - dragDom.offsetLeft - dragDomWidth;
25
+ const minDragDomTop = dragDom.offsetTop;
26
+ const maxDragDomTop = screenHeight - dragDom.offsetTop - dragDomheight;
27
+ const domLeft = getStyle(dragDom, "left");
28
+ const domTop = getStyle(dragDom, "top");
29
+ let styL = +domLeft;
30
+ let styT = +domTop;
31
+ if (domLeft.includes("%")) {
32
+ styL = +document.body.clientWidth * (+domLeft.replace(/%/g, "") / 100);
33
+ styT = +document.body.clientHeight * (+domTop.replace(/%/g, "") / 100);
34
+ } else {
35
+ styL = +domLeft.replace(/px/g, "");
36
+ styT = +domTop.replace(/px/g, "");
37
+ }
38
+ document.onmousemove = function(e2) {
39
+ let left = e2.clientX - disX;
40
+ let top = e2.clientY - disY;
41
+ if (-left > minDragDomLeft) {
42
+ left = -minDragDomLeft;
43
+ } else if (left > maxDragDomLeft) {
44
+ left = maxDragDomLeft;
45
+ }
46
+ if (-top > minDragDomTop) {
47
+ top = -minDragDomTop;
48
+ } else if (top > maxDragDomTop) {
49
+ top = maxDragDomTop;
50
+ }
51
+ dragDom.style.cssText += `;left:${left + styL}px;top:${top + styT}px;`;
52
+ };
53
+ document.onmouseup = () => {
54
+ document.onmousemove = null;
55
+ document.onmouseup = null;
56
+ };
57
+ };
58
+ };
59
+ const handleDrag = () => {
60
+ const dragWraps = document.querySelectorAll(".ant-modal-wrap");
61
+ for (const wrap of Array.from(dragWraps)) {
62
+ if (!wrap) continue;
63
+ const display = getStyle(wrap, "display");
64
+ const draggable = wrap.getAttribute("data-drag");
65
+ if (display !== "none") {
66
+ if (draggable === null || unref(context.destroyOnClose)) {
67
+ drag(wrap);
68
+ }
69
+ }
70
+ }
71
+ };
72
+ watchEffect(() => {
73
+ if (!unref(context.visible) || !unref(context.draggable)) {
74
+ return;
75
+ }
76
+ useTimeoutFn(() => {
77
+ handleDrag();
78
+ }, 30);
79
+ });
80
+ }
81
+
82
+ export { useModalDragMove };
@@ -0,0 +1,11 @@
1
+ import { Component, Ref } from 'vue';
2
+ export interface UseFullScreenContext {
3
+ wrapClassName: Ref<string | undefined>;
4
+ modalWrapperRef: Ref<Component>;
5
+ extHeightRef: Ref<number>;
6
+ }
7
+ export declare function useFullScreen(context: UseFullScreenContext): {
8
+ getWrapClassName: import('vue').ComputedRef<string>;
9
+ handleFullScreen: (e: Event) => void;
10
+ fullScreenRef: Ref<boolean, boolean>;
11
+ };
@@ -0,0 +1,16 @@
1
+ import { ref, computed, unref } from 'vue';
2
+
3
+ function useFullScreen(context) {
4
+ const fullScreenRef = ref(false);
5
+ const getWrapClassName = computed(() => {
6
+ const clsName = unref(context.wrapClassName) || "";
7
+ return unref(fullScreenRef) ? `fullscreen-modal ${clsName} ` : unref(clsName);
8
+ });
9
+ function handleFullScreen(e) {
10
+ e?.stopPropagation();
11
+ fullScreenRef.value = !unref(fullScreenRef);
12
+ }
13
+ return { getWrapClassName, handleFullScreen, fullScreenRef };
14
+ }
15
+
16
+ export { useFullScreen };
@@ -0,0 +1,153 @@
1
+ .vben.fullscreen-modal {
2
+ overflow: hidden;
3
+ }
4
+ .vben.fullscreen-modal .ant-modal {
5
+ inset: 0 !important;
6
+ width: 100% !important;
7
+ max-width: 100vw !important;
8
+ height: 100%;
9
+ }
10
+ .vben.fullscreen-modal .ant-modal-content {
11
+ height: 100%;
12
+ }
13
+ .vben .ant-modal {
14
+ width: 520px;
15
+ padding-bottom: 0;
16
+ }
17
+ .vben .ant-modal .ant-modal-body > .scrollbar {
18
+ height: 100%;
19
+ padding: 14px;
20
+ }
21
+ .vben .ant-modal .ant-modal-body > .scrollbar .scrollbar__wrap {
22
+ max-height: calc(88vh - 152px);
23
+ }
24
+ .vben .ant-modal-title {
25
+ font-size: 16px;
26
+ font-weight: bold;
27
+ }
28
+ .vben .ant-modal-title .base-title {
29
+ cursor: move !important;
30
+ }
31
+ .vben .ant-modal .ant-modal-body {
32
+ height: calc(100% - 120px);
33
+ max-height: calc(88vh - 120px);
34
+ padding: 0;
35
+ }
36
+ .vben .ant-modal .ant-modal-body > .scrollbar > .scrollbar__bar.is-horizontal {
37
+ display: none;
38
+ }
39
+ .vben .ant-modal-large {
40
+ top: 60px;
41
+ }
42
+ .vben .ant-modal-large--mini {
43
+ top: 16px;
44
+ }
45
+ .vben .ant-modal-header {
46
+ padding: 16px;
47
+ }
48
+ .vben .ant-modal-content {
49
+ box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
50
+ }
51
+ .vben .ant-modal-footer {
52
+ padding: 16px;
53
+ }
54
+ .vben .ant-modal-footer button + button {
55
+ margin-left: 16px;
56
+ }
57
+ .vben .ant-modal-close {
58
+ outline: none;
59
+ font-weight: normal;
60
+ }
61
+ .vben .ant-modal-close-x {
62
+ display: inline-block;
63
+ width: 96px;
64
+ height: 56px;
65
+ line-height: 56px;
66
+ }
67
+ .vben .ant-modal-confirm-body .ant-modal-confirm-content > * {
68
+ color: #909399;
69
+ }
70
+ .vben .ant-modal-confirm-confirm.error .ant-modal-confirm-body > .anticon {
71
+ color: var(--gct-color-error);
72
+ }
73
+ .vben .ant-modal-confirm-btns .ant-btn:last-child {
74
+ margin-right: 0;
75
+ }
76
+ .vben .ant-modal-confirm-info .ant-modal-confirm-body > .anticon {
77
+ color: var(--gct-color-warning);
78
+ }
79
+ .vben .ant-modal-confirm-confirm.success .ant-modal-confirm-body > .anticon {
80
+ color: var(--gct-color-success);
81
+ }
82
+ .vben .ant-modal-confirm .ant-modal-body {
83
+ padding: 24px !important;
84
+ }
85
+ /* stylelint-disable-next-line media-feature-range-notation */
86
+ @media screen and (max-height: 600px) {
87
+ .ant-modal {
88
+ top: 60px;
89
+ }
90
+ }
91
+ /* stylelint-disable-next-line media-feature-range-notation */
92
+ @media screen and (max-height: 540px) {
93
+ .ant-modal {
94
+ top: 30px;
95
+ }
96
+ }
97
+ /* stylelint-disable-next-line media-feature-range-notation */
98
+ @media screen and (max-height: 480px) {
99
+ .ant-modal {
100
+ top: 10px;
101
+ }
102
+ }
103
+ .options-field-modal.ant-modal .ant-modal-content .ant-modal-body {
104
+ padding-bottom: 0;
105
+ }
106
+ .ant-modal-footer .ant-btn + .ant-btn:not(.ant-dropdown-trigger) {
107
+ margin-left: 16px;
108
+ }
109
+ .ant-modal {
110
+ max-height: 88vh;
111
+ }
112
+ .ant-modal .ant-modal-content {
113
+ border-radius: 4px;
114
+ }
115
+ .ant-modal.ant-modal-confirm .ant-modal-body {
116
+ padding: 16px;
117
+ }
118
+ .ant-modal .ant-modal-confirm-body > .anticon {
119
+ margin-right: 8px;
120
+ }
121
+ .ant-modal .ant-modal-confirm-body > .anticon .iconfont {
122
+ top: 4px !important;
123
+ font-size: 14px;
124
+ }
125
+ .ant-modal .ant-modal-confirm-body > .anticon > svg {
126
+ width: 14px;
127
+ height: 14px;
128
+ margin-top: 3px;
129
+ }
130
+ .ant-modal .ant-modal-confirm-body > .ant-modal-confirm-title {
131
+ color: #1a1d23;
132
+ font-size: 14px;
133
+ line-height: unset;
134
+ }
135
+ .ant-modal .ant-modal-confirm-body > .ant-modal-confirm-content {
136
+ color: #5a5f6b;
137
+ font-size: 12px;
138
+ }
139
+ .ant-modal .ant-modal-confirm-body .anticon + .ant-modal-confirm-title + .ant-modal-confirm-content {
140
+ margin-left: 22px;
141
+ }
142
+ .ant-modal .ant-modal-confirm-btns {
143
+ margin-top: 12px;
144
+ }
145
+ .ant-modal .ant-modal-confirm-btns > .ant-btn {
146
+ height: 24px;
147
+ padding: 2px 10px;
148
+ color: #384356;
149
+ line-height: 16px;
150
+ }
151
+ .ant-modal .ant-modal-confirm-btns > .ant-btn.ant-btn-primary {
152
+ color: #fff;
153
+ }