@gct-paas/core-web 0.1.4-dev.7 → 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 -7924
- package/dist/index.min.cjs +1 -20
- package/dist/index.min.css +1 -0
- package/dist/index.system.min.js +1 -20
- 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/assets-svg-icon/assets-svg-icon.css +188 -0
- package/es/components/assets-svg-icon/assets-svg-icon.d.ts +134 -0
- package/es/components/assets-svg-icon/assets-svg-icon.mjs +238 -0
- package/es/components/assets-svg-icon/request.d.ts +2 -0
- package/es/components/assets-svg-icon/request.mjs +51 -0
- package/es/components/assets-svg-icon/utils.d.ts +9 -0
- package/es/components/assets-svg-icon/utils.mjs +21 -0
- package/es/components/assets-svg-icon/validate.d.ts +4 -0
- package/es/components/assets-svg-icon/validate.mjs +43 -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.css +67 -0
- package/es/components/code-editor/code-editor.d.ts +1 -1
- package/es/components/code-editor/code-editor.mjs +9 -10
- package/es/components/index.d.ts +10 -0
- package/es/components/index.mjs +21 -6
- package/es/components/layout/flex-container/flex-container.css +67 -0
- package/es/components/layout/flex-container/flex-container.mjs +13 -9
- package/es/components/layout/flex-item/flex-item.mjs +11 -9
- package/es/components/layout/grid-container/grid-container.mjs +11 -7
- package/es/components/layout/view-container/view-container.css +83 -0
- package/es/components/layout/view-container/view-container.mjs +6 -7
- 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/editor/gct-form-check-switch/gct-form-check-switch.d.ts +1 -1
- package/es/editor/gct-form-i18n/gct-form-i18n.d.ts +1 -1
- package/es/editor/gct-form-info/gct-form-info.d.ts +1 -1
- package/es/editor/gct-form-length-unit/gct-form-length-unit.d.ts +1 -1
- package/es/editor/gct-form-number/gct-form-number.d.ts +1 -1
- package/es/editor/gct-form-radio/gct-form-radio.d.ts +1 -1
- package/es/editor/gct-form-select/gct-form-select.d.ts +1 -1
- package/es/editor/gct-form-switch/gct-form-switch.d.ts +1 -1
- package/es/editor/gct-form-textarea/gct-form-textarea.d.ts +1 -1
- package/es/hooks/index.d.ts +3 -0
- package/es/hooks/useDragLine.d.ts +6 -0
- package/es/hooks/useDragLine.mjs +79 -0
- package/es/hooks/useLocale.d.ts +4 -0
- package/es/hooks/useLocale.mjs +32 -0
- package/es/hooks/useTheme.d.ts +8 -0
- package/es/hooks/useTheme.mjs +20 -0
- package/es/index.d.ts +7 -7
- package/es/index.mjs +35 -24
- 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/components/gct-dnd-container/gct-dnd-container.css +72 -0
- package/es/modules/gct-dnd/components/gct-dnd-container/gct-dnd-container.d.ts +37 -0
- package/es/modules/gct-dnd/components/gct-dnd-container/gct-dnd-container.mjs +195 -0
- package/es/modules/gct-dnd/components/gct-dnd-drop-line/gct-dnd-drop-line.css +79 -0
- package/es/modules/gct-dnd/components/gct-dnd-drop-line/gct-dnd-drop-line.d.ts +29 -0
- package/es/modules/gct-dnd/components/gct-dnd-drop-line/gct-dnd-drop-line.mjs +98 -0
- package/es/modules/gct-dnd/components/gct-dnd-item/gct-dnd-item.css +70 -0
- package/es/modules/gct-dnd/components/gct-dnd-item/gct-dnd-item.d.ts +50 -0
- package/es/modules/gct-dnd/components/gct-dnd-item/gct-dnd-item.mjs +239 -0
- package/es/modules/gct-dnd/constants/index.d.ts +22 -0
- package/es/modules/gct-dnd/constants/index.mjs +20 -0
- package/es/modules/gct-dnd/index.d.ts +5 -0
- package/es/modules/gct-dnd/interface/i-gct-dnd-config.d.ts +101 -0
- package/es/modules/gct-dnd/interface/i-gct-dnd-data.d.ts +14 -0
- package/es/modules/gct-dnd/interface/i-gct-dnd-render-item-options.d.ts +28 -0
- package/es/modules/gct-dnd/interface/i-gct-drag-collect.d.ts +24 -0
- package/es/modules/gct-dnd/interface/i-gct-drag-dnd-data.d.ts +51 -0
- package/es/modules/gct-dnd/interface/i-gct-drop-collect.d.ts +32 -0
- package/es/modules/gct-dnd/interface/i-gct-drop-result.d.ts +47 -0
- package/es/modules/gct-dnd/interface/index.d.ts +7 -0
- 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/utils/with-install.mjs +0 -1
- 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 +19 -8
- package/dist/index.min.css.css +0 -1
- package/es/components/code-editor/code-editor.scss +0 -3
- package/es/components/layout/flex-container/flex-container.scss +0 -3
- package/es/components/layout/flex-item/flex-item.scss +0 -17
- package/es/components/layout/view-container/view-container.scss +0 -19
- package/es/editor/gct-form-check-switch/gct-form-check-switch.mjs +0 -53
- package/es/editor/gct-form-check-switch/gct-form-check-switch.provider.mjs +0 -6
- package/es/editor/gct-form-check-switch/gct-form-check-switch.scss +0 -10
- package/es/editor/gct-form-check-switch/index.mjs +0 -12
- package/es/editor/gct-form-checkbox/gct-form-checkbox.mjs +0 -70
- package/es/editor/gct-form-checkbox/gct-form-checkbox.scss +0 -56
- package/es/editor/gct-form-checkbox/index.mjs +0 -19
- package/es/editor/gct-form-color/gct-form-color.mjs +0 -45
- package/es/editor/gct-form-color/gct-form-color.provider.mjs +0 -6
- package/es/editor/gct-form-color/gct-form-color.scss +0 -3
- package/es/editor/gct-form-color/index.mjs +0 -17
- package/es/editor/gct-form-field-select/gct-form-field-select.mjs +0 -48
- package/es/editor/gct-form-field-select/gct-form-field-select.provider.mjs +0 -6
- package/es/editor/gct-form-field-select/gct-form-field-select.scss +0 -7
- package/es/editor/gct-form-field-select/gct-model-select.vue +0 -70
- package/es/editor/gct-form-field-select/index.mjs +0 -12
- package/es/editor/gct-form-i18n/gct-form-i18n.mjs +0 -62
- package/es/editor/gct-form-i18n/gct-form-i18n.provider.mjs +0 -6
- package/es/editor/gct-form-i18n/index.mjs +0 -12
- package/es/editor/gct-form-icon-select/gct-form-icon-select.mjs +0 -74
- package/es/editor/gct-form-icon-select/gct-form-icon-select.scss +0 -14
- package/es/editor/gct-form-icon-select/index.mjs +0 -14
- package/es/editor/gct-form-info/gct-form-info.mjs +0 -40
- package/es/editor/gct-form-info/gct-form-info.scss +0 -8
- package/es/editor/gct-form-info/index.mjs +0 -14
- package/es/editor/gct-form-length-unit/gct-form-length-unit.mjs +0 -43
- package/es/editor/gct-form-length-unit/gct-form-length-unit.provider.mjs +0 -6
- package/es/editor/gct-form-length-unit/index.mjs +0 -12
- package/es/editor/gct-form-modal-select/gct-form-modal-select.mjs +0 -99
- package/es/editor/gct-form-modal-select/gct-form-modal-select.provider.mjs +0 -6
- package/es/editor/gct-form-modal-select/gct-form-modal-select.scss +0 -7
- package/es/editor/gct-form-modal-select/index.mjs +0 -12
- package/es/editor/gct-form-number/gct-form-number.mjs +0 -44
- package/es/editor/gct-form-number/gct-form-number.provider.mjs +0 -6
- package/es/editor/gct-form-number/gct-form-number.scss +0 -3
- package/es/editor/gct-form-number/index.mjs +0 -17
- package/es/editor/gct-form-picker/gct-form-picker.mjs +0 -92
- package/es/editor/gct-form-picker/gct-form-picker.provider.mjs +0 -6
- package/es/editor/gct-form-picker/index.mjs +0 -12
- package/es/editor/gct-form-radio/gct-form-radio.mjs +0 -70
- package/es/editor/gct-form-radio/gct-form-radio.scss +0 -68
- package/es/editor/gct-form-radio/index.mjs +0 -19
- package/es/editor/gct-form-select/gct-form-select.mjs +0 -50
- package/es/editor/gct-form-select/gct-form-select.provider.mjs +0 -6
- package/es/editor/gct-form-select/index.mjs +0 -12
- package/es/editor/gct-form-span/gct-form-span.mjs +0 -89
- package/es/editor/gct-form-span/gct-form-span.provider.mjs +0 -6
- package/es/editor/gct-form-span/gct-form-span.scss +0 -10
- package/es/editor/gct-form-span/index.mjs +0 -12
- package/es/editor/gct-form-switch/gct-form-switch.mjs +0 -35
- package/es/editor/gct-form-switch/gct-form-switch.provider.mjs +0 -6
- package/es/editor/gct-form-switch/index.mjs +0 -17
- package/es/editor/gct-form-text/gct-form-text.mjs +0 -45
- package/es/editor/gct-form-text/gct-form-text.provider.mjs +0 -6
- package/es/editor/gct-form-text/index.mjs +0 -17
- package/es/editor/gct-form-textarea/gct-form-textarea.mjs +0 -40
- package/es/editor/gct-form-textarea/gct-form-textarea.provider.mjs +0 -6
- package/es/editor/gct-form-textarea/index.mjs +0 -12
- package/es/editor/index.mjs +0 -51
- package/es/utils/index.mjs +0 -3
- package/es/vite-env.d.ts +0 -1
- package/es/widgets/gct-edit-form/gct-edit-form.mjs +0 -126
- package/es/widgets/gct-edit-form/index.mjs +0 -10
- package/es/widgets/gct-form/gct-form-collapse/gct-form-collapse.mjs +0 -73
- package/es/widgets/gct-form/gct-form-collapse/gct-form-collapse.provider.mjs +0 -11
- package/es/widgets/gct-form/gct-form-collapse/gct-form-collapse.scss +0 -62
- package/es/widgets/gct-form/gct-form-collapse/index.mjs +0 -15
- package/es/widgets/gct-form/gct-form-collapse-pane/gct-form-collapse-pane.mjs +0 -71
- package/es/widgets/gct-form/gct-form-collapse-pane/gct-form-collapse-pane.provider.mjs +0 -13
- package/es/widgets/gct-form/gct-form-collapse-pane/gct-form-collapse-pane.scss +0 -23
- package/es/widgets/gct-form/gct-form-collapse-pane/index.mjs +0 -15
- package/es/widgets/gct-form/gct-form-group/gct-form-group.mjs +0 -88
- package/es/widgets/gct-form/gct-form-group/gct-form-group.provider.mjs +0 -11
- package/es/widgets/gct-form/gct-form-group/gct-form-group.scss +0 -28
- package/es/widgets/gct-form/gct-form-group/index.mjs +0 -15
- package/es/widgets/gct-form/gct-form-hidden-item/gct-form-hidden-item.provider.mjs +0 -13
- package/es/widgets/gct-form/gct-form-item/gct-form-item.mjs +0 -141
- package/es/widgets/gct-form/gct-form-item/gct-form-item.provider.mjs +0 -11
- package/es/widgets/gct-form/gct-form-item/gct-form-item.scss +0 -115
- package/es/widgets/gct-form/gct-form-tab/gct-form-tab.mjs +0 -53
- package/es/widgets/gct-form/gct-form-tab/gct-form-tab.provider.mjs +0 -11
- package/es/widgets/gct-form/gct-form-tab/gct-form-tab.scss +0 -63
- package/es/widgets/gct-form/gct-form-tab/index.mjs +0 -12
- package/es/widgets/gct-form/gct-form-tab-pane/gct-form-tab-pane.mjs +0 -65
- package/es/widgets/gct-form/gct-form-tab-pane/gct-form-tab-pane.provider.mjs +0 -11
- package/es/widgets/gct-form/gct-form-tab-pane/gct-form-tab-pane.scss +0 -16
- package/es/widgets/gct-form/gct-form-tab-pane/index.mjs +0 -15
- package/es/widgets/gct-form/gct-form-title-group/gct-form-title-group.mjs +0 -71
- package/es/widgets/gct-form/gct-form-title-group/gct-form-title-group.provider.mjs +0 -11
- package/es/widgets/gct-form/gct-form-title-group/gct-form-title-group.scss +0 -25
- package/es/widgets/gct-form/gct-form-title-group/index.mjs +0 -16
- package/es/widgets/gct-form/gct-form.mjs +0 -112
- package/es/widgets/gct-form/gct-form.scss +0 -11
- package/es/widgets/gct-form/index.mjs +0 -31
|
@@ -11,7 +11,7 @@ export declare const GctFormTextarea: import('vue').DefineComponent<import('vue'
|
|
|
11
11
|
};
|
|
12
12
|
}>, {
|
|
13
13
|
ns: import('@gct-paas/core').Namespace;
|
|
14
|
-
val: import('vue').WritableComputedRef<any, any
|
|
14
|
+
val: import('vue').WritableComputedRef<any, any>;
|
|
15
15
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "update:value"[], "update:value", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
16
16
|
model: {
|
|
17
17
|
type: PropType<ITextareaEditor>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { COLUMNS_TYPE } from '@gct-paas/core';
|
|
2
|
+
export declare function UseDragByLine(startValue: number, rowType: COLUMNS_TYPE, config?: IObject): {
|
|
3
|
+
moveDomDown: (event: MouseEvent, el: HTMLElement, onMouseUp?: () => void) => void;
|
|
4
|
+
moveMobileDomDown: (event: TouchEvent, el: HTMLElement, onTouchEnd?: () => void) => void;
|
|
5
|
+
start: import('vue').WritableComputedRef<any, any>;
|
|
6
|
+
};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { ref, reactive, computed } from 'vue';
|
|
2
|
+
import '@gct-paas/core';
|
|
3
|
+
|
|
4
|
+
function UseDragByLine(startValue, rowType, config = {}) {
|
|
5
|
+
const minValue = config.minValue ?? 10;
|
|
6
|
+
const startMove = ref(startValue);
|
|
7
|
+
const dragData = reactive({
|
|
8
|
+
offset: "offsetWidth",
|
|
9
|
+
client: "clientX",
|
|
10
|
+
clientMove: 0,
|
|
11
|
+
rowType,
|
|
12
|
+
offsetWidth: 2e3
|
|
13
|
+
});
|
|
14
|
+
function moveDomDown(event, el, onMouseUp) {
|
|
15
|
+
const elRecord = el;
|
|
16
|
+
const eventRecord = event;
|
|
17
|
+
dragData.offsetWidth = elRecord[dragData.offset] ?? 0;
|
|
18
|
+
dragData.clientMove = eventRecord[dragData.client] ?? 0;
|
|
19
|
+
event.preventDefault();
|
|
20
|
+
document.onmousemove = (e) => {
|
|
21
|
+
moveHandle(
|
|
22
|
+
e[dragData.client] ?? 0
|
|
23
|
+
);
|
|
24
|
+
};
|
|
25
|
+
document.onmouseup = () => {
|
|
26
|
+
document.onmouseup = null;
|
|
27
|
+
document.onmousemove = null;
|
|
28
|
+
onMouseUp?.();
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
function moveMobileDomDown(event, el, onTouchEnd) {
|
|
32
|
+
const elRecord = el;
|
|
33
|
+
const touch = event.touches[0];
|
|
34
|
+
if (!touch) return;
|
|
35
|
+
dragData.offsetWidth = elRecord[dragData.offset] ?? 0;
|
|
36
|
+
dragData.clientMove = touch[dragData.client] ?? 0;
|
|
37
|
+
event.preventDefault();
|
|
38
|
+
document.ontouchmove = (e) => {
|
|
39
|
+
moveHandle(
|
|
40
|
+
e.touches[0][dragData.client] ?? 0
|
|
41
|
+
);
|
|
42
|
+
};
|
|
43
|
+
document.ontouchend = () => {
|
|
44
|
+
document.ontouchend = null;
|
|
45
|
+
document.ontouchmove = null;
|
|
46
|
+
onTouchEnd?.();
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
function moveHandle(clientX) {
|
|
50
|
+
const computedX = clientX - dragData.clientMove;
|
|
51
|
+
const changeWidth = transformWidth(startMove.value) + computedX;
|
|
52
|
+
startMove.value = transformWidth(changeWidth);
|
|
53
|
+
dragData.clientMove = clientX;
|
|
54
|
+
}
|
|
55
|
+
function transformWidth(width) {
|
|
56
|
+
if (dragData.rowType === "right" || dragData.rowType === "bottom") {
|
|
57
|
+
return dragData.offsetWidth - width;
|
|
58
|
+
} else {
|
|
59
|
+
return width;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
const start = computed({
|
|
63
|
+
get() {
|
|
64
|
+
if (startMove.value < minValue) {
|
|
65
|
+
return minValue;
|
|
66
|
+
}
|
|
67
|
+
if (startMove.value > dragData.offsetWidth - minValue) {
|
|
68
|
+
return dragData.offsetWidth - minValue;
|
|
69
|
+
}
|
|
70
|
+
return startMove.value;
|
|
71
|
+
},
|
|
72
|
+
set(v) {
|
|
73
|
+
startMove.value = v;
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
return { moveDomDown, moveMobileDomDown, start };
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export { UseDragByLine };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { computed } from 'vue';
|
|
2
|
+
import antdLocaleCn from 'ant-design-vue/es/locale/zh_CN';
|
|
3
|
+
import antdLocaleUs from 'ant-design-vue/es/locale/en_US';
|
|
4
|
+
import antdLocalePt from 'ant-design-vue/es/locale/pt_PT';
|
|
5
|
+
import antdLocaleTr from 'ant-design-vue/es/locale/tr_TR';
|
|
6
|
+
import antdLocaleTw from 'ant-design-vue/es/locale/zh_TW';
|
|
7
|
+
import antdLocaleJp from 'ant-design-vue/es/locale/ja_JP';
|
|
8
|
+
import antdLocaleVn from 'ant-design-vue/es/locale/vi_VN';
|
|
9
|
+
import antdLocaleDe from 'ant-design-vue/es/locale/de_DE';
|
|
10
|
+
import antdLocaleFr from 'ant-design-vue/es/locale/fr_FR';
|
|
11
|
+
import antdLocaleEs from 'ant-design-vue/es/locale/es_ES';
|
|
12
|
+
import antdLocaleRu from 'ant-design-vue/es/locale/ru_RU';
|
|
13
|
+
|
|
14
|
+
const antdMap = {
|
|
15
|
+
"zh-CN": antdLocaleCn,
|
|
16
|
+
"en-US": antdLocaleUs,
|
|
17
|
+
"pt-PT": antdLocalePt,
|
|
18
|
+
"tr-TR": antdLocaleTr,
|
|
19
|
+
"zh-TW": antdLocaleTw,
|
|
20
|
+
"ja-JP": antdLocaleJp,
|
|
21
|
+
"vi-VN": antdLocaleVn,
|
|
22
|
+
"de-GE": antdLocaleDe,
|
|
23
|
+
"fr-FR": antdLocaleFr,
|
|
24
|
+
"es-ES": antdLocaleEs,
|
|
25
|
+
"ru-RU": antdLocaleRu
|
|
26
|
+
};
|
|
27
|
+
function useLocale() {
|
|
28
|
+
const getAntdLocale = computed(() => antdMap[_gct.store.getLang]);
|
|
29
|
+
return { getAntdLocale };
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export { useLocale };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { reactive } from 'vue';
|
|
2
|
+
import { ConfigProvider } from 'ant-design-vue';
|
|
3
|
+
|
|
4
|
+
const themeVars = reactive({});
|
|
5
|
+
function useTheme() {
|
|
6
|
+
function setPrimaryColor(color) {
|
|
7
|
+
themeVars.primaryColor = color;
|
|
8
|
+
ConfigProvider.config({
|
|
9
|
+
theme: {
|
|
10
|
+
primaryColor: color
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
return {
|
|
15
|
+
themeVars,
|
|
16
|
+
setPrimaryColor
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export { useTheme };
|
package/es/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
import { CodeEditor } from './components';
|
|
3
|
-
declare const _default: {
|
|
4
|
-
install(app: App): void;
|
|
5
|
-
};
|
|
6
|
-
export default _default;
|
|
1
|
+
export * from './hooks';
|
|
7
2
|
export * from './utils';
|
|
8
|
-
export
|
|
3
|
+
export * from './modules/code-editor';
|
|
4
|
+
export * from './modules/gct-dnd';
|
|
5
|
+
export * from './modules/global-modal';
|
|
6
|
+
export * from './components';
|
|
7
|
+
export { coreWebCreateAppVue } from './create-app-vue';
|
|
8
|
+
export { coreWebSetupApp } from './setup-app';
|
package/es/index.mjs
CHANGED
|
@@ -1,27 +1,38 @@
|
|
|
1
|
-
import './
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import './utils/index.mjs';
|
|
6
|
-
import { CodeEditor } from './components/code-editor/code-editor.mjs';
|
|
7
|
-
import { FlexContainer } from './components/layout/flex-container/flex-container.mjs';
|
|
8
|
-
import { FlexItem } from './components/layout/flex-item/flex-item.mjs';
|
|
9
|
-
import { GridContainer } from './components/layout/grid-container/grid-container.mjs';
|
|
10
|
-
import { ViewContainer } from './components/layout/view-container/view-container.mjs';
|
|
1
|
+
import { MessageUtil } from './utils/message-util/message-util.mjs';
|
|
2
|
+
import './components/svg-icon/svg-icon.css';export { monacoLoader } from './utils/monaco-loader/monaco-loader.mjs';
|
|
3
|
+
import { overlay } from './utils/overlay-controller/overlay-controller.mjs';
|
|
4
|
+
export { OverlayController } from './utils/overlay-controller/overlay-controller.mjs';
|
|
11
5
|
export { withInstall } from './utils/with-install.mjs';
|
|
6
|
+
export { useLocale } from './hooks/useLocale.mjs';
|
|
7
|
+
export { useTheme } from './hooks/useTheme.mjs';
|
|
8
|
+
export { UseDragByLine } from './hooks/useDragLine.mjs';
|
|
9
|
+
export { MonacoEditor } from './modules/code-editor/index.mjs';
|
|
10
|
+
export { GctDndContainer } from './modules/gct-dnd/components/gct-dnd-container/gct-dnd-container.mjs';
|
|
11
|
+
export { GctDndDropLine } from './modules/gct-dnd/components/gct-dnd-drop-line/gct-dnd-drop-line.mjs';
|
|
12
|
+
export { GctDndItem } from './modules/gct-dnd/components/gct-dnd-item/gct-dnd-item.mjs';
|
|
13
|
+
export { GCT_DND_INSERT_POS } from './modules/gct-dnd/constants/index.mjs';
|
|
14
|
+
export { BasicModal } from './modules/global-modal/index.mjs';
|
|
15
|
+
export { default as SvgIcon } from './components/svg-icon/svg-icon.vue.mjs';
|
|
16
|
+
/* empty css */
|
|
17
|
+
export { AssetsSvgIcon } from './components/assets-svg-icon/assets-svg-icon.mjs';
|
|
18
|
+
export { default as BaseButton } from './components/base-button/base-button.vue.mjs';
|
|
19
|
+
export { default as BasicButton } from './components/basic-button/basic-button.vue.mjs';
|
|
20
|
+
export { CodeEditor } from './components/code-editor/code-editor.mjs';
|
|
21
|
+
export { FlexContainer } from './components/layout/flex-container/flex-container.mjs';
|
|
22
|
+
export { FlexItem } from './components/layout/flex-item/flex-item.mjs';
|
|
23
|
+
export { GridContainer } from './components/layout/grid-container/grid-container.mjs';
|
|
24
|
+
export { ViewContainer } from './components/layout/view-container/view-container.mjs';
|
|
25
|
+
export { coreWebCreateAppVue } from './create-app-vue.mjs';
|
|
26
|
+
export { coreWebSetupApp } from './setup-app.mjs';
|
|
27
|
+
export { Lang, Prop, Theme } from './modules/code-editor/useMonacoEditor.mjs';
|
|
28
|
+
export { useEditorConsole, useEditorConsoleInner } from './modules/code-editor/useEditorConsole.mjs';
|
|
29
|
+
export { useModal, useModalInner } from './modules/global-modal/src/hooks/useModal.mjs';
|
|
30
|
+
export { useModalContext } from './modules/global-modal/src/hooks/useModalContext.mjs';
|
|
12
31
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
app.use(GctForm);
|
|
19
|
-
app.component(CodeEditor.name, CodeEditor);
|
|
20
|
-
app.component(FlexContainer.name, FlexContainer);
|
|
21
|
-
app.component(FlexItem.name, FlexItem);
|
|
22
|
-
app.component(GridContainer.name, GridContainer);
|
|
23
|
-
app.component(ViewContainer.name, ViewContainer);
|
|
24
|
-
}
|
|
25
|
-
};
|
|
32
|
+
function onInit() {
|
|
33
|
+
_gct.message = new MessageUtil();
|
|
34
|
+
_gct.openUtil = overlay;
|
|
35
|
+
}
|
|
36
|
+
onInit();
|
|
26
37
|
|
|
27
|
-
export {
|
|
38
|
+
export { MessageUtil, overlay };
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
export declare const MonacoEditor: {
|
|
2
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./monaco-editor.vue').Prop> & Readonly<{
|
|
3
|
+
onBlur?: ((...args: any[]) => any) | undefined;
|
|
4
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
5
|
+
onFocus?: ((...args: any[]) => any) | undefined;
|
|
6
|
+
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
7
|
+
"onEditor-mounted"?: ((...args: any[]) => any) | undefined;
|
|
8
|
+
"onChat-bot-click"?: ((...args: any[]) => any) | undefined;
|
|
9
|
+
}>, {
|
|
10
|
+
isMonacoReady: import('vue').Ref<boolean, boolean>;
|
|
11
|
+
reload(newVal: string): void;
|
|
12
|
+
getMonacoEditor: () => any;
|
|
13
|
+
setEditorContent: (val: string) => void;
|
|
14
|
+
getEditorContent: () => any;
|
|
15
|
+
scrollToTop: () => void;
|
|
16
|
+
scrollToBottom: () => void;
|
|
17
|
+
setEditorWordWrap: () => void;
|
|
18
|
+
setEditorTheme: () => void;
|
|
19
|
+
handleFullScreenClick: () => void;
|
|
20
|
+
handleDownloadLogClick: () => void;
|
|
21
|
+
getEditorMarkers: () => any;
|
|
22
|
+
handleFormatCodeClick: () => void;
|
|
23
|
+
getValue: () => any;
|
|
24
|
+
setValue: (code: string) => void;
|
|
25
|
+
getSelectCode: () => {
|
|
26
|
+
text: any;
|
|
27
|
+
textBefore: any;
|
|
28
|
+
textAfter: any;
|
|
29
|
+
} | {
|
|
30
|
+
text?: undefined;
|
|
31
|
+
textBefore?: undefined;
|
|
32
|
+
textAfter?: undefined;
|
|
33
|
+
};
|
|
34
|
+
isChatBotActive: import('vue').Ref<boolean, boolean>;
|
|
35
|
+
handleChatBotClick: () => void;
|
|
36
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
37
|
+
blur: (...args: any[]) => void;
|
|
38
|
+
change: (...args: any[]) => void;
|
|
39
|
+
focus: (...args: any[]) => void;
|
|
40
|
+
"update:value": (...args: any[]) => void;
|
|
41
|
+
"editor-mounted": (...args: any[]) => void;
|
|
42
|
+
"chat-bot-click": (...args: any[]) => void;
|
|
43
|
+
}, import('vue').PublicProps, {
|
|
44
|
+
title: string;
|
|
45
|
+
direction: "top" | "bottom";
|
|
46
|
+
theme: import('./useMonacoEditor').Theme;
|
|
47
|
+
value: string | null;
|
|
48
|
+
language: string;
|
|
49
|
+
readonly: boolean;
|
|
50
|
+
gapVal: number;
|
|
51
|
+
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
52
|
+
Editor: HTMLDivElement;
|
|
53
|
+
}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
54
|
+
P: {};
|
|
55
|
+
B: {};
|
|
56
|
+
D: {};
|
|
57
|
+
C: {};
|
|
58
|
+
M: {};
|
|
59
|
+
Defaults: {};
|
|
60
|
+
}, Readonly<import('./monaco-editor.vue').Prop> & Readonly<{
|
|
61
|
+
onBlur?: ((...args: any[]) => any) | undefined;
|
|
62
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
63
|
+
onFocus?: ((...args: any[]) => any) | undefined;
|
|
64
|
+
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
65
|
+
"onEditor-mounted"?: ((...args: any[]) => any) | undefined;
|
|
66
|
+
"onChat-bot-click"?: ((...args: any[]) => any) | undefined;
|
|
67
|
+
}>, {
|
|
68
|
+
isMonacoReady: import('vue').Ref<boolean, boolean>;
|
|
69
|
+
reload(newVal: string): void;
|
|
70
|
+
getMonacoEditor: () => any;
|
|
71
|
+
setEditorContent: (val: string) => void;
|
|
72
|
+
getEditorContent: () => any;
|
|
73
|
+
scrollToTop: () => void;
|
|
74
|
+
scrollToBottom: () => void;
|
|
75
|
+
setEditorWordWrap: () => void;
|
|
76
|
+
setEditorTheme: () => void;
|
|
77
|
+
handleFullScreenClick: () => void;
|
|
78
|
+
handleDownloadLogClick: () => void;
|
|
79
|
+
getEditorMarkers: () => any;
|
|
80
|
+
handleFormatCodeClick: () => void;
|
|
81
|
+
getValue: () => any;
|
|
82
|
+
setValue: (code: string) => void;
|
|
83
|
+
getSelectCode: () => {
|
|
84
|
+
text: any;
|
|
85
|
+
textBefore: any;
|
|
86
|
+
textAfter: any;
|
|
87
|
+
} | {
|
|
88
|
+
text?: undefined;
|
|
89
|
+
textBefore?: undefined;
|
|
90
|
+
textAfter?: undefined;
|
|
91
|
+
};
|
|
92
|
+
isChatBotActive: import('vue').Ref<boolean, boolean>;
|
|
93
|
+
handleChatBotClick: () => void;
|
|
94
|
+
}, {}, {}, {}, {
|
|
95
|
+
title: string;
|
|
96
|
+
direction: "top" | "bottom";
|
|
97
|
+
theme: import('./useMonacoEditor').Theme;
|
|
98
|
+
value: string | null;
|
|
99
|
+
language: string;
|
|
100
|
+
readonly: boolean;
|
|
101
|
+
gapVal: number;
|
|
102
|
+
}>;
|
|
103
|
+
__isFragment?: never;
|
|
104
|
+
__isTeleport?: never;
|
|
105
|
+
__isSuspense?: never;
|
|
106
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('./monaco-editor.vue').Prop> & Readonly<{
|
|
107
|
+
onBlur?: ((...args: any[]) => any) | undefined;
|
|
108
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
109
|
+
onFocus?: ((...args: any[]) => any) | undefined;
|
|
110
|
+
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
111
|
+
"onEditor-mounted"?: ((...args: any[]) => any) | undefined;
|
|
112
|
+
"onChat-bot-click"?: ((...args: any[]) => any) | undefined;
|
|
113
|
+
}>, {
|
|
114
|
+
isMonacoReady: import('vue').Ref<boolean, boolean>;
|
|
115
|
+
reload(newVal: string): void;
|
|
116
|
+
getMonacoEditor: () => any;
|
|
117
|
+
setEditorContent: (val: string) => void;
|
|
118
|
+
getEditorContent: () => any;
|
|
119
|
+
scrollToTop: () => void;
|
|
120
|
+
scrollToBottom: () => void;
|
|
121
|
+
setEditorWordWrap: () => void;
|
|
122
|
+
setEditorTheme: () => void;
|
|
123
|
+
handleFullScreenClick: () => void;
|
|
124
|
+
handleDownloadLogClick: () => void;
|
|
125
|
+
getEditorMarkers: () => any;
|
|
126
|
+
handleFormatCodeClick: () => void;
|
|
127
|
+
getValue: () => any;
|
|
128
|
+
setValue: (code: string) => void;
|
|
129
|
+
getSelectCode: () => {
|
|
130
|
+
text: any;
|
|
131
|
+
textBefore: any;
|
|
132
|
+
textAfter: any;
|
|
133
|
+
} | {
|
|
134
|
+
text?: undefined;
|
|
135
|
+
textBefore?: undefined;
|
|
136
|
+
textAfter?: undefined;
|
|
137
|
+
};
|
|
138
|
+
isChatBotActive: import('vue').Ref<boolean, boolean>;
|
|
139
|
+
handleChatBotClick: () => void;
|
|
140
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
141
|
+
blur: (...args: any[]) => void;
|
|
142
|
+
change: (...args: any[]) => void;
|
|
143
|
+
focus: (...args: any[]) => void;
|
|
144
|
+
"update:value": (...args: any[]) => void;
|
|
145
|
+
"editor-mounted": (...args: any[]) => void;
|
|
146
|
+
"chat-bot-click": (...args: any[]) => void;
|
|
147
|
+
}, string, {
|
|
148
|
+
title: string;
|
|
149
|
+
direction: "top" | "bottom";
|
|
150
|
+
theme: import('./useMonacoEditor').Theme;
|
|
151
|
+
value: string | null;
|
|
152
|
+
language: string;
|
|
153
|
+
readonly: boolean;
|
|
154
|
+
gapVal: number;
|
|
155
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
156
|
+
$slots: {
|
|
157
|
+
header?(_: {}): any;
|
|
158
|
+
title?(_: {}): any;
|
|
159
|
+
footer?(_: {}): any;
|
|
160
|
+
};
|
|
161
|
+
});
|
|
162
|
+
export * from './useEditorConsole';
|
|
163
|
+
export { Lang, Prop, Theme } from './useMonacoEditor';
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
.m-e[data-v-254c9227] {
|
|
2
|
+
width: 100%;
|
|
3
|
+
height: 100%;
|
|
4
|
+
}
|
|
5
|
+
.m-e .m-e-main[data-v-254c9227] {
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
width: calc(100% - 2px);
|
|
9
|
+
height: calc(100% - 2px);
|
|
10
|
+
}
|
|
11
|
+
.m-e .m-e-main .m-e-main_toolbar[data-v-254c9227] {
|
|
12
|
+
position: relative;
|
|
13
|
+
z-index: 10;
|
|
14
|
+
height: 40px;
|
|
15
|
+
box-shadow: 0 2px 5px #000;
|
|
16
|
+
}
|
|
17
|
+
.m-e .m-e-main .m-e-main_toolbar .m-e-main_toolbar_left span[data-v-254c9227] {
|
|
18
|
+
padding-left: 10px;
|
|
19
|
+
font-size: 15px;
|
|
20
|
+
line-height: 40px;
|
|
21
|
+
user-select: none;
|
|
22
|
+
}
|
|
23
|
+
.m-e .m-e-main .m-e-main_toolbar .m-e-main_toolbar_right[data-v-254c9227] {
|
|
24
|
+
display: flex;
|
|
25
|
+
align-items: center;
|
|
26
|
+
}
|
|
27
|
+
.m-e .m-e-main .m-e-main_toolbar .m-e-main_toolbar_right .icon[data-v-254c9227] {
|
|
28
|
+
display: inline-block;
|
|
29
|
+
margin-left: 10px;
|
|
30
|
+
transition: ease all 0.3s;
|
|
31
|
+
border-radius: 2px;
|
|
32
|
+
text-align: center;
|
|
33
|
+
cursor: pointer;
|
|
34
|
+
}
|
|
35
|
+
.m-e .m-e-main .m-e-main_toolbar .m-e-main_toolbar_right .icon[data-v-254c9227]:hover {
|
|
36
|
+
background-color: rgba(255, 255, 255, 0.1);
|
|
37
|
+
}
|
|
38
|
+
.m-e .m-e-main .m-e-main_toolbar .m-e-main_toolbar_right .icon.icon-active[data-v-254c9227] {
|
|
39
|
+
color: #1890ff;
|
|
40
|
+
background-color: rgba(24, 144, 255, 0.1);
|
|
41
|
+
box-shadow: 0 0 4px rgba(24, 144, 255, 0.5);
|
|
42
|
+
transform: scale(1.1);
|
|
43
|
+
}
|
|
44
|
+
.m-e .m-e-main .m-e-main_container[data-v-254c9227] {
|
|
45
|
+
flex: 1;
|
|
46
|
+
width: 100%;
|
|
47
|
+
height: 100%;
|
|
48
|
+
min-height: 400px;
|
|
49
|
+
}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { Theme } from './useMonacoEditor';
|
|
2
|
+
export interface Prop {
|
|
3
|
+
value?: string | null;
|
|
4
|
+
/** 标题 */
|
|
5
|
+
title?: string;
|
|
6
|
+
/** 语言 */
|
|
7
|
+
language?: string;
|
|
8
|
+
/** 官方自带三种主题:vs、hc-black、vs-dark */
|
|
9
|
+
theme?: Theme;
|
|
10
|
+
/** 是否只读 */
|
|
11
|
+
readonly?: boolean;
|
|
12
|
+
/** 阅读方向 */
|
|
13
|
+
direction?: 'top' | 'bottom';
|
|
14
|
+
gapVal?: number;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* 设置编辑器的内容且滚动到最底部
|
|
18
|
+
*/
|
|
19
|
+
declare function setEditorContent(val: string): void;
|
|
20
|
+
/**
|
|
21
|
+
* 获取编辑器的内容
|
|
22
|
+
*/
|
|
23
|
+
declare function getEditorContent(): any;
|
|
24
|
+
/**
|
|
25
|
+
* 获取编辑器报错内容
|
|
26
|
+
*/
|
|
27
|
+
declare function getEditorMarkers(): any;
|
|
28
|
+
/**
|
|
29
|
+
* 设置编辑器滚动到最顶部
|
|
30
|
+
*/
|
|
31
|
+
declare function scrollToTop(): void;
|
|
32
|
+
/**
|
|
33
|
+
* 设置编辑器滚动到最底部
|
|
34
|
+
*/
|
|
35
|
+
declare function scrollToBottom(): void;
|
|
36
|
+
/**
|
|
37
|
+
* 是否截断换行
|
|
38
|
+
*/
|
|
39
|
+
declare function setEditorWordWrap(): void;
|
|
40
|
+
/**
|
|
41
|
+
* 切换白天或暗夜模式
|
|
42
|
+
*/
|
|
43
|
+
declare function setEditorTheme(): void;
|
|
44
|
+
/**
|
|
45
|
+
* 全屏切换
|
|
46
|
+
*/
|
|
47
|
+
declare function handleFullScreenClick(): void;
|
|
48
|
+
/**
|
|
49
|
+
* 下载
|
|
50
|
+
*/
|
|
51
|
+
declare function handleDownloadLogClick(): void;
|
|
52
|
+
/**
|
|
53
|
+
* 格式化代码
|
|
54
|
+
*/
|
|
55
|
+
declare function handleFormatCodeClick(): void;
|
|
56
|
+
/**
|
|
57
|
+
* 处理聊天机器人点击事件
|
|
58
|
+
*/
|
|
59
|
+
declare function handleChatBotClick(): void;
|
|
60
|
+
/**
|
|
61
|
+
* 获取monacoEditor的实例
|
|
62
|
+
*/
|
|
63
|
+
declare function getMonacoEditor(): any;
|
|
64
|
+
/**
|
|
65
|
+
* 设置编辑器内容,替换所有现有内容
|
|
66
|
+
* 支持编辑器的撤销/重做功能
|
|
67
|
+
* @param code 要设置的代码内容
|
|
68
|
+
*/
|
|
69
|
+
declare function setValue(code: string): void;
|
|
70
|
+
declare function getValue(): any;
|
|
71
|
+
declare function getSelectCode(): {
|
|
72
|
+
text: any;
|
|
73
|
+
textBefore: any;
|
|
74
|
+
textAfter: any;
|
|
75
|
+
} | {
|
|
76
|
+
text?: undefined;
|
|
77
|
+
textBefore?: undefined;
|
|
78
|
+
textAfter?: undefined;
|
|
79
|
+
};
|
|
80
|
+
declare function __VLS_template(): {
|
|
81
|
+
attrs: Partial<{}>;
|
|
82
|
+
slots: {
|
|
83
|
+
header?(_: {}): any;
|
|
84
|
+
title?(_: {}): any;
|
|
85
|
+
footer?(_: {}): any;
|
|
86
|
+
};
|
|
87
|
+
refs: {
|
|
88
|
+
Editor: HTMLDivElement;
|
|
89
|
+
};
|
|
90
|
+
rootEl: HTMLDivElement;
|
|
91
|
+
};
|
|
92
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
93
|
+
declare const __VLS_component: import('vue').DefineComponent<Prop, {
|
|
94
|
+
isMonacoReady: import('vue').Ref<boolean, boolean>;
|
|
95
|
+
reload(newVal: string): void;
|
|
96
|
+
getMonacoEditor: typeof getMonacoEditor;
|
|
97
|
+
setEditorContent: typeof setEditorContent;
|
|
98
|
+
getEditorContent: typeof getEditorContent;
|
|
99
|
+
scrollToTop: typeof scrollToTop;
|
|
100
|
+
scrollToBottom: typeof scrollToBottom;
|
|
101
|
+
setEditorWordWrap: typeof setEditorWordWrap;
|
|
102
|
+
setEditorTheme: typeof setEditorTheme;
|
|
103
|
+
handleFullScreenClick: typeof handleFullScreenClick;
|
|
104
|
+
handleDownloadLogClick: typeof handleDownloadLogClick;
|
|
105
|
+
getEditorMarkers: typeof getEditorMarkers;
|
|
106
|
+
handleFormatCodeClick: typeof handleFormatCodeClick;
|
|
107
|
+
getValue: typeof getValue;
|
|
108
|
+
setValue: typeof setValue;
|
|
109
|
+
getSelectCode: typeof getSelectCode;
|
|
110
|
+
isChatBotActive: import('vue').Ref<boolean, boolean>;
|
|
111
|
+
handleChatBotClick: typeof handleChatBotClick;
|
|
112
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
113
|
+
blur: (...args: any[]) => void;
|
|
114
|
+
change: (...args: any[]) => void;
|
|
115
|
+
focus: (...args: any[]) => void;
|
|
116
|
+
"update:value": (...args: any[]) => void;
|
|
117
|
+
"editor-mounted": (...args: any[]) => void;
|
|
118
|
+
"chat-bot-click": (...args: any[]) => void;
|
|
119
|
+
}, string, import('vue').PublicProps, Readonly<Prop> & Readonly<{
|
|
120
|
+
onBlur?: ((...args: any[]) => any) | undefined;
|
|
121
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
122
|
+
onFocus?: ((...args: any[]) => any) | undefined;
|
|
123
|
+
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
124
|
+
"onEditor-mounted"?: ((...args: any[]) => any) | undefined;
|
|
125
|
+
"onChat-bot-click"?: ((...args: any[]) => any) | undefined;
|
|
126
|
+
}>, {
|
|
127
|
+
title: string;
|
|
128
|
+
direction: "top" | "bottom";
|
|
129
|
+
theme: Theme;
|
|
130
|
+
value: string | null;
|
|
131
|
+
language: string;
|
|
132
|
+
readonly: boolean;
|
|
133
|
+
gapVal: number;
|
|
134
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
135
|
+
Editor: HTMLDivElement;
|
|
136
|
+
}, HTMLDivElement>;
|
|
137
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
138
|
+
export default _default;
|
|
139
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
140
|
+
new (): {
|
|
141
|
+
$slots: S;
|
|
142
|
+
};
|
|
143
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import _sfc_main from './monaco-editor.vue2.mjs';
|
|
2
|
+
import './monaco-editor.css';/* empty css */
|
|
3
|
+
import _export_sfc from '../../_virtual/_plugin-vue_export-helper.mjs';
|
|
4
|
+
|
|
5
|
+
const monacoEditor = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-254c9227"]]);
|
|
6
|
+
|
|
7
|
+
export { monacoEditor as default };
|