@gct-paas/core-web 0.1.4-dev.11 → 0.1.4-dev.13
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/de_DE-Dlmr1Wso.js +152 -0
- package/dist/en_US-B9GNh9s3.js +173 -0
- package/dist/es_ES-CdOh6_BZ.js +159 -0
- package/dist/fr_FR-DA5AJaJ_.js +168 -0
- package/dist/index.min.css +2 -1
- package/dist/ja_JP-DE6fp7p7.js +140 -0
- package/dist/loader.esm.min.js +9583 -0
- package/dist/monaco-editor-Di2Ob0f2.js +279 -0
- package/dist/objectSpread2-fLnUNEWu.js +62 -0
- package/dist/pt_PT-DqWIQ8Sv.js +134 -0
- package/dist/ru_RU-B7eejpuq.js +165 -0
- package/dist/tr_TR-Cp-TWGG5.js +167 -0
- package/dist/useMonacoEditor-B4gp3RiK.js +2788 -0
- package/dist/vi_VN-BWekEft9.js +85 -0
- package/dist/zh_CN-CaadhslE.js +174 -0
- package/dist/zh_TW-DHMPuQGm.js +169 -0
- package/es/_virtual/_plugin-vue_export-helper.mjs +7 -8
- package/es/components/app-modal/app-modal-component.mjs +102 -133
- package/es/components/assets-svg-icon/assets-svg-icon.mjs +161 -232
- package/es/components/assets-svg-icon/request.mjs +60 -43
- package/es/components/assets-svg-icon/utils.mjs +21 -19
- package/es/components/assets-svg-icon/validate.mjs +27 -41
- package/es/components/base-button/base-button.vue.mjs +7 -7
- package/es/components/base-button/base-button.vue_vue_type_script_setup_true_name_BaseButton_lang.mjs +181 -0
- package/es/components/basic-button/basic-button.vue.mjs +7 -7
- package/es/components/basic-button/basic-button.vue_vue_type_script_setup_true_name_BasicButton_lang.mjs +148 -0
- package/es/components/code-editor/code-editor.mjs +59 -63
- package/es/components/copy-module-key/copy-module-key.vue.mjs +7 -7
- package/es/components/copy-module-key/copy-module-key.vue_vue_type_script_setup_true_name_copy-module-key_lang.mjs +92 -0
- package/es/components/double-input/double-input.vue.mjs +5 -158
- package/es/components/double-input/double-input.vue_vue_type_script_setup_true_lang.mjs +121 -0
- package/es/components/field-upload/index.d.ts +2 -0
- package/es/components/field-upload/index.mjs +7 -0
- package/es/components/field-upload/src/FieldUpload.vue.d.ts +37 -0
- package/es/components/field-upload/src/FieldUpload.vue.mjs +5 -0
- package/es/components/field-upload/src/FieldUpload.vue_vue_type_script_setup_true_name_FieldUpload_lang.mjs +111 -0
- package/es/components/field-upload/src/components/base-upload.vue.d.ts +21 -0
- package/es/components/field-upload/src/components/base-upload.vue.mjs +7 -0
- package/es/components/field-upload/src/components/base-upload.vue_vue_type_script_name_baseUpload_setup_true_lang.mjs +227 -0
- package/es/components/field-upload/src/components/base-upload.vue_vue_type_style_index_0_scoped_f53b6ac6_lang.css +76 -0
- package/es/components/field-upload/src/components/file-list.vue.d.ts +17 -0
- package/es/components/field-upload/src/components/file-list.vue.mjs +7 -0
- package/es/components/field-upload/src/components/file-list.vue_vue_type_script_setup_true_name_fileList_lang.mjs +129 -0
- package/es/components/field-upload/src/components/file-list.vue_vue_type_style_index_0_scoped_3918aad0_lang.css +129 -0
- package/es/components/field-upload/src/components/upload-design.vue.d.ts +5 -0
- package/es/components/field-upload/src/components/upload-design.vue.mjs +7 -0
- package/es/components/field-upload/src/components/upload-design.vue_vue_type_script_name_UploadDesign_setup_true_lang.mjs +43 -0
- package/es/components/field-upload/src/components/upload-design.vue_vue_type_style_index_0_scoped_1e5189c1_lang.css +43 -0
- package/es/components/field-upload/src/hooks/hooks.d.ts +4 -0
- package/es/components/field-upload/src/hooks/hooks.mjs +47 -0
- package/es/components/field-upload/src/types/index.d.ts +42 -0
- package/es/components/field-upload/src/types/index.mjs +24 -0
- package/es/components/icon-next/hooks/useIconAsset.mjs +32 -44
- package/es/components/icon-next/hooks/useIconPark.mjs +48 -48
- package/es/components/icon-next/hooks/useIconPlatform.mjs +37 -42
- package/es/components/icon-next/index.mjs +3 -0
- package/es/components/icon-next/src/IconNext.vue.mjs +7 -0
- package/es/components/icon-next/src/IconNext.vue_vue_type_script_setup_true_name_IconNext_lang.mjs +113 -0
- package/es/components/icon-next/src/IconNextPicker.vue.mjs +6 -0
- package/es/components/icon-next/src/IconNextPicker.vue_vue_type_script_setup_true_name_IconNextPicker_lang.mjs +379 -0
- package/es/components/icon-next/types/index.mjs +10 -9
- package/es/components/image-upload/index.d.ts +2 -0
- package/es/components/image-upload/index.mjs +7 -0
- package/es/components/image-upload/src/ImageUpload.vue.d.ts +32 -0
- package/es/components/image-upload/src/ImageUpload.vue.mjs +5 -0
- package/es/components/image-upload/src/ImageUpload.vue_vue_type_script_setup_true_name_ImageUpload_lang.mjs +74 -0
- package/es/components/image-upload/src/components/base-upload.vue.d.ts +24 -0
- package/es/components/image-upload/src/components/base-upload.vue.mjs +8 -0
- package/es/components/image-upload/src/components/base-upload.vue_vue_type_script_name_baseUpload_setup_true_lang.mjs +209 -0
- package/es/components/image-upload/src/components/base-upload.vue_vue_type_style_index_0_scoped_3248e630_lang.css +73 -0
- package/es/components/image-upload/src/components/base-upload.vue_vue_type_style_index_1_lang.css +3 -0
- package/es/components/image-upload/src/components/upload-design.vue.d.ts +6 -0
- package/es/components/image-upload/src/components/upload-design.vue.mjs +7 -0
- package/es/components/image-upload/src/components/upload-design.vue_vue_type_script_name_UploadDesign_setup_true_lang.mjs +33 -0
- package/es/components/image-upload/src/components/upload-design.vue_vue_type_style_index_0_scoped_575d3a1a_lang.css +33 -0
- package/es/components/image-upload/src/hooks/hooks.d.ts +2 -0
- package/es/components/image-upload/src/types/index.d.ts +34 -0
- package/es/components/image-upload/src/types/index.mjs +8 -0
- package/es/components/index.d.ts +4 -1
- package/es/components/index.mjs +25 -34
- package/es/components/layout/view-container/view-container.mjs +24 -35
- package/es/components/svg-icon/svg-icon.vue.mjs +6 -50
- package/es/components/svg-icon/svg-icon.vue_vue_type_script_setup_true_name_SvgIcon_lang.mjs +52 -0
- package/es/components/vue3-grid-dnd-item/vue3-grid-dnd-item.css +103 -0
- package/es/components/vue3-grid-dnd-item/vue3-grid-dnd-item.d.ts +44 -0
- package/es/components/vue3-grid-dnd-item/vue3-grid-dnd-item.mjs +122 -0
- package/es/components/wujie-container/wujie-container.mjs +58 -81
- package/es/create-app-vue.mjs +27 -19
- package/es/directives/drag-resize.mjs +38 -39
- package/es/directives/ellipsis-title.d.ts +7 -0
- package/es/directives/ellipsis-title.mjs +21 -0
- package/es/directives/index.mjs +14 -6
- package/es/directives/target-loading.mjs +28 -36
- package/es/hooks/index.mjs +4 -0
- package/es/hooks/useDesign.mjs +7 -8
- package/es/hooks/useDragLine.mjs +66 -75
- package/es/hooks/useLocale.d.ts +365 -1
- package/es/hooks/useLocale.mjs +23 -28
- package/es/hooks/useTheme.mjs +13 -17
- package/es/index.d.ts +1 -0
- package/es/index.mjs +96 -137
- package/es/loader.d.ts +1 -0
- package/es/modules/Cropper/hooks/useFile.mjs +21 -0
- package/es/modules/Cropper/index.d.ts +1 -0
- package/es/modules/Cropper/index.mjs +12 -0
- package/es/modules/Cropper/src/CopperFreeModal.vue.mjs +7 -0
- package/es/modules/Cropper/src/CopperFreeModal.vue_vue_type_script_setup_true_name_CropperModal_lang.mjs +299 -0
- package/es/modules/Cropper/src/CopperFreeModal.vue_vue_type_style_index_0_scoped_28afc2ab_lang.css +48 -0
- package/es/modules/Cropper/src/CopperModal.vue.mjs +7 -0
- package/es/modules/Cropper/src/CopperModal.vue_vue_type_script_setup_true_name_CropperModal_lang.mjs +283 -0
- package/es/modules/Cropper/src/CopperModal.vue_vue_type_style_index_0_scoped_f42f8311_lang.css +71 -0
- package/es/modules/Cropper/src/Cropper.vue.d.ts +1 -1
- package/es/modules/Cropper/src/Cropper.vue.mjs +25 -0
- package/es/modules/Cropper/src/Cropper.vue_vue_type_script_lang.mjs +173 -0
- package/es/modules/Cropper/src/Cropper.vue_vue_type_style_index_0_lang.css +4 -0
- package/es/modules/Cropper/src/CropperAvatar.vue.mjs +7 -0
- package/es/modules/Cropper/src/CropperAvatar.vue_vue_type_script_setup_true_name_CropperAvatar_lang.mjs +116 -0
- package/es/modules/Cropper/src/CropperAvatar.vue_vue_type_style_index_0_scoped_b5d65cd4_lang.css +39 -0
- package/es/modules/Cropper/src/CropperFree.vue.mjs +7 -0
- package/es/modules/Cropper/src/CropperFree.vue_vue_type_script_setup_true_name_CropperPhoto_lang.mjs +165 -0
- package/es/modules/Cropper/src/CropperFree.vue_vue_type_style_index_0_scoped_3cc5e19b_lang.css +83 -0
- package/es/modules/code-editor/index.d.ts +3 -3
- package/es/modules/code-editor/index.mjs +6 -7
- package/es/modules/code-editor/monaco-editor.vue.d.ts +1 -1
- package/es/modules/code-editor/monaco-editor.vue.mjs +7 -7
- package/es/modules/code-editor/monaco-editor.vue_vue_type_script_setup_true_name_code-editor_lang.mjs +399 -0
- package/es/modules/code-editor/{monaco-editor.css → monaco-editor.vue_vue_type_style_index_0_scoped_ccf22884_lang.css} +9 -9
- package/es/modules/code-editor/useEditorConsole.mjs +146 -187
- package/es/modules/code-editor/useMonacoEditor.mjs +24 -23
- package/es/modules/color-picker/index.mjs +1 -0
- package/es/modules/color-picker/src/ColorPicker.vue.mjs +8 -8
- package/es/modules/color-picker/src/ColorPicker.vue_vue_type_script_setup_true_name_ColorPicker_lang.mjs +482 -0
- package/es/modules/formula-editor/constants/index.mjs +8 -6
- package/es/modules/formula-editor/formula-editor.mjs +40 -59
- package/es/modules/formula-editor/index.mjs +2 -0
- package/es/modules/gct-dnd/components/gct-dnd-container/gct-dnd-container.mjs +158 -193
- package/es/modules/gct-dnd/components/gct-dnd-drop-line/gct-dnd-drop-line.mjs +81 -95
- package/es/modules/gct-dnd/components/gct-dnd-item/gct-dnd-item.mjs +178 -237
- package/es/modules/gct-dnd/constants/index.mjs +10 -18
- package/es/modules/gct-dnd/index.mjs +4 -0
- package/es/modules/gct-form/components/flex-container/flex-container.css +67 -0
- package/es/modules/gct-form/components/flex-container/flex-container.d.ts +14 -0
- package/es/modules/gct-form/components/flex-container/flex-container.mjs +61 -0
- package/es/modules/gct-form/components/flex-item/flex-item.d.ts +13 -0
- package/es/modules/gct-form/components/flex-item/flex-item.mjs +37 -0
- package/es/modules/gct-form/components/grid-container/grid-container.d.ts +10 -0
- package/es/modules/gct-form/components/grid-container/grid-container.mjs +36 -0
- package/es/modules/gct-form/components/index.d.ts +3 -0
- package/es/modules/gct-form/components/index.mjs +3 -0
- package/es/modules/gct-form/constants/editor-register/editor-register.mjs +17 -5
- package/es/modules/gct-form/constants/editor-type/editor-type.mjs +133 -34
- package/es/modules/gct-form/constants/index.mjs +5 -2
- package/es/modules/gct-form/controller/edit-form/edit-form.controller.d.ts +1 -16
- package/es/modules/gct-form/controller/edit-form/edit-form.controller.mjs +48 -69
- package/es/modules/gct-form/controller/editor-item/editor-item.controller.mjs +18 -22
- package/es/modules/gct-form/controller/form-collapse/form-collapse.controller.mjs +20 -10
- package/es/modules/gct-form/controller/form-collapse-pane/form-collapse-pane.controller.mjs +20 -10
- package/es/modules/gct-form/controller/form-edit-item/form-edit-item.controller.mjs +84 -89
- package/es/modules/gct-form/controller/form-group/form-group.controller.mjs +20 -10
- package/es/modules/gct-form/controller/form-item/form-item.controller.mjs +35 -36
- package/es/modules/gct-form/controller/form-item-basic/form-item-basic.controller.mjs +61 -42
- package/es/modules/gct-form/controller/form-item-hidden/form-item-hidden.controller.mjs +16 -6
- package/es/modules/gct-form/controller/form-line/form-line.controller.mjs +20 -10
- package/es/modules/gct-form/controller/form-tab/form-tab.controller.mjs +20 -10
- package/es/modules/gct-form/controller/form-tab-pane/form-tab-pane.controller.mjs +20 -10
- package/es/modules/gct-form/controller/gct-form/gct-form.controller.mjs +198 -221
- package/es/modules/gct-form/controller/index.mjs +13 -0
- package/es/modules/gct-form/editor/gct-form-action/gct-form-action.mjs +44 -49
- package/es/modules/gct-form/editor/gct-form-action/index.mjs +10 -14
- package/es/modules/gct-form/editor/gct-form-check-switch/gct-form-check-switch.mjs +54 -55
- package/es/modules/gct-form/editor/gct-form-check-switch/gct-form-check-switch.provider.mjs +14 -4
- package/es/modules/gct-form/editor/gct-form-check-switch/index.mjs +8 -12
- package/es/modules/gct-form/editor/gct-form-checkbox/gct-form-checkbox.mjs +100 -125
- package/es/modules/gct-form/editor/gct-form-checkbox/index.mjs +10 -14
- package/es/modules/gct-form/editor/gct-form-color/gct-form-color.mjs +36 -41
- package/es/modules/gct-form/editor/gct-form-color/gct-form-color.provider.mjs +14 -4
- package/es/modules/gct-form/editor/gct-form-color/index.mjs +8 -12
- package/es/modules/gct-form/editor/gct-form-date/gct-form-date.mjs +71 -78
- package/es/modules/gct-form/editor/gct-form-date/gct-form-date.provider.mjs +12 -4
- package/es/modules/gct-form/editor/gct-form-date/index.mjs +8 -12
- package/es/modules/gct-form/editor/gct-form-date-format-select/gct-form-date-format-select.mjs +102 -107
- package/es/modules/gct-form/editor/gct-form-date-format-select/index.mjs +10 -14
- package/es/modules/gct-form/editor/gct-form-empty/gct-form-empty.mjs +13 -15
- package/es/modules/gct-form/editor/gct-form-empty/index.mjs +10 -14
- package/es/modules/gct-form/editor/gct-form-formula/gct-form-formula.mjs +66 -66
- package/es/modules/gct-form/editor/gct-form-formula/index.mjs +10 -14
- package/es/modules/gct-form/editor/gct-form-group-select/gct-form-group-select.mjs +159 -227
- package/es/modules/gct-form/editor/gct-form-group-select/index.mjs +10 -14
- package/es/modules/gct-form/editor/gct-form-i18n/gct-form-i18n.mjs +87 -113
- package/es/modules/gct-form/editor/gct-form-i18n/gct-form-i18n.provider.mjs +14 -4
- package/es/modules/gct-form/editor/gct-form-i18n/index.mjs +8 -12
- package/es/modules/gct-form/editor/gct-form-icon-select/gct-form-icon-select.mjs +61 -70
- package/es/modules/gct-form/editor/gct-form-icon-select/index.mjs +10 -14
- package/es/modules/gct-form/editor/gct-form-info/gct-form-info.mjs +38 -49
- package/es/modules/gct-form/editor/gct-form-info/index.mjs +10 -14
- package/es/modules/gct-form/editor/gct-form-length-unit/gct-form-length-unit.mjs +36 -41
- package/es/modules/gct-form/editor/gct-form-length-unit/gct-form-length-unit.provider.mjs +14 -4
- package/es/modules/gct-form/editor/gct-form-length-unit/index.mjs +8 -12
- package/es/modules/gct-form/editor/gct-form-model-select/gct-form-model-select.mjs +141 -170
- package/es/modules/gct-form/editor/gct-form-model-select/index.mjs +10 -14
- package/es/modules/gct-form/editor/gct-form-multiple-choice/gct-form-multiple-choice.mjs +60 -66
- package/es/modules/gct-form/editor/gct-form-multiple-choice/index.mjs +10 -14
- package/es/modules/gct-form/editor/gct-form-number/gct-form-number.mjs +41 -42
- package/es/modules/gct-form/editor/gct-form-number/gct-form-number.provider.mjs +5 -4
- package/es/modules/gct-form/editor/gct-form-number/index.mjs +8 -12
- package/es/modules/gct-form/editor/gct-form-picker/gct-form-picker.mjs +89 -111
- package/es/modules/gct-form/editor/gct-form-picker/gct-form-picker.provider.mjs +14 -4
- package/es/modules/gct-form/editor/gct-form-picker/index.mjs +8 -12
- package/es/modules/gct-form/editor/gct-form-pixel-config/gct-form-pixel-config.mjs +60 -66
- package/es/modules/gct-form/editor/gct-form-pixel-config/index.mjs +10 -14
- package/es/modules/gct-form/editor/gct-form-radio/gct-form-radio.mjs +76 -91
- package/es/modules/gct-form/editor/gct-form-radio/index.mjs +10 -14
- package/es/modules/gct-form/editor/gct-form-select/gct-form-select.mjs +109 -126
- package/es/modules/gct-form/editor/gct-form-select/gct-form-select.provider.mjs +14 -4
- package/es/modules/gct-form/editor/gct-form-select/index.mjs +8 -12
- package/es/modules/gct-form/editor/gct-form-span/gct-form-span.mjs +67 -97
- package/es/modules/gct-form/editor/gct-form-span/gct-form-span.provider.mjs +14 -4
- package/es/modules/gct-form/editor/gct-form-span/index.mjs +8 -12
- package/es/modules/gct-form/editor/gct-form-switch/gct-form-switch.mjs +32 -37
- package/es/modules/gct-form/editor/gct-form-switch/gct-form-switch.provider.mjs +14 -4
- package/es/modules/gct-form/editor/gct-form-switch/index.mjs +8 -12
- package/es/modules/gct-form/editor/gct-form-table/gct-form-table.mjs +29 -30
- package/es/modules/gct-form/editor/gct-form-table/index.mjs +10 -14
- package/es/modules/gct-form/editor/gct-form-text/gct-form-text.mjs +51 -54
- package/es/modules/gct-form/editor/gct-form-text/gct-form-text.provider.mjs +14 -4
- package/es/modules/gct-form/editor/gct-form-text/index.mjs +8 -12
- package/es/modules/gct-form/editor/gct-form-textarea/gct-form-textarea.mjs +43 -44
- package/es/modules/gct-form/editor/gct-form-textarea/gct-form-textarea.provider.mjs +5 -4
- package/es/modules/gct-form/editor/gct-form-textarea/index.mjs +8 -12
- package/es/modules/gct-form/editor/gct-select-form-table/gct-select-form-table.mjs +59 -76
- package/es/modules/gct-form/editor/gct-select-form-table/index.mjs +10 -14
- package/es/modules/gct-form/editor/index.mjs +32 -34
- package/es/modules/gct-form/hooks/index.mjs +2 -0
- package/es/modules/gct-form/hooks/use-form/use-form.mjs +12 -5
- package/es/modules/gct-form/hooks/use-gct-form-value/use-gct-form-value.mjs +80 -84
- package/es/modules/gct-form/index.mjs +51 -16
- package/es/modules/gct-form/props/gct-form-item/gct-form-item.props.mjs +54 -62
- package/es/modules/gct-form/register/editor-register/editor-register.mjs +63 -56
- package/es/modules/gct-form/register/form-item-register/form-item-register.mjs +45 -41
- package/es/modules/gct-form/state/form/form.state.mjs +26 -16
- package/es/modules/gct-form/state/form-collapse/form-collapse.state.mjs +14 -5
- package/es/modules/gct-form/state/form-collapse-pane/form-collapse-pane.state.mjs +14 -5
- package/es/modules/gct-form/state/form-edit-item/form-edit-item.state.mjs +18 -9
- package/es/modules/gct-form/state/form-group/form-group.state.mjs +22 -13
- package/es/modules/gct-form/state/form-item/form-item.state.mjs +14 -5
- package/es/modules/gct-form/state/form-item-basic/form-item-basic.state.mjs +18 -8
- package/es/modules/gct-form/state/form-line/form-line.state.mjs +11 -5
- package/es/modules/gct-form/state/form-tab/form-tab.state.mjs +16 -6
- package/es/modules/gct-form/state/form-tab-pane/form-tab-pane.state.mjs +14 -5
- package/es/modules/gct-form/utils/width-install/width-install.mjs +19 -16
- package/es/modules/gct-form/widgets/gct-edit-form/gct-edit-form.d.ts +1 -5
- package/es/modules/gct-form/widgets/gct-edit-form/gct-edit-form.mjs +122 -148
- package/es/modules/gct-form/widgets/gct-form/gct-form-collapse/gct-form-collapse.mjs +66 -76
- package/es/modules/gct-form/widgets/gct-form/gct-form-collapse/gct-form-collapse.provider.mjs +11 -13
- package/es/modules/gct-form/widgets/gct-form/gct-form-collapse/index.mjs +10 -15
- package/es/modules/gct-form/widgets/gct-form/gct-form-collapse-pane/gct-form-collapse-pane.mjs +50 -72
- package/es/modules/gct-form/widgets/gct-form/gct-form-collapse-pane/gct-form-collapse-pane.provider.mjs +11 -15
- package/es/modules/gct-form/widgets/gct-form/gct-form-collapse-pane/index.mjs +10 -15
- package/es/modules/gct-form/widgets/gct-form/gct-form-group/gct-form-group.css +5 -5
- package/es/modules/gct-form/widgets/gct-form/gct-form-group/gct-form-group.mjs +72 -89
- package/es/modules/gct-form/widgets/gct-form/gct-form-group/gct-form-group.provider.mjs +11 -13
- package/es/modules/gct-form/widgets/gct-form/gct-form-group/index.mjs +10 -15
- package/es/modules/gct-form/widgets/gct-form/gct-form-hidden-item/gct-form-hidden-item.provider.mjs +11 -15
- package/es/modules/gct-form/widgets/gct-form/gct-form-hidden-item/index.mjs +1 -0
- package/es/modules/gct-form/widgets/gct-form/gct-form-item/gct-form-item.css +27 -24
- package/es/modules/gct-form/widgets/gct-form/gct-form-item/gct-form-item.mjs +127 -159
- package/es/modules/gct-form/widgets/gct-form/gct-form-item/gct-form-item.provider.mjs +11 -13
- package/es/modules/gct-form/widgets/gct-form/gct-form-item/index.mjs +3 -0
- package/es/modules/gct-form/widgets/gct-form/gct-form-line/gct-form-line.css +2 -2
- package/es/modules/gct-form/widgets/gct-form/gct-form-line/gct-form-line.mjs +38 -45
- package/es/modules/gct-form/widgets/gct-form/gct-form-line/gct-form-line.provider.mjs +11 -13
- package/es/modules/gct-form/widgets/gct-form/gct-form-line/index.mjs +10 -12
- package/es/modules/gct-form/widgets/gct-form/gct-form-tab/gct-form-tab.mjs +63 -69
- package/es/modules/gct-form/widgets/gct-form/gct-form-tab/gct-form-tab.provider.mjs +11 -13
- package/es/modules/gct-form/widgets/gct-form/gct-form-tab/index.mjs +10 -12
- package/es/modules/gct-form/widgets/gct-form/gct-form-tab-pane/gct-form-tab-pane.mjs +48 -66
- package/es/modules/gct-form/widgets/gct-form/gct-form-tab-pane/gct-form-tab-pane.provider.mjs +11 -13
- package/es/modules/gct-form/widgets/gct-form/gct-form-tab-pane/index.mjs +10 -15
- package/es/modules/gct-form/widgets/gct-form/gct-form-title-group/gct-form-title-group.css +4 -4
- package/es/modules/gct-form/widgets/gct-form/gct-form-title-group/gct-form-title-group.mjs +50 -68
- package/es/modules/gct-form/widgets/gct-form/gct-form-title-group/gct-form-title-group.provider.mjs +11 -13
- package/es/modules/gct-form/widgets/gct-form/gct-form-title-group/index.mjs +11 -16
- package/es/modules/gct-form/widgets/gct-form/gct-form.css +2 -2
- package/es/modules/gct-form/widgets/gct-form/gct-form.mjs +125 -143
- package/es/modules/gct-form/widgets/gct-form/index.mjs +30 -33
- package/es/modules/gct-table/controller/gct-table/gct-table.controller.mjs +138 -140
- package/es/modules/gct-table/controller/index.mjs +5 -0
- package/es/modules/gct-table/controller/table-item/table-action-item.controller.mjs +14 -5
- package/es/modules/gct-table/controller/table-item/table-edit-item.controller.mjs +25 -15
- package/es/modules/gct-table/controller/table-item/table-item.controller.mjs +32 -25
- package/es/modules/gct-table/controller/table-row/table-row.controller.mjs +76 -69
- package/es/modules/gct-table/editor/gct-table-date/gct-table-date.mjs +47 -90
- package/es/modules/gct-table/editor/gct-table-date/gct-table-date.provider.mjs +12 -4
- package/es/modules/gct-table/editor/gct-table-date/index.mjs +10 -52
- package/es/modules/gct-table/editor/gct-table-span/gct-table-span.mjs +26 -37
- package/es/modules/gct-table/editor/gct-table-span/gct-table-span.provider.mjs +14 -4
- package/es/modules/gct-table/editor/gct-table-span/index.mjs +10 -52
- package/es/modules/gct-table/editor/gct-table-text/gct-table-text.mjs +60 -103
- package/es/modules/gct-table/editor/gct-table-text/gct-table-text.provider.mjs +14 -4
- package/es/modules/gct-table/editor/gct-table-text/index.mjs +10 -52
- package/es/modules/gct-table/editor/index.mjs +9 -11
- package/es/modules/gct-table/hooks/index.mjs +1 -0
- package/es/modules/gct-table/hooks/use-ant-table/use-ant-table.mjs +66 -82
- package/es/modules/gct-table/index.mjs +22 -15
- package/es/modules/gct-table/register/table-editor-register/table-editor-register.mjs +67 -60
- package/es/modules/gct-table/state/table/table.state.mjs +46 -36
- package/es/modules/gct-table/state/table-item/table-edit-item.state.mjs +19 -9
- package/es/modules/gct-table/state/table-item/table-item.state.mjs +29 -19
- package/es/modules/gct-table/state/table-row/table-row.state.mjs +16 -6
- package/es/modules/gct-table/utils/count-latch/count-latch.mjs +97 -94
- package/es/modules/gct-table/utils/index.mjs +2 -0
- package/es/modules/gct-table/utils/width-install/width-install.mjs +18 -16
- package/es/modules/gct-table/widgets/gct-table/gct-table.mjs +310 -409
- package/es/modules/gct-table/widgets/gct-table/index.mjs +8 -10
- package/es/modules/gct-table/widgets/index.mjs +7 -9
- package/es/modules/global-modal/index.mjs +10 -16
- package/es/modules/global-modal/src/BasicModal.vue.mjs +5 -221
- package/es/modules/global-modal/src/BasicModal.vue_vue_type_script_setup_true_name_BasicModal_lang.mjs +201 -0
- package/es/modules/global-modal/src/components/GlboalModal.mjs +30 -39
- package/es/modules/global-modal/src/components/ModalClose.vue.mjs +6 -79
- package/es/modules/global-modal/src/components/ModalClose.vue_vue_type_script_setup_true_name_ModalClose_lang.mjs +67 -0
- package/es/modules/global-modal/src/components/ModalFooter.vue.mjs +5 -44
- package/es/modules/global-modal/src/components/ModalFooter.vue_vue_type_script_setup_true_name_BasicModalFooter_lang.mjs +40 -0
- package/es/modules/global-modal/src/components/ModalHeader.vue.mjs +9 -9
- package/es/modules/global-modal/src/components/ModalHeader.vue_vue_type_script_lang.mjs +11 -0
- package/es/modules/global-modal/src/components/ModalWrapper.vue.mjs +18 -24
- package/es/modules/global-modal/src/components/ModalWrapper.vue_vue_type_script_lang.mjs +126 -0
- package/es/modules/global-modal/src/hooks/useModal.mjs +102 -116
- package/es/modules/global-modal/src/hooks/useModalContext.mjs +6 -6
- package/es/modules/global-modal/src/hooks/useModalDrag.mjs +69 -79
- package/es/modules/global-modal/src/hooks/useModalFullScreen.mjs +17 -13
- package/es/modules/global-modal/src/props.mjs +87 -55
- package/es/modules/target-loading/index.mjs +3 -0
- package/es/modules/target-loading/src/createLoading.mjs +42 -54
- package/es/modules/target-loading/src/target-loading.vue.mjs +7 -52
- package/es/modules/target-loading/src/target-loading.vue_vue_type_script_setup_true_name_target-loading_lang.mjs +55 -0
- package/es/modules/target-loading/src/useLoading.mjs +2 -0
- package/es/setup-app.mjs +3 -3
- package/es/utils/index.mjs +4 -0
- package/es/utils/message-util/message-util.mjs +25 -25
- package/es/utils/monaco-loader/monaco-loader.mjs +83 -87
- package/es/utils/overlay-controller/overlay-controller.mjs +29 -20
- package/es/utils/with-install.mjs +10 -11
- package/package.json +7 -7
- package/dist/index-B8zoAUhR.cjs +0 -20
- package/dist/index-BH5PTZ_c.js +0 -20
- package/dist/index-Cna4DZog.js +0 -109381
- package/dist/index.esm.min.mjs +0 -91
- package/dist/index.min.cjs +0 -1
- package/dist/index.system.min.js +0 -1
- package/dist/monaco-editor-4E2xdOou.cjs +0 -1
- package/dist/monaco-editor-C-wvzgow.js +0 -1
- package/dist/monaco-editor-Cel355Cg.js +0 -350
- package/es/components/base-button/base-button.vue3.mjs +0 -179
- package/es/components/basic-button/basic-button.vue3.mjs +0 -130
- package/es/components/copy-module-key/copy-module-key.vue3.mjs +0 -104
- package/es/components/double-input/double-input.vue2.mjs +0 -5
- package/es/components/icon-next/src/IconNext.vue2.mjs +0 -7
- package/es/components/icon-next/src/IconNext.vue3.mjs +0 -108
- package/es/components/icon-next/src/IconNextPicker.vue2.mjs +0 -452
- package/es/components/icon-next/src/IconNextPicker.vue3.mjs +0 -6
- package/es/components/svg-icon/svg-icon.vue3.mjs +0 -6
- package/es/modules/code-editor/monaco-editor.vue2.mjs +0 -440
- package/es/modules/color-picker/src/ColorPicker.vue2.mjs +0 -545
- package/es/modules/gct-form/widgets/gct-edit-form/index.d.ts +0 -5
- package/es/modules/gct-form/widgets/gct-edit-form/index.mjs +0 -10
- package/es/modules/global-modal/src/BasicModal.vue2.mjs +0 -5
- package/es/modules/global-modal/src/components/ModalClose.vue3.mjs +0 -6
- package/es/modules/global-modal/src/components/ModalFooter.vue2.mjs +0 -5
- package/es/modules/global-modal/src/components/ModalHeader.vue2.mjs +0 -13
- package/es/modules/global-modal/src/components/ModalWrapper.vue2.mjs +0 -136
- package/es/modules/target-loading/src/target-loading.vue3.mjs +0 -7
- /package/es/components/base-button/{base-button.css → base-button.vue_vue_type_style_index_0_scoped_5375ec2b_lang.css} +0 -0
- /package/es/components/basic-button/{basic-button.css → basic-button.vue_vue_type_style_index_0_scoped_1dbcb2fa_lang.css} +0 -0
- /package/es/components/copy-module-key/{copy-module-key.css → copy-module-key.vue_vue_type_style_index_0_scoped_531b3cd2_lang.css} +0 -0
- /package/es/components/icon-next/src/{IconNext.css → IconNext.vue_vue_type_style_index_0_scoped_c5a83130_lang.css} +0 -0
- /package/es/components/icon-next/src/{IconNextPicker.css → IconNextPicker.vue_vue_type_style_index_0_lang.css} +0 -0
- /package/es/components/svg-icon/{svg-icon.css → svg-icon.vue_vue_type_style_index_0_lang.css} +0 -0
- /package/es/modules/color-picker/src/{ColorPicker.css → ColorPicker.vue_vue_type_style_index_0_scoped_7bfd9ca3_lang.css} +0 -0
- /package/es/modules/color-picker/src/{ColorPicker2.css → ColorPicker.vue_vue_type_style_index_1_lang.css} +0 -0
- /package/es/modules/gct-table/editor/{gct-table-text/gct-table-text.css → gct-table-date/gct-table-date.css} +0 -0
- /package/es/modules/global-modal/src/components/{ModalClose.css → ModalClose.vue_vue_type_style_index_0_lang.css} +0 -0
- /package/es/modules/target-loading/src/{target-loading.css → target-loading.vue_vue_type_style_index_0_scoped_d448466c_lang.css} +0 -0
package/es/modules/Cropper/src/CopperModal.vue_vue_type_style_index_0_scoped_f42f8311_lang.css
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
.gct-cropper-am[data-v-f42f8311] {
|
|
2
|
+
display: flex;
|
|
3
|
+
}
|
|
4
|
+
.gct-cropper-am-left[data-v-f42f8311],
|
|
5
|
+
.gct-cropper-am-right[data-v-f42f8311] {
|
|
6
|
+
height: 340px;
|
|
7
|
+
}
|
|
8
|
+
.gct-cropper-am-left[data-v-f42f8311] {
|
|
9
|
+
width: 400px;
|
|
10
|
+
}
|
|
11
|
+
.gct-cropper-am-right[data-v-f42f8311] {
|
|
12
|
+
width: 150px;
|
|
13
|
+
}
|
|
14
|
+
.gct-cropper-am-cropper[data-v-f42f8311] {
|
|
15
|
+
position: relative;
|
|
16
|
+
width: 360px;
|
|
17
|
+
height: 360px;
|
|
18
|
+
background: #eee;
|
|
19
|
+
background-image: linear-gradient(45deg, rgba(0, 0, 0, 0.25) 25%, transparent 0, transparent 75%, rgba(0, 0, 0, 0.25) 0), linear-gradient(45deg, rgba(0, 0, 0, 0.25) 25%, transparent 0, transparent 75%, rgba(0, 0, 0, 0.25) 0);
|
|
20
|
+
background-position: 0 0,
|
|
21
|
+
12px 12px;
|
|
22
|
+
background-size: 24px 24px;
|
|
23
|
+
}
|
|
24
|
+
.gct-cropper-am-toolbar[data-v-f42f8311] {
|
|
25
|
+
display: flex;
|
|
26
|
+
align-items: center;
|
|
27
|
+
justify-content: space-between;
|
|
28
|
+
width: 360px;
|
|
29
|
+
margin-top: 10px;
|
|
30
|
+
}
|
|
31
|
+
.gct-cropper-am-preview[data-v-f42f8311] {
|
|
32
|
+
width: 220px;
|
|
33
|
+
height: 220px;
|
|
34
|
+
margin: 0 auto;
|
|
35
|
+
overflow: hidden;
|
|
36
|
+
border: 1px solid var(--gct-color-border);
|
|
37
|
+
border-radius: 50%;
|
|
38
|
+
}
|
|
39
|
+
.gct-cropper-am-preview img[data-v-f42f8311] {
|
|
40
|
+
width: 100%;
|
|
41
|
+
height: 100%;
|
|
42
|
+
}
|
|
43
|
+
.gct-cropper-am-group[data-v-f42f8311] {
|
|
44
|
+
display: flex;
|
|
45
|
+
flex-direction: column;
|
|
46
|
+
align-items: center;
|
|
47
|
+
justify-content: space-around;
|
|
48
|
+
height: 100%;
|
|
49
|
+
margin-top: 8px;
|
|
50
|
+
padding-top: 8px;
|
|
51
|
+
}
|
|
52
|
+
.empty[data-v-f42f8311] {
|
|
53
|
+
position: absolute;
|
|
54
|
+
top: 0;
|
|
55
|
+
left: 0;
|
|
56
|
+
width: 100%;
|
|
57
|
+
height: 100%;
|
|
58
|
+
}
|
|
59
|
+
.empty span[data-v-f42f8311] {
|
|
60
|
+
display: inline-block;
|
|
61
|
+
width: 100%;
|
|
62
|
+
height: 100%;
|
|
63
|
+
}
|
|
64
|
+
.empty span[data-v-f42f8311] .ant-upload-list {
|
|
65
|
+
width: 100%;
|
|
66
|
+
height: 100%;
|
|
67
|
+
}
|
|
68
|
+
.empty span[data-v-f42f8311] .ant-upload-list .ant-upload-select-picture-card {
|
|
69
|
+
width: 100%;
|
|
70
|
+
height: 100%;
|
|
71
|
+
}
|
|
@@ -38,7 +38,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
38
38
|
default: () => {};
|
|
39
39
|
};
|
|
40
40
|
}>, {
|
|
41
|
-
getClass: import('vue').ComputedRef<
|
|
41
|
+
getClass: import('vue').ComputedRef<import('vue').ClassValue[]>;
|
|
42
42
|
imgElRef: import('vue').Ref<HTMLImageElement | null | undefined, HTMLImageElement | null | undefined>;
|
|
43
43
|
getWrapperStyle: import('vue').ComputedRef<CSSProperties>;
|
|
44
44
|
getImageStyle: import('vue').ComputedRef<CSSProperties>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import _plugin_vue_export_helper_default from "../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
2
|
+
import Cropper_vue_vue_type_script_lang_default from "./Cropper.vue_vue_type_script_lang.mjs";
|
|
3
|
+
import './Cropper.vue_vue_type_style_index_0_lang.css';/* empty css */
|
|
4
|
+
import { createElementBlock, createElementVNode, normalizeClass, normalizeStyle, openBlock, vShow, withDirectives } from "vue";
|
|
5
|
+
//#region src/modules/Cropper/src/Cropper.vue
|
|
6
|
+
var _hoisted_1 = [
|
|
7
|
+
"src",
|
|
8
|
+
"alt",
|
|
9
|
+
"crossorigin"
|
|
10
|
+
];
|
|
11
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
12
|
+
return openBlock(), createElementBlock("div", {
|
|
13
|
+
class: normalizeClass(_ctx.getClass),
|
|
14
|
+
style: normalizeStyle(_ctx.getWrapperStyle)
|
|
15
|
+
}, [withDirectives(createElementVNode("img", {
|
|
16
|
+
ref: "imgElRef",
|
|
17
|
+
src: _ctx.src,
|
|
18
|
+
alt: _ctx.alt,
|
|
19
|
+
crossorigin: _ctx.crossorigin,
|
|
20
|
+
style: normalizeStyle(_ctx.getImageStyle)
|
|
21
|
+
}, null, 12, _hoisted_1), [[vShow, _ctx.isReady]])], 6);
|
|
22
|
+
}
|
|
23
|
+
var Cropper_default = /* @__PURE__ */ _plugin_vue_export_helper_default(Cropper_vue_vue_type_script_lang_default, [["render", _sfc_render]]);
|
|
24
|
+
//#endregion
|
|
25
|
+
export { Cropper_default as default };
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { useDesign } from "../../../hooks/useDesign.mjs";
|
|
2
|
+
import "../../../hooks/index.mjs";
|
|
3
|
+
import { computed, defineComponent, onMounted, onUnmounted, ref, unref } from "vue";
|
|
4
|
+
import { useDebounceFn } from "@vueuse/core";
|
|
5
|
+
import Cropper from "cropperjs";
|
|
6
|
+
import "cropperjs/dist/cropper.css";
|
|
7
|
+
//#region src/modules/Cropper/src/Cropper.vue?vue&type=script&lang.ts
|
|
8
|
+
var defaultOptions = {
|
|
9
|
+
aspectRatio: 1,
|
|
10
|
+
zoomable: true,
|
|
11
|
+
zoomOnTouch: true,
|
|
12
|
+
zoomOnWheel: true,
|
|
13
|
+
cropBoxMovable: true,
|
|
14
|
+
cropBoxResizable: true,
|
|
15
|
+
toggleDragModeOnDblclick: true,
|
|
16
|
+
autoCrop: true,
|
|
17
|
+
background: true,
|
|
18
|
+
highlight: true,
|
|
19
|
+
center: true,
|
|
20
|
+
responsive: true,
|
|
21
|
+
restore: true,
|
|
22
|
+
checkCrossOrigin: true,
|
|
23
|
+
checkOrientation: true,
|
|
24
|
+
scalable: true,
|
|
25
|
+
modal: true,
|
|
26
|
+
guides: true,
|
|
27
|
+
movable: true,
|
|
28
|
+
rotatable: true
|
|
29
|
+
};
|
|
30
|
+
var Cropper_vue_vue_type_script_lang_default = defineComponent({
|
|
31
|
+
name: "CropperImage",
|
|
32
|
+
props: {
|
|
33
|
+
src: {
|
|
34
|
+
type: String,
|
|
35
|
+
required: true
|
|
36
|
+
},
|
|
37
|
+
alt: { type: String },
|
|
38
|
+
circled: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default: false
|
|
41
|
+
},
|
|
42
|
+
realTimePreview: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: true
|
|
45
|
+
},
|
|
46
|
+
height: {
|
|
47
|
+
type: [String, Number],
|
|
48
|
+
default: "360px"
|
|
49
|
+
},
|
|
50
|
+
width: {
|
|
51
|
+
type: [String, Number],
|
|
52
|
+
default: "360px"
|
|
53
|
+
},
|
|
54
|
+
crossorigin: {
|
|
55
|
+
type: String,
|
|
56
|
+
default: void 0
|
|
57
|
+
},
|
|
58
|
+
imageStyle: {
|
|
59
|
+
type: Object,
|
|
60
|
+
default: () => ({})
|
|
61
|
+
},
|
|
62
|
+
options: {
|
|
63
|
+
type: Object,
|
|
64
|
+
default: () => ({})
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
emits: [
|
|
68
|
+
"cropend",
|
|
69
|
+
"ready",
|
|
70
|
+
"cropendError"
|
|
71
|
+
],
|
|
72
|
+
setup(props, { attrs, emit }) {
|
|
73
|
+
const imgElRef = ref();
|
|
74
|
+
const cropper = ref();
|
|
75
|
+
const isReady = ref(false);
|
|
76
|
+
const { prefixCls } = useDesign("cropper-image");
|
|
77
|
+
const debounceRealTimeCroppered = useDebounceFn(realTimeCroppered, 80);
|
|
78
|
+
const getImageStyle = computed(() => {
|
|
79
|
+
return {
|
|
80
|
+
height: props.height,
|
|
81
|
+
width: props.width,
|
|
82
|
+
maxWidth: "100%",
|
|
83
|
+
...props.imageStyle
|
|
84
|
+
};
|
|
85
|
+
});
|
|
86
|
+
const getClass = computed(() => {
|
|
87
|
+
return [
|
|
88
|
+
prefixCls,
|
|
89
|
+
attrs.class,
|
|
90
|
+
{ [`${prefixCls}--circled`]: props.circled }
|
|
91
|
+
];
|
|
92
|
+
});
|
|
93
|
+
const getWrapperStyle = computed(() => {
|
|
94
|
+
return {
|
|
95
|
+
height: `${props.height}`.replace(/px/, "") + "px",
|
|
96
|
+
width: `${props.width}`.replace(/px/, "") + "px"
|
|
97
|
+
};
|
|
98
|
+
});
|
|
99
|
+
onMounted(init);
|
|
100
|
+
onUnmounted(() => {
|
|
101
|
+
cropper.value?.destroy();
|
|
102
|
+
});
|
|
103
|
+
async function init() {
|
|
104
|
+
const imgEl = unref(imgElRef);
|
|
105
|
+
if (!imgEl) return;
|
|
106
|
+
cropper.value = new Cropper(imgEl, {
|
|
107
|
+
...defaultOptions,
|
|
108
|
+
ready: () => {
|
|
109
|
+
isReady.value = true;
|
|
110
|
+
realTimeCroppered();
|
|
111
|
+
emit("ready", cropper.value);
|
|
112
|
+
},
|
|
113
|
+
crop() {
|
|
114
|
+
debounceRealTimeCroppered();
|
|
115
|
+
},
|
|
116
|
+
zoom() {
|
|
117
|
+
debounceRealTimeCroppered();
|
|
118
|
+
},
|
|
119
|
+
cropmove() {
|
|
120
|
+
debounceRealTimeCroppered();
|
|
121
|
+
},
|
|
122
|
+
...props.options
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
function realTimeCroppered() {
|
|
126
|
+
props.realTimePreview && croppered();
|
|
127
|
+
}
|
|
128
|
+
function croppered() {
|
|
129
|
+
if (!cropper.value) return;
|
|
130
|
+
let imgInfo = cropper.value.getData();
|
|
131
|
+
(props.circled ? getRoundedCanvas() : cropper.value.getCroppedCanvas()).toBlob((blob) => {
|
|
132
|
+
if (!blob) return;
|
|
133
|
+
let fileReader = new FileReader();
|
|
134
|
+
fileReader.readAsDataURL(blob);
|
|
135
|
+
fileReader.onloadend = (e) => {
|
|
136
|
+
emit("cropend", {
|
|
137
|
+
imgBase64: e.target?.result ?? "",
|
|
138
|
+
imgInfo
|
|
139
|
+
});
|
|
140
|
+
};
|
|
141
|
+
fileReader.onerror = () => {
|
|
142
|
+
emit("cropendError");
|
|
143
|
+
};
|
|
144
|
+
}, "image/png");
|
|
145
|
+
}
|
|
146
|
+
function getRoundedCanvas() {
|
|
147
|
+
const sourceCanvas = cropper.value.getCroppedCanvas();
|
|
148
|
+
const canvas = document.createElement("canvas");
|
|
149
|
+
const context = canvas.getContext("2d");
|
|
150
|
+
const width = sourceCanvas.width;
|
|
151
|
+
const height = sourceCanvas.height;
|
|
152
|
+
canvas.width = width;
|
|
153
|
+
canvas.height = height;
|
|
154
|
+
context.imageSmoothingEnabled = true;
|
|
155
|
+
context.drawImage(sourceCanvas, 0, 0, width, height);
|
|
156
|
+
context.globalCompositeOperation = "destination-in";
|
|
157
|
+
context.beginPath();
|
|
158
|
+
context.arc(width / 2, height / 2, Math.min(width, height) / 2, 0, 2 * Math.PI, true);
|
|
159
|
+
context.fill();
|
|
160
|
+
return canvas;
|
|
161
|
+
}
|
|
162
|
+
return {
|
|
163
|
+
getClass,
|
|
164
|
+
imgElRef,
|
|
165
|
+
getWrapperStyle,
|
|
166
|
+
getImageStyle,
|
|
167
|
+
isReady,
|
|
168
|
+
croppered
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
//#endregion
|
|
173
|
+
export { Cropper_vue_vue_type_script_lang_default as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import _plugin_vue_export_helper_default from "../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
2
|
+
import CropperAvatar_vue_vue_type_script_setup_true_name_CropperAvatar_lang_default from "./CropperAvatar.vue_vue_type_script_setup_true_name_CropperAvatar_lang.mjs";
|
|
3
|
+
import './CropperAvatar.vue_vue_type_style_index_0_scoped_b5d65cd4_lang.css';/* empty css */
|
|
4
|
+
//#region src/modules/Cropper/src/CropperAvatar.vue
|
|
5
|
+
var CropperAvatar_default = /* @__PURE__ */ _plugin_vue_export_helper_default(CropperAvatar_vue_vue_type_script_setup_true_name_CropperAvatar_lang_default, [["__scopeId", "data-v-b5d65cd4"]]);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { CropperAvatar_default as default };
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { useDesign } from "../../../hooks/useDesign.mjs";
|
|
2
|
+
import "../../../hooks/index.mjs";
|
|
3
|
+
import { useModal as useModal$1 } from "../../global-modal/src/hooks/useModal.mjs";
|
|
4
|
+
import "../../global-modal/index.mjs";
|
|
5
|
+
import CopperModal_default from "./CopperModal.vue.mjs";
|
|
6
|
+
import { transformUrl } from "../hooks/useFile.mjs";
|
|
7
|
+
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeProps, normalizeClass, normalizeStyle, openBlock, ref, resolveComponent, toDisplayString, unref, watch, watchEffect, withCtx } from "vue";
|
|
8
|
+
import { t } from "@gct-paas/core";
|
|
9
|
+
//#region src/modules/Cropper/src/CropperAvatar.vue?vue&type=script&setup=true&name=CropperAvatar&lang.ts
|
|
10
|
+
var _hoisted_1 = ["src"];
|
|
11
|
+
var CropperAvatar_vue_vue_type_script_setup_true_name_CropperAvatar_lang_default = /* @__PURE__ */ defineComponent({
|
|
12
|
+
__name: "CropperAvatar",
|
|
13
|
+
props: {
|
|
14
|
+
width: {
|
|
15
|
+
type: [String, Number],
|
|
16
|
+
default: "200px"
|
|
17
|
+
},
|
|
18
|
+
value: { type: String },
|
|
19
|
+
showBtn: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: true
|
|
22
|
+
},
|
|
23
|
+
btnProps: { type: Object },
|
|
24
|
+
btnText: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: ""
|
|
27
|
+
},
|
|
28
|
+
uploadApi: { type: Function }
|
|
29
|
+
},
|
|
30
|
+
emits: ["update:value", "change"],
|
|
31
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
32
|
+
const props = __props;
|
|
33
|
+
const emit = __emit;
|
|
34
|
+
const defaultSrc = ref("");
|
|
35
|
+
const sourceValue = ref(transformUrl(props.value) || "");
|
|
36
|
+
const sourceUrlValue = ref(props.value || "");
|
|
37
|
+
const { prefixCls } = useDesign("cropper-avatar");
|
|
38
|
+
const [register, { openModal, closeModal }] = useModal$1();
|
|
39
|
+
const getClass = computed(() => [prefixCls]);
|
|
40
|
+
const getWidth = computed(() => `${props.width}`.replace(/px/, "") + "px");
|
|
41
|
+
const getIconWidth = computed(() => parseInt(`${props.width}`.replace(/px/, "")) / 2 + "px");
|
|
42
|
+
const getStyle = computed(() => ({ width: unref(getWidth) }));
|
|
43
|
+
const getImageWrapperStyle = computed(() => ({
|
|
44
|
+
width: unref(getWidth),
|
|
45
|
+
height: unref(getWidth)
|
|
46
|
+
}));
|
|
47
|
+
watchEffect(() => {
|
|
48
|
+
sourceValue.value = transformUrl(props.value) || "";
|
|
49
|
+
sourceUrlValue.value = props.value || "";
|
|
50
|
+
});
|
|
51
|
+
watch(() => sourceUrlValue.value, (v) => {
|
|
52
|
+
emit("update:value", v);
|
|
53
|
+
});
|
|
54
|
+
function handleUploadSuccess({ source, data }) {
|
|
55
|
+
sourceValue.value = transformUrl(data);
|
|
56
|
+
sourceUrlValue.value = data;
|
|
57
|
+
emit("change", {
|
|
58
|
+
source,
|
|
59
|
+
data
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
const handleClick = () => {
|
|
63
|
+
openModal();
|
|
64
|
+
};
|
|
65
|
+
__expose({
|
|
66
|
+
openModal: openModal.bind(null, true),
|
|
67
|
+
closeModal
|
|
68
|
+
});
|
|
69
|
+
return (_ctx, _cache) => {
|
|
70
|
+
const _component_Icon = resolveComponent("Icon");
|
|
71
|
+
const _component_a_button = resolveComponent("a-button");
|
|
72
|
+
return openBlock(), createElementBlock("div", {
|
|
73
|
+
class: normalizeClass(getClass.value),
|
|
74
|
+
style: normalizeStyle(getStyle.value)
|
|
75
|
+
}, [
|
|
76
|
+
createElementVNode("div", {
|
|
77
|
+
class: normalizeClass(`${unref(prefixCls)}-image-wrapper`),
|
|
78
|
+
style: normalizeStyle(getImageWrapperStyle.value),
|
|
79
|
+
onClick: handleClick
|
|
80
|
+
}, [createElementVNode("div", {
|
|
81
|
+
class: normalizeClass(`${unref(prefixCls)}-image-mask`),
|
|
82
|
+
style: normalizeStyle(getImageWrapperStyle.value)
|
|
83
|
+
}, [createVNode(_component_Icon, {
|
|
84
|
+
icon: "ant-design:edit-outlined",
|
|
85
|
+
size: getIconWidth.value,
|
|
86
|
+
style: normalizeStyle(getImageWrapperStyle.value),
|
|
87
|
+
color: "#d6d6d6"
|
|
88
|
+
}, null, 8, ["size", "style"])], 6), createElementVNode("img", {
|
|
89
|
+
src: __props.value ? sourceValue.value : defaultSrc.value,
|
|
90
|
+
alt: "avatar"
|
|
91
|
+
}, null, 8, _hoisted_1)], 6),
|
|
92
|
+
__props.showBtn ? (openBlock(), createBlock(_component_a_button, mergeProps({
|
|
93
|
+
key: 0,
|
|
94
|
+
class: `${unref(prefixCls)}-upload-btn`
|
|
95
|
+
}, __props.btnProps, { onClick: unref(openModal) }), {
|
|
96
|
+
default: withCtx(() => [createTextVNode(toDisplayString(__props.btnText ? __props.btnText : unref(t)("sys.component.cropper.selectImage")), 1)]),
|
|
97
|
+
_: 1
|
|
98
|
+
}, 16, ["class", "onClick"])) : createCommentVNode("", true),
|
|
99
|
+
createVNode(CopperModal_default, {
|
|
100
|
+
"upload-api": __props.uploadApi,
|
|
101
|
+
src: sourceValue.value,
|
|
102
|
+
"source-url-value": sourceUrlValue.value,
|
|
103
|
+
onRegister: unref(register),
|
|
104
|
+
onUploadSuccess: handleUploadSuccess
|
|
105
|
+
}, null, 8, [
|
|
106
|
+
"upload-api",
|
|
107
|
+
"src",
|
|
108
|
+
"source-url-value",
|
|
109
|
+
"onRegister"
|
|
110
|
+
])
|
|
111
|
+
], 6);
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
//#endregion
|
|
116
|
+
export { CropperAvatar_vue_vue_type_script_setup_true_name_CropperAvatar_lang_default as default };
|
package/es/modules/Cropper/src/CropperAvatar.vue_vue_type_style_index_0_scoped_b5d65cd4_lang.css
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
.gct-cropper-avatar[data-v-b5d65cd4] {
|
|
2
|
+
display: inline-block;
|
|
3
|
+
text-align: center;
|
|
4
|
+
}
|
|
5
|
+
.gct-cropper-avatar-image-wrapper[data-v-b5d65cd4] {
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
border: 1px solid var(--gct-color-border);
|
|
8
|
+
border-radius: 50%;
|
|
9
|
+
background: var(--gct-color-bg-1);
|
|
10
|
+
cursor: pointer;
|
|
11
|
+
position: relative;
|
|
12
|
+
}
|
|
13
|
+
.gct-cropper-avatar-image-wrapper img[data-v-b5d65cd4] {
|
|
14
|
+
width: 100%;
|
|
15
|
+
}
|
|
16
|
+
.gct-cropper-avatar-image-mask[data-v-b5d65cd4] {
|
|
17
|
+
position: absolute;
|
|
18
|
+
width: inherit;
|
|
19
|
+
height: inherit;
|
|
20
|
+
transition: opacity 0.4s;
|
|
21
|
+
border: inherit;
|
|
22
|
+
border-radius: inherit;
|
|
23
|
+
opacity: 0;
|
|
24
|
+
background: rgba(0, 0, 0, 0.4);
|
|
25
|
+
cursor: pointer;
|
|
26
|
+
left: -1px;
|
|
27
|
+
top: -1px;
|
|
28
|
+
}
|
|
29
|
+
.gct-cropper-avatar-image-mask[data-v-b5d65cd4] svg {
|
|
30
|
+
margin: auto;
|
|
31
|
+
width: 24px;
|
|
32
|
+
height: 24px;
|
|
33
|
+
}
|
|
34
|
+
.gct-cropper-avatar-image-mask[data-v-b5d65cd4]:hover {
|
|
35
|
+
opacity: 40;
|
|
36
|
+
}
|
|
37
|
+
.gct-cropper-avatar-upload-btn[data-v-b5d65cd4] {
|
|
38
|
+
margin: 10px auto;
|
|
39
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import _plugin_vue_export_helper_default from "../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
2
|
+
import CropperFree_vue_vue_type_script_setup_true_name_CropperPhoto_lang_default from "./CropperFree.vue_vue_type_script_setup_true_name_CropperPhoto_lang.mjs";
|
|
3
|
+
import './CropperFree.vue_vue_type_style_index_0_scoped_3cc5e19b_lang.css';/* empty css */
|
|
4
|
+
//#region src/modules/Cropper/src/CropperFree.vue
|
|
5
|
+
var CropperFree_default = /* @__PURE__ */ _plugin_vue_export_helper_default(CropperFree_vue_vue_type_script_setup_true_name_CropperPhoto_lang_default, [["__scopeId", "data-v-3cc5e19b"]]);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { CropperFree_default as default };
|
package/es/modules/Cropper/src/CropperFree.vue_vue_type_script_setup_true_name_CropperPhoto_lang.mjs
ADDED
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { useModal as useModal$1 } from "../../global-modal/src/hooks/useModal.mjs";
|
|
2
|
+
import "../../global-modal/index.mjs";
|
|
3
|
+
import { fileUrlParser } from "../hooks/useFile.mjs";
|
|
4
|
+
import CopperFreeModal_default from "./CopperFreeModal.vue.mjs";
|
|
5
|
+
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, normalizeClass, onBeforeUnmount, onMounted, openBlock, ref, resolveComponent, toDisplayString, unref, watch, watchEffect } from "vue";
|
|
6
|
+
import { t } from "@gct-paas/core";
|
|
7
|
+
import { message } from "ant-design-vue";
|
|
8
|
+
//#region src/modules/Cropper/src/CropperFree.vue?vue&type=script&setup=true&name=CropperPhoto&lang.ts
|
|
9
|
+
var _hoisted_1 = ["src"];
|
|
10
|
+
var _hoisted_2 = {
|
|
11
|
+
key: 0,
|
|
12
|
+
class: "iconfont icon-tupian-shili"
|
|
13
|
+
};
|
|
14
|
+
var _hoisted_3 = { class: "prompt" };
|
|
15
|
+
var _hoisted_4 = {
|
|
16
|
+
key: 0,
|
|
17
|
+
class: "auxiliary"
|
|
18
|
+
};
|
|
19
|
+
var prefixCls = "cropper-photo";
|
|
20
|
+
var CropperFree_vue_vue_type_script_setup_true_name_CropperPhoto_lang_default = /* @__PURE__ */ defineComponent({
|
|
21
|
+
__name: "CropperFree",
|
|
22
|
+
props: {
|
|
23
|
+
value: { type: String },
|
|
24
|
+
uploadApi: { type: Function },
|
|
25
|
+
aspectRatio: { type: Number },
|
|
26
|
+
auxiliary: { type: String },
|
|
27
|
+
icon: { type: String },
|
|
28
|
+
isDrag: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: false
|
|
31
|
+
},
|
|
32
|
+
accept: { type: Array },
|
|
33
|
+
beforeUpload: { type: Function },
|
|
34
|
+
modalTitle: { type: String },
|
|
35
|
+
uploadText: { type: String },
|
|
36
|
+
disabled: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
default: false
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
emits: ["update:value", "change"],
|
|
42
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
43
|
+
const props = __props;
|
|
44
|
+
const emit = __emit;
|
|
45
|
+
const sourceValue = ref(props.value || "");
|
|
46
|
+
const sourceValueForamtted = computed(() => {
|
|
47
|
+
return sourceValue.value ? fileUrlParser(sourceValue.value) : "";
|
|
48
|
+
});
|
|
49
|
+
const [register, { openModal, closeModal }] = useModal$1();
|
|
50
|
+
const disabled = computed(() => {
|
|
51
|
+
return props.disabled;
|
|
52
|
+
});
|
|
53
|
+
const acceptList = computed(() => {
|
|
54
|
+
return props.accept?.length ? [...new Set(props.accept?.some((i) => i === "jpg" || i === "jpeg") ? props.accept?.concat(["jpg", "jpeg"]) : props.accept)].map((i) => "image/" + i) : [
|
|
55
|
+
"image/jpg",
|
|
56
|
+
"image/jpeg",
|
|
57
|
+
"image/png"
|
|
58
|
+
];
|
|
59
|
+
});
|
|
60
|
+
watchEffect(() => {
|
|
61
|
+
sourceValue.value = props.value || "";
|
|
62
|
+
});
|
|
63
|
+
watch(() => sourceValue.value, (v) => {
|
|
64
|
+
emit("update:value", v);
|
|
65
|
+
});
|
|
66
|
+
onBeforeUnmount(() => {});
|
|
67
|
+
onMounted(() => {
|
|
68
|
+
const dropzone = document.getElementById("dropzone");
|
|
69
|
+
dropzone?.addEventListener("dragover", (e) => {
|
|
70
|
+
e.stopPropagation();
|
|
71
|
+
e.preventDefault();
|
|
72
|
+
});
|
|
73
|
+
dropzone?.addEventListener("drop", (e) => {
|
|
74
|
+
e.stopPropagation();
|
|
75
|
+
e.preventDefault();
|
|
76
|
+
const file = e.dataTransfer?.files[0];
|
|
77
|
+
console.log(e, file);
|
|
78
|
+
if (file) {
|
|
79
|
+
if (!acceptList.value.includes(file.type)) {
|
|
80
|
+
message.warning(t("sys.component.cropper.acceptTip"));
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
openModal(true, { file });
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
function handleUploadSuccess({ source, data }) {
|
|
88
|
+
sourceValue.value = data;
|
|
89
|
+
emit("change", {
|
|
90
|
+
source,
|
|
91
|
+
data
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
function handlePreview() {}
|
|
95
|
+
function handleDelete() {
|
|
96
|
+
sourceValue.value = "";
|
|
97
|
+
}
|
|
98
|
+
const handleClick = () => {
|
|
99
|
+
openModal();
|
|
100
|
+
};
|
|
101
|
+
__expose({
|
|
102
|
+
openModal: openModal.bind(null, true),
|
|
103
|
+
closeModal
|
|
104
|
+
});
|
|
105
|
+
return (_ctx, _cache) => {
|
|
106
|
+
const _component_Icon = resolveComponent("Icon");
|
|
107
|
+
return openBlock(), createElementBlock("div", {
|
|
108
|
+
id: "dropzone",
|
|
109
|
+
class: normalizeClass([prefixCls, disabled.value && "not-allow"])
|
|
110
|
+
}, [sourceValueForamtted.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createElementVNode("div", { class: normalizeClass(`${prefixCls}__wrapper`) }, [createElementVNode("img", { src: sourceValueForamtted.value }, null, 8, _hoisted_1)], 2), createElementVNode("div", { class: normalizeClass(`${prefixCls}__mask`) }, [
|
|
111
|
+
createVNode(_component_Icon, {
|
|
112
|
+
icon: "ant-design:eye-outlined",
|
|
113
|
+
size: 24,
|
|
114
|
+
color: "#ffffff",
|
|
115
|
+
onClick: handlePreview
|
|
116
|
+
}),
|
|
117
|
+
createVNode(_component_Icon, {
|
|
118
|
+
icon: "ant-design:edit-outlined",
|
|
119
|
+
size: 24,
|
|
120
|
+
color: "#ffffff",
|
|
121
|
+
onClick: unref(openModal)
|
|
122
|
+
}, null, 8, ["onClick"]),
|
|
123
|
+
createVNode(_component_Icon, {
|
|
124
|
+
icon: "ant-design:delete-outlined",
|
|
125
|
+
size: 24,
|
|
126
|
+
color: "#ffffff",
|
|
127
|
+
onClick: handleDelete
|
|
128
|
+
})
|
|
129
|
+
], 2)], 64)) : (openBlock(), createElementBlock("div", {
|
|
130
|
+
key: 1,
|
|
131
|
+
class: normalizeClass(`${prefixCls}__trigger`),
|
|
132
|
+
onClick: handleClick
|
|
133
|
+
}, [
|
|
134
|
+
__props.icon ? (openBlock(), createElementBlock("i", _hoisted_2)) : (openBlock(), createBlock(_component_Icon, {
|
|
135
|
+
key: 1,
|
|
136
|
+
icon: "ant-design:plus-outlined",
|
|
137
|
+
size: 36
|
|
138
|
+
})),
|
|
139
|
+
__props.isDrag ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [createElementVNode("p", _hoisted_3, toDisplayString(_ctx.$t("sys.pageDesigner.clickOrDragToUpload")), 1), __props.accept ? (openBlock(), createElementBlock("p", _hoisted_4, toDisplayString(`支持${__props.accept?.join("、")}图片格式,大小100KB以内`), 1)) : createCommentVNode("", true)], 64)) : createCommentVNode("", true),
|
|
140
|
+
!__props.auxiliary ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [createTextVNode(toDisplayString(unref(t)("sys.clickToDoSth", { sth: unref(t)("sys.add") })), 1)], 64)) : createCommentVNode("", true)
|
|
141
|
+
], 2)), createVNode(CopperFreeModal_default, {
|
|
142
|
+
"upload-api": __props.uploadApi,
|
|
143
|
+
"aspect-ratio": __props.aspectRatio,
|
|
144
|
+
src: sourceValueForamtted.value,
|
|
145
|
+
accept: __props.accept,
|
|
146
|
+
"before-upload": __props.beforeUpload,
|
|
147
|
+
title: __props.modalTitle,
|
|
148
|
+
"upload-text": __props.uploadText,
|
|
149
|
+
onRegister: unref(register),
|
|
150
|
+
onUploadSuccess: handleUploadSuccess
|
|
151
|
+
}, null, 8, [
|
|
152
|
+
"upload-api",
|
|
153
|
+
"aspect-ratio",
|
|
154
|
+
"src",
|
|
155
|
+
"accept",
|
|
156
|
+
"before-upload",
|
|
157
|
+
"title",
|
|
158
|
+
"upload-text",
|
|
159
|
+
"onRegister"
|
|
160
|
+
])], 2);
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
//#endregion
|
|
165
|
+
export { CropperFree_vue_vue_type_script_setup_true_name_CropperPhoto_lang_default as default };
|