cnhis-design-vue 3.1.40-beta.12 → 3.1.40-beta.16
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/es/_virtual/plugin-vue_export-helper.js +1 -9
- package/es/components/annotation-edit/index.js +1 -10
- package/es/components/annotation-edit/src/AnnotationEdit.js +1 -164
- package/es/components/big-table/index.js +1 -15
- package/es/components/big-table/src/BigTable.vue.js +1 -6
- package/es/components/big-table/src/BigTable.vue2.js +1 -2498
- package/es/components/big-table/src/bigTableEmits.js +1 -53
- package/es/components/big-table/src/bigTableProps.js +1 -120
- package/es/components/big-table/src/bigTableState.js +1 -62
- package/es/components/big-table/src/components/NoData.vue.js +1 -74
- package/es/components/big-table/src/components/edit-form/edit-date.js +1 -214
- package/es/components/big-table/src/components/edit-form/edit-input.js +1 -95
- package/es/components/big-table/src/components/edit-form/edit-select.js +1 -139
- package/es/components/big-table/src/components/edit-form/edit-separate.vue.js +1 -103
- package/es/components/big-table/src/components/edit-form/edit-time.js +1 -122
- package/es/components/big-table/src/components/edit-form/useCommon.js +1 -23
- package/es/components/big-table/src/components/input-button.vue.js +1 -39
- package/es/components/big-table/src/components/separate.vue.js +1 -30
- package/es/components/big-table/src/constants/index.js +1 -3
- package/es/components/big-table/src/hooks/index.js +1 -9
- package/es/components/big-table/src/hooks/useAnchor.js +1 -49
- package/es/components/big-table/src/hooks/useAnnotation.js +1 -21
- package/es/components/big-table/src/hooks/useBatchEditing.js +1 -301
- package/es/components/big-table/src/hooks/useEdit.js +1 -133
- package/es/components/big-table/src/hooks/useEvent.js +1 -95
- package/es/components/big-table/src/hooks/useFormat.js +1 -507
- package/es/components/big-table/src/hooks/useNestTable.js +1 -86
- package/es/components/big-table/src/hooks/useSeparateRow.js +1 -177
- package/es/components/big-table/src/hooks/useTableParse.js +1 -142
- package/es/components/big-table/src/utils.js +1 -618
- package/es/components/bpmn-workflow/index.js +1 -10
- package/es/components/bpmn-workflow/src/BpmnWorkflow.vue.js +1 -258
- package/es/components/bpmn-workflow/src/custom/customModeler/customBpmn/BpmnRenderer.js +1 -1452
- package/es/components/bpmn-workflow/src/custom/customModeler/customBpmn/CustomPathMap.js +1 -99
- package/es/components/bpmn-workflow/src/custom/customModeler/customBpmn/CustomRenderer.js +1 -114
- package/es/components/bpmn-workflow/src/custom/customModeler/customBpmn/CustomRules.js +1 -40
- package/es/components/bpmn-workflow/src/custom/customOtherModule/customViewerRenderer.js +1 -14
- package/es/components/bpmn-workflow/src/custom/customOtherModule/zoomScroll.js +1 -10
- package/es/components/button-print/index.js +1 -12
- package/es/components/button-print/src/ButtonPrint.vue.js +1 -6
- package/es/components/button-print/src/ButtonPrint.vue2.js +1 -528
- package/es/components/button-print/src/components/EditFormat.vue.js +1 -173
- package/es/components/button-print/src/components/IdentityVerification.vue.js +1 -182
- package/es/components/button-print/src/components/Preview.vue.js +1 -6
- package/es/components/button-print/src/components/Preview.vue2.js +1 -67
- package/es/components/button-print/src/utils/browserPrint.d.ts +2 -1
- package/es/components/button-print/src/utils/browserPrint.js +1 -43
- package/es/components/button-print/src/utils/dialog.js +1 -121
- package/es/components/button-print/src/utils/index.js +1 -2
- package/es/components/button-print/src/utils/print.d.ts +5 -1
- package/es/components/button-print/src/utils/print.js +1 -432
- package/es/components/editor/index.js +1 -10
- package/es/components/editor/src/Editor.js +1 -77
- package/es/components/fabric-chart/index.js +1 -10
- package/es/components/fabric-chart/src/FabricChart.vue.js +1 -71
- package/es/components/fabric-chart/src/components/PopupMenu.js +1 -118
- package/es/components/fabric-chart/src/components/PopupTip.vue.js +1 -34
- package/es/components/fabric-chart/src/components/useStyle.js +1 -36
- package/es/components/fabric-chart/src/hooks/constant.js +1 -78
- package/es/components/fabric-chart/src/hooks/index.js +1 -11
- package/es/components/fabric-chart/src/hooks/useBirthProcess.js +1 -642
- package/es/components/fabric-chart/src/hooks/useBirthProcessChart.js +1 -153
- package/es/components/fabric-chart/src/hooks/useBottom.js +1 -91
- package/es/components/fabric-chart/src/hooks/useCenter.js +1 -734
- package/es/components/fabric-chart/src/hooks/useCommon.js +1 -32
- package/es/components/fabric-chart/src/hooks/useCumputedPoint.js +1 -79
- package/es/components/fabric-chart/src/hooks/useDraw.js +1 -182
- package/es/components/fabric-chart/src/hooks/useEvent.js +1 -146
- package/es/components/fabric-chart/src/hooks/useGrid.js +1 -54
- package/es/components/fabric-chart/src/hooks/useLeft.js +1 -331
- package/es/components/fabric-chart/src/hooks/useOther.js +1 -95
- package/es/components/fabric-chart/src/hooks/useRight.js +1 -22
- package/es/components/fabric-chart/src/hooks/useShadow.js +1 -132
- package/es/components/fabric-chart/src/hooks/useTemperatureChart.js +1 -341
- package/es/components/fabric-chart/src/hooks/useTop.js +1 -154
- package/es/components/fabric-chart/src/utils/index.js +1 -15624
- package/es/components/fabric-chart/src/utils/utils.js +1 -32
- package/es/components/field-set/index.js +1 -10
- package/es/components/field-set/src/FieldSet.vue.js +1 -470
- package/es/components/form-config/index.js +1 -10
- package/es/components/form-config/src/FormConfig.vue.js +1 -124
- package/es/components/form-config/src/components/FormConfigCreator.vue.js +1 -100
- package/es/components/form-config/src/components/FormConfigDragDisplay.vue.js +1 -45
- package/es/components/form-config/src/components/FormConfigEdit.vue.js +1 -97
- package/es/components/form-config/src/components/FormConfigMaterialItem.js +1 -28
- package/es/components/form-config/src/components/index.js +1 -6
- package/es/components/form-config/src/components/renderer/CloseButton.vue.js +1 -45
- package/es/components/form-config/src/components/renderer/ComplexNode.vue.js +1 -45
- package/es/components/form-config/src/components/renderer/DefaultNode.vue.js +1 -60
- package/es/components/form-config/src/components/renderer/index.js +1 -3
- package/es/components/form-config/src/constants/index.js +1 -61
- package/es/components/form-config/src/hooks/index.js +1 -3
- package/es/components/form-config/src/hooks/useConfigurationField.js +1 -90
- package/es/components/form-config/src/hooks/useDataNormalize.js +1 -35
- package/es/components/form-config/src/hooks/usePresetRenderer.js +1 -36
- package/es/components/form-config/src/hooks/useSortalbeConfig.js +1 -42
- package/es/components/form-config/src/utils/index.js +1 -26
- package/es/components/form-render/index.js +1 -30
- package/es/components/form-render/src/FormRender.vue.js +1 -239
- package/es/components/form-render/src/FormRenderWrapper.vue.js +1 -49
- package/es/components/form-render/src/components/renderer/combination.js +1 -114
- package/es/components/form-render/src/components/renderer/complex.js +1 -37
- package/es/components/form-render/src/components/renderer/date.js +1 -171
- package/es/components/form-render/src/components/renderer/formItem.js +1 -128
- package/es/components/form-render/src/components/renderer/index.js +1 -43
- package/es/components/form-render/src/components/renderer/input.js +1 -50
- package/es/components/form-render/src/components/renderer/inputGroup.js +1 -11
- package/es/components/form-render/src/components/renderer/inputNumber.js +1 -55
- package/es/components/form-render/src/components/renderer/jsonCombination/hooks/useDeepValidate.js +1 -35
- package/es/components/form-render/src/components/renderer/jsonCombination/index.js +1 -175
- package/es/components/form-render/src/components/renderer/levelSearchCascader.js +1 -274
- package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.js +1 -71
- package/es/components/form-render/src/components/renderer/lineBar/index.js +1 -11
- package/es/components/form-render/src/components/renderer/radio_checkbox.js +1 -111
- package/es/components/form-render/src/components/renderer/remoteSearch.js +1 -139
- package/es/components/form-render/src/components/renderer/searchCascade.js +1 -244
- package/es/components/form-render/src/components/renderer/select.js +1 -176
- package/es/components/form-render/src/components/renderer/simpleComponent.js +1 -57
- package/es/components/form-render/src/components/renderer/slider.js +1 -38
- package/es/components/form-render/src/components/renderer/switch.js +1 -48
- package/es/components/form-render/src/components/renderer/textarea.js +1 -36
- package/es/components/form-render/src/components/tooltipMessage.vue.js +1 -37
- package/es/components/form-render/src/constants/index.js +1 -59
- package/es/components/form-render/src/hooks/index.js +1 -15
- package/es/components/form-render/src/hooks/useAnchor.js +1 -99
- package/es/components/form-render/src/hooks/useAsyncQueue.js +1 -153
- package/es/components/form-render/src/hooks/useAutoHidden.js +1 -43
- package/es/components/form-render/src/hooks/useBusinessBinding.js +1 -119
- package/es/components/form-render/src/hooks/useChangeContext.js +1 -20
- package/es/components/form-render/src/hooks/useCommonInjection.js +1 -43
- package/es/components/form-render/src/hooks/useCommonLog.js +1 -12
- package/es/components/form-render/src/hooks/useComplexOptions.js +1 -225
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -290
- package/es/components/form-render/src/hooks/useFieldNormalize.js +1 -65
- package/es/components/form-render/src/hooks/useFieldVisitor.js +1 -46
- package/es/components/form-render/src/hooks/useFormContext.js +1 -70
- package/es/components/form-render/src/hooks/useFormEvent.js +1 -140
- package/es/components/form-render/src/hooks/useFormField.js +1 -13
- package/es/components/form-render/src/hooks/useFormItemDeps.js +1 -31
- package/es/components/form-render/src/hooks/useFormRenderLifeCycle.js +1 -10
- package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -278
- package/es/components/form-render/src/hooks/useFormRequest.js +1 -42
- package/es/components/form-render/src/hooks/useFormValidator.js +1 -83
- package/es/components/form-render/src/hooks/useLowCodeReactions.js +1 -85
- package/es/components/form-render/src/hooks/useNuiThemeOverrides.js +1 -18
- package/es/components/form-render/src/hooks/usePresetScope.js +1 -22
- package/es/components/form-render/src/types/fieldItem.js +1 -1
- package/es/components/form-render/src/types/index.js +1 -1
- package/es/components/form-render/src/utils/business.js +1 -114
- package/es/components/form-render/src/utils/dom.js +1 -38
- package/es/components/form-render/src/utils/index.js +1 -241
- package/es/components/form-render/src/utils/schema.js +1 -105
- package/es/components/grid/index.js +1 -11
- package/es/components/grid/src/Grid.js +1 -28
- package/es/components/grid/src/hooks.js +1 -168
- package/es/components/iho-table/index.js +1 -36
- package/es/components/iho-table/src/IhoTable.vue.js +1 -157
- package/es/components/iho-table/src/constants/index.js +1 -157
- package/es/components/iho-table/src/hooks/export.js +1 -2
- package/es/components/iho-table/src/hooks/index.js +1 -2
- package/es/components/iho-table/src/hooks/tapHooks/index.js +1 -159
- package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks.js +1 -67
- package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.js +1 -26
- package/es/components/iho-table/src/hooks/tapHooks/useDomInsertHooks.js +1 -27
- package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.js +1 -280
- package/es/components/iho-table/src/hooks/tapHooks/useExposeHooks.js +1 -26
- package/es/components/iho-table/src/hooks/tapHooks/useFieldHooks.js +1 -38
- package/es/components/iho-table/src/hooks/tapHooks/useSetupHooks.js +1 -27
- package/es/components/iho-table/src/hooks/useColumnConfigAdaptor.js +1 -164
- package/es/components/iho-table/src/hooks/useTableContext.js +1 -17
- package/es/components/iho-table/src/hooks/useTablePlugin.js +1 -20
- package/es/components/iho-table/src/plugins/anchorPlugin/index.js +1 -19
- package/es/components/iho-table/src/plugins/anchorPlugin/tableAnchor.js +1 -51
- package/es/components/iho-table/src/plugins/anchorPlugin/useAnchor.js +1 -87
- package/es/components/iho-table/src/plugins/defaultConfigPlugin/index.js +1 -48
- package/es/components/iho-table/src/plugins/filterPlugin/filter.vue.js +1 -230
- package/es/components/iho-table/src/plugins/filterPlugin/index.js +1 -240
- package/es/components/iho-table/src/plugins/index.js +1 -47
- package/es/components/iho-table/src/plugins/keyboardEventPlugin/index.js +1 -30
- package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +1 -127
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.js +1 -203
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/index.js +1 -41
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useAutoFocus.js +1 -21
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/inputRendererPlugin.js +1 -41
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +1 -79
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -64
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -46
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js +1 -16
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue.js +1 -108
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +1 -163
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/separateUtils.js +1 -42
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin.js +1 -50
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/checkRendererPlugin.js +1 -30
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/colorRendererPlugin.js +1 -48
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/defaultRendererPlugin.js +1 -62
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/labelRendererPlugin.js +1 -52
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/pictureRendererPlugin.js +1 -92
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/seqRendererPlugin.js +1 -59
- package/es/components/iho-table/src/plugins/rowClickPlugin/index.js +1 -34
- package/es/components/iho-table/src/plugins/rowGroupSettingPlugin/index.js +1 -30
- package/es/components/iho-table/src/plugins/rowGroupSettingPlugin/rowGroupUtils.js +1 -53
- package/es/components/iho-table/src/plugins/virtualTreePlugin/index.js +1 -100
- package/es/components/iho-table/src/types/index.js +1 -1
- package/es/components/iho-table/src/types/pluginType.js +1 -16
- package/es/components/iho-table/src/utils/index.js +1 -169
- package/es/components/index.js +1 -119
- package/es/components/info-header/index.js +1 -10
- package/es/components/info-header/src/HiddenContent.vue.js +1 -70
- package/es/components/info-header/src/InfoEllipsis.vue.js +1 -43
- package/es/components/info-header/src/InfoHeader.vue.js +1 -313
- package/es/components/insurance-sdk/index.js +1 -1
- package/es/components/insurance-sdk/src/constants/index.js +1 -160
- package/es/components/insurance-sdk/src/utils/index.js +1 -1
- package/es/components/insurance-sdk/src/utils/insurance.js +1 -268
- package/es/components/keyboard/index.d.ts +1 -1
- package/es/components/keyboard/index.js +1 -10
- package/es/components/keyboard/src/Keyboard.vue.d.ts +1 -1
- package/es/components/keyboard/src/Keyboard.vue.js +1 -164
- package/es/components/keyboard/src/components/InputNumber.vue.js +1 -86
- package/es/components/keyboard/src/components/NumberPanel.vue.d.ts +1 -1
- package/es/components/keyboard/src/components/NumberPanel.vue.js +1 -299
- package/es/components/keyboard/src/utils/index.js +1 -5
- package/es/components/map/index.js +1 -10
- package/es/components/map/src/Map.vue.js +1 -336
- package/es/components/recommend-search/index.js +1 -10
- package/es/components/recommend-search/src/RecommendSearch.vue.js +1 -63
- package/es/components/recommend-search/src/components/BaseSearch.vue.js +1 -157
- package/es/components/recommend-search/src/components/RecommendInput.vue.js +1 -125
- package/es/components/recommend-search/src/components/RecommendMenu.vue.js +1 -104
- package/es/components/recommend-search/src/components/RecommendSelect.vue.js +1 -146
- package/es/components/recommend-search/src/constant/index.js +1 -7
- package/es/components/scale-view/index.js +1 -35
- package/es/components/scale-view/src/ScaleView.vue.js +1 -429
- package/es/components/scale-view/src/components/AnswerParse.vue.js +1 -80
- package/es/components/scale-view/src/components/EvaluateCountdown.vue.js +1 -117
- package/es/components/scale-view/src/components/EvaluatePage.vue.js +1 -141
- package/es/components/scale-view/src/components/LoadingCom.vue.js +1 -19
- package/es/components/scale-view/src/components/NoData.vue.js +1 -74
- package/es/components/scale-view/src/components/ScaleScore.js +1 -63
- package/es/components/scale-view/src/components/composables/choose-common.js +1 -83
- package/es/components/scale-view/src/components/formitem/address.js +1 -3993
- package/es/components/scale-view/src/components/formitem/r-address.js +1 -226
- package/es/components/scale-view/src/components/formitem/r-cascader.js +1 -133
- package/es/components/scale-view/src/components/formitem/r-checkbox.js +1 -281
- package/es/components/scale-view/src/components/formitem/r-collection.js +1 -111
- package/es/components/scale-view/src/components/formitem/r-datetime.js +1 -212
- package/es/components/scale-view/src/components/formitem/r-input.js +1 -86
- package/es/components/scale-view/src/components/formitem/r-map.js +1 -106
- package/es/components/scale-view/src/components/formitem/r-radio.js +1 -240
- package/es/components/scale-view/src/components/formitem/r-select.js +1 -202
- package/es/components/scale-view/src/components/formitem/r-sign.js +1 -177
- package/es/components/scale-view/src/components/formitem/r-upload.js +1 -215
- package/es/components/scale-view/src/components/formitem/sign-com.js +1 -307
- package/es/components/scale-view/src/components/formitem/standard-modal.js +1 -129
- package/es/components/scale-view/src/hooks/scaleview-computed.js +1 -354
- package/es/components/scale-view/src/hooks/scaleview-init.js +1 -437
- package/es/components/scale-view/src/hooks/scaleview-props.js +1 -81
- package/es/components/scale-view/src/hooks/scaleview-state.js +1 -38
- package/es/components/scale-view/src/hooks/scaleview-submit.js +1 -154
- package/es/components/scale-view/src/hooks/scaleview-validate.js +1 -187
- package/es/components/scale-view/src/hooks/use-component.js +1 -86
- package/es/components/scale-view/src/hooks/use-evaluate.js +1 -150
- package/es/components/scale-view/src/hooks/use-event.js +1 -129
- package/es/components/scale-view/src/hooks/use-noData.js +1 -41
- package/es/components/scale-view/src/utils/judge-types.js +1 -36
- package/es/components/search-cascader/index.js +1 -10
- package/es/components/search-cascader/src/SearchCascader.vue.js +1 -194
- package/es/components/search-cascader/src/components/SearchMenu.js +1 -196
- package/es/components/search-cascader/src/components/index.js +1 -1
- package/es/components/search-cascader/src/constants/index.js +1 -11
- package/es/components/search-cascader/src/hooks/index.js +1 -1
- package/es/components/search-cascader/src/hooks/useCssVariable.js +1 -7
- package/es/components/search-cascader/src/utils/index.js +1 -11
- package/es/components/select-label/index.js +1 -15
- package/es/components/select-label/src/LabelFormContent.vue.js +1 -447
- package/es/components/select-label/src/SelectLabel.vue.js +1 -6
- package/es/components/select-label/src/SelectLabel.vue2.js +1 -451
- package/es/components/select-label/src/components/label-classify.vue.js +1 -132
- package/es/components/select-person/index.js +1 -10
- package/es/components/select-person/src/SelectPerson.vue.js +1 -6
- package/es/components/select-person/src/SelectPerson.vue2.js +1 -303
- package/es/components/select-person/src/utils/index.js +1 -58
- package/es/components/shortcut-provider/index.js +1 -12
- package/es/components/shortcut-provider/src/ShortcutProvider.vue.js +1 -42
- package/es/components/shortcut-provider/src/constants/index.js +1 -8
- package/es/components/shortcut-provider/src/hooks/index.js +1 -2
- package/es/components/shortcut-provider/src/hooks/useShortcutSignature.js +1 -12
- package/es/components/shortcut-provider/src/hooks/useShortcuts.js +1 -188
- package/es/components/shortcut-provider/src/utils/index.js +1 -92
- package/es/components/shortcut-setter/index.js +1 -10
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.js +1 -98
- package/es/components/shortcut-setter/src/ShortcutSetterItem.vue.js +1 -76
- package/es/components/steps-wheel/index.js +1 -10
- package/es/components/steps-wheel/src/StepsWheel.vue.js +1 -376
- package/es/components/table-filter/index.js +1 -21
- package/es/components/table-filter/src/base-search-com/BaseSearch.vue.js +1 -2272
- package/es/components/table-filter/src/classification/Classification-com.vue.js +1 -1315
- package/es/components/table-filter/src/classification/search-class-name.vue.js +1 -195
- package/es/components/table-filter/src/classification/search-professional-model.vue.js +1 -594
- package/es/components/table-filter/src/components/age-com/index.vue.js +1 -185
- package/es/components/table-filter/src/components/button-group/ButtonGroup.vue.js +1 -86
- package/es/components/table-filter/src/components/button-icon/getBtnIcon.js +1 -30
- package/es/components/table-filter/src/components/c-tree-select/tree-select.vue.js +1 -253
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.js +1 -114
- package/es/components/table-filter/src/components/classify-filter/helpers/options.js +1 -14
- package/es/components/table-filter/src/components/classify-filter/hooks/useDisplayCategory.js +1 -87
- package/es/components/table-filter/src/components/classify-filter/hooks/useFilterConditions.js +1 -147
- package/es/components/table-filter/src/components/classify-filter/index.vue.js +1 -304
- package/es/components/table-filter/src/components/multi-select/multi-select.vue.js +1 -153
- package/es/components/table-filter/src/components/out-quick-search/out-quick-search.vue.js +1 -310
- package/es/components/table-filter/src/components/range-age/index.vue.js +1 -137
- package/es/components/table-filter/src/components/render-widget/components/CheckboxGroup.vue.js +1 -64
- package/es/components/table-filter/src/components/render-widget/components/Select.vue.js +1 -45
- package/es/components/table-filter/src/components/render-widget/components/index.js +1 -2
- package/es/components/table-filter/src/components/render-widget/enums.js +1 -27
- package/es/components/table-filter/src/components/render-widget/helpers/presetValToTimestamp.js +1 -70
- package/es/components/table-filter/src/components/render-widget/index.vue.js +1 -107
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -152
- package/es/components/table-filter/src/components/search-condition/SearchCondition.vue.js +1 -1520
- package/es/components/table-filter/src/components/search-condition/fieldTypeList.js +1 -171
- package/es/components/table-filter/src/components/search-filter/SearchFilter.vue.js +1 -199
- package/es/components/table-filter/src/components/search-modal/set-classification.vue.js +1 -241
- package/es/components/table-filter/src/components/table-modal/TableModal.vue.js +1 -526
- package/es/components/table-filter/src/const/dataOptions.js +1 -107
- package/es/components/table-filter/src/const/index.js +1 -5
- package/es/components/table-filter/src/directive/flexibleResize.js +1 -157
- package/es/components/table-filter/src/directive/preventReClick.js +1 -14
- package/es/components/table-filter/src/directive/resize.js +1 -12
- package/es/components/table-filter/src/hooks/export.js +1 -1
- package/es/components/table-filter/src/hooks/useAdvanced.js +1 -64
- package/es/components/table-filter/src/hooks/useMixins.js +1 -532
- package/es/components/table-filter/src/hooks/useRenderWidget.js +1 -94
- package/es/components/table-filter/src/hooks/useTableSearchCon.js +1 -131
- package/es/components/table-filter/src/hooks/useWordBookutils.js +1 -91
- package/es/components/table-filter/src/quick-search/QuickSearch.vue.js +1 -2038
- package/es/components/table-filter/src/tool/generateDefOptions.js +1 -65
- package/es/components/table-filter/src/tool/getWidgetType.js +1 -27
- package/es/components/table-filter/src/tool/options.js +1 -200
- package/es/components/table-filter/src/tool/resizeSensor.js +1 -123
- package/es/components/table-filter/src/tool/time-domain.js +1 -100
- package/es/components/table-filter/src/tool/transformData.js +1 -169
- package/es/components/table-filter/src/tool/utils.js +1 -29
- package/es/components/table-filter/src/types/enums.js +1 -67
- package/es/components/time-line/index.js +1 -10
- package/es/components/time-line/src/TimeLine.vue.js +1 -70
- package/es/components/vod-chunk-upload/index.js +1 -14
- package/es/components/vod-chunk-upload/src/chunk-upload-new.vue.js +1 -480
- package/es/components/vod-chunk-upload/src/hooks/upload-computed.js +1 -70
- package/es/components/vod-chunk-upload/src/hooks/upload-data.js +1 -96
- package/es/components/vod-chunk-upload/src/hooks/vod-computed.js +1 -79
- package/es/components/vod-chunk-upload/src/hooks/vod-data.js +1 -28
- package/es/components/vod-chunk-upload/src/vod-chunk-upload/index.js +1 -2
- package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue.js +1 -332
- package/es/components/vod-chunk-upload/src/vod-upload-modal.js +1 -94
- package/es/shared/assets/img/failure.png.js +1 -3
- package/es/shared/assets/img/no-permission.png.js +1 -3
- package/es/shared/assets/img/nodata.png.js +1 -3
- package/es/shared/assets/img/notfound.png.js +1 -3
- package/es/shared/assets/img/qr.png.js +1 -3
- package/es/shared/assets/img/success.png.js +1 -3
- package/es/shared/assets/img/video.png.js +1 -3
- package/es/shared/assets/img/video_default_cover.png.js +1 -3
- package/es/shared/assets/img/xb_big.png.js +1 -3
- package/es/shared/assets/img/xb_small.png.js +1 -3
- package/es/shared/components/SelectPage/SelectPage.vue.js +1 -61
- package/es/shared/components/SelectPage/index.js +1 -2
- package/es/shared/components/SlotRender/SlotRender.js +1 -35
- package/es/shared/components/SlotRender/index.js +1 -2
- package/es/shared/components/SvgIcon/SvgIcon.vue.js +1 -36
- package/es/shared/components/SvgIcon/index.js +1 -2
- package/es/shared/components/TextOverTooltip/TextOverTooltip.vue.js +1 -77
- package/es/shared/components/TextOverTooltip/index.js +1 -2
- package/es/shared/components/VueDraggable/index.js +1 -2
- package/es/shared/components/VueDraggable/src/core/componentBuilderHelper.js +1 -35
- package/es/shared/components/VueDraggable/src/core/componentStructure.js +1 -54
- package/es/shared/components/VueDraggable/src/core/renderHelper.js +1 -47
- package/es/shared/components/VueDraggable/src/core/sortableEvents.js +1 -14
- package/es/shared/components/VueDraggable/src/util/console.js +1 -9
- package/es/shared/components/VueDraggable/src/util/htmlHelper.js +1 -11
- package/es/shared/components/VueDraggable/src/util/string.js +1 -11
- package/es/shared/components/VueDraggable/src/util/tags.js +1 -130
- package/es/shared/components/VueDraggable/src/vuedraggable.js +1 -265
- package/es/shared/components/no-data/NoData.vue.js +1 -74
- package/es/shared/components/no-data/index.js +1 -2
- package/es/shared/components/player-vod/player.js +1 -121
- package/es/shared/components/player-vod/video-modal.js +1 -91
- package/es/shared/global/variable.js +1 -3
- package/es/shared/utils/anime.js +1 -129
- package/es/shared/utils/colorLog.js +1 -53
- package/es/shared/utils/index.js +1 -167
- package/es/shared/utils/loadViewer.js +1 -11
- package/es/shared/utils/tapable/AsyncParallelBailHook.js +1 -63
- package/es/shared/utils/tapable/AsyncParallelHook.js +1 -27
- package/es/shared/utils/tapable/AsyncSeriesBailHook.js +1 -18
- package/es/shared/utils/tapable/AsyncSeriesHook.js +1 -27
- package/es/shared/utils/tapable/AsyncSeriesLoopHook.js +1 -12
- package/es/shared/utils/tapable/AsyncSeriesWaterfallHook.js +1 -22
- package/es/shared/utils/tapable/Hook.js +1 -140
- package/es/shared/utils/tapable/HookCodeFactory.js +1 -456
- package/es/shared/utils/tapable/SyncBailHook.js +1 -19
- package/es/shared/utils/tapable/SyncHook.js +1 -34
- package/es/shared/utils/tapable/SyncLoopHook.js +1 -13
- package/es/shared/utils/tapable/SyncWaterfallHook.js +1 -47
- package/es/shared/utils/utilExpand.js +1 -781
- package/es/shared/utils/vexutils.js +1 -59
- package/package.json +2 -2
|
@@ -1,215 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { NUpload, NUploadDragger, NModal, NIcon, useMessage } from 'naive-ui';
|
|
3
|
-
import { api } from 'v-viewer';
|
|
4
|
-
import { CameraOutline, Add } from '@vicons/ionicons5';
|
|
5
|
-
|
|
6
|
-
var RUpload = defineComponent({
|
|
7
|
-
name: "RUpload",
|
|
8
|
-
components: {
|
|
9
|
-
NUpload,
|
|
10
|
-
NUploadDragger,
|
|
11
|
-
NModal,
|
|
12
|
-
NIcon
|
|
13
|
-
},
|
|
14
|
-
props: {
|
|
15
|
-
form: {
|
|
16
|
-
type: Object,
|
|
17
|
-
default: () => {
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
item: {
|
|
21
|
-
type: Object,
|
|
22
|
-
default: () => {
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
isLock: {
|
|
26
|
-
type: Boolean,
|
|
27
|
-
default: false
|
|
28
|
-
},
|
|
29
|
-
uploadPictureUrl: {
|
|
30
|
-
type: String,
|
|
31
|
-
default: ""
|
|
32
|
-
},
|
|
33
|
-
uploadFileUrl: {
|
|
34
|
-
type: String,
|
|
35
|
-
default: ""
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
emits: ["scaleChange"],
|
|
39
|
-
setup(props, context) {
|
|
40
|
-
var _a, _b;
|
|
41
|
-
const message = useMessage();
|
|
42
|
-
const type = props.item.type;
|
|
43
|
-
const limitPic = ((_b = (_a = props.item) == null ? void 0 : _a.setting) == null ? void 0 : _b.limitPic) || 1;
|
|
44
|
-
const max = isNaN(limitPic) ? void 0 : +limitPic;
|
|
45
|
-
const state = reactive({
|
|
46
|
-
defaultFileList: [],
|
|
47
|
-
fileList: []
|
|
48
|
-
});
|
|
49
|
-
const handleDef = () => {
|
|
50
|
-
const value = props.form[props.item.val_key];
|
|
51
|
-
if (!value)
|
|
52
|
-
return;
|
|
53
|
-
value.forEach((v) => {
|
|
54
|
-
v.status = "finished";
|
|
55
|
-
v.id = v.uid;
|
|
56
|
-
});
|
|
57
|
-
state.defaultFileList = value;
|
|
58
|
-
state.fileList = value;
|
|
59
|
-
};
|
|
60
|
-
handleDef();
|
|
61
|
-
const beforeUpload = (info) => {
|
|
62
|
-
var _a2;
|
|
63
|
-
const {
|
|
64
|
-
file: file2
|
|
65
|
-
} = info;
|
|
66
|
-
const size = ((_a2 = file2.file) == null ? void 0 : _a2.size) || 0;
|
|
67
|
-
const isJpgOrPng = file2.type === "image/jpeg" || file2.type === "image/png";
|
|
68
|
-
if (!isJpgOrPng) {
|
|
69
|
-
message.error("\u4EC5\u652F\u6301jpeg/png\u683C\u5F0F");
|
|
70
|
-
}
|
|
71
|
-
const isLt2M = size / 1024 / 1024 < 2;
|
|
72
|
-
if (!isLt2M) {
|
|
73
|
-
message.error("\u4E0A\u4F20\u56FE\u7247\u9650\u5236\u57282MB\u4EE5\u5185");
|
|
74
|
-
}
|
|
75
|
-
return isJpgOrPng && isLt2M;
|
|
76
|
-
};
|
|
77
|
-
const beforeUploadFile = (info) => {
|
|
78
|
-
var _a2;
|
|
79
|
-
const {
|
|
80
|
-
file: file2
|
|
81
|
-
} = info;
|
|
82
|
-
const size = ((_a2 = file2.file) == null ? void 0 : _a2.size) || 0;
|
|
83
|
-
const isLt2M = size / 1024 / 1024 < 50;
|
|
84
|
-
if (!isLt2M) {
|
|
85
|
-
message.error("\u4E0A\u4F20\u56FE\u7247\u9650\u5236\u572850MB\u4EE5\u5185");
|
|
86
|
-
}
|
|
87
|
-
return isLt2M;
|
|
88
|
-
};
|
|
89
|
-
const handleUploadChange = (info) => {
|
|
90
|
-
const {
|
|
91
|
-
file: file2
|
|
92
|
-
} = info;
|
|
93
|
-
let matchItem2;
|
|
94
|
-
if (file2.status == "uploading" && file2.file) {
|
|
95
|
-
matchItem2 = state.fileList.find((v) => v.uid === file2.id);
|
|
96
|
-
if (!matchItem2) {
|
|
97
|
-
state.fileList.push({
|
|
98
|
-
name: file2.name,
|
|
99
|
-
uid: file2.id,
|
|
100
|
-
size: file2.file.size
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
const handleUploadFinish = (options) => {
|
|
106
|
-
const {
|
|
107
|
-
event,
|
|
108
|
-
file
|
|
109
|
-
} = options;
|
|
110
|
-
const res = eval("(" + event.target.response + ")");
|
|
111
|
-
const matchIndex = state.fileList.findIndex((v) => v.uid === file.id);
|
|
112
|
-
const matchItem = state.fileList[matchIndex];
|
|
113
|
-
if (res.result !== "SUCCESS") {
|
|
114
|
-
file.status = "error";
|
|
115
|
-
matchIndex > -1 && state.fileList.splice(matchIndex, 1);
|
|
116
|
-
message.error(res.resultMsg || "\u4E0A\u4F20\u5931\u8D25\uFF01");
|
|
117
|
-
return;
|
|
118
|
-
}
|
|
119
|
-
if (matchItem) {
|
|
120
|
-
matchItem.url = res.map.url;
|
|
121
|
-
}
|
|
122
|
-
context.emit("scaleChange", state.fileList, props.item);
|
|
123
|
-
};
|
|
124
|
-
const handleUploadRemove = (options2) => {
|
|
125
|
-
const {
|
|
126
|
-
file: file2
|
|
127
|
-
} = options2;
|
|
128
|
-
if (file2.status === "finished") {
|
|
129
|
-
const curIndex = state.fileList.findIndex((v) => v.uid === file2.id);
|
|
130
|
-
curIndex > -1 && state.fileList.splice(curIndex, 1);
|
|
131
|
-
context.emit("scaleChange", state.fileList, props.item);
|
|
132
|
-
}
|
|
133
|
-
};
|
|
134
|
-
const handlePreview = (file2) => {
|
|
135
|
-
const fileList = state.fileList;
|
|
136
|
-
if (!fileList.length)
|
|
137
|
-
return;
|
|
138
|
-
const matchIndex2 = fileList.findIndex((v) => v.uid === file2.id);
|
|
139
|
-
if (!~matchIndex2)
|
|
140
|
-
return;
|
|
141
|
-
const imgs = fileList.map((v) => v.url).filter(Boolean);
|
|
142
|
-
if (!imgs.length)
|
|
143
|
-
return;
|
|
144
|
-
api({
|
|
145
|
-
images: imgs,
|
|
146
|
-
options: {
|
|
147
|
-
toolbar: true,
|
|
148
|
-
initialViewIndex: matchIndex2
|
|
149
|
-
}
|
|
150
|
-
});
|
|
151
|
-
};
|
|
152
|
-
const renderPicture = () => {
|
|
153
|
-
return createVNode(resolveComponent("n-upload"), {
|
|
154
|
-
"action": props.uploadPictureUrl,
|
|
155
|
-
"default-file-list": state.defaultFileList,
|
|
156
|
-
"accept": "image/*",
|
|
157
|
-
"list-type": "image-card",
|
|
158
|
-
"max": max,
|
|
159
|
-
"disabled": props.isLock,
|
|
160
|
-
"show-retry-button": false,
|
|
161
|
-
"on-before-upload": beforeUpload,
|
|
162
|
-
"on-change": handleUploadChange,
|
|
163
|
-
"on-finish": handleUploadFinish,
|
|
164
|
-
"on-remove": handleUploadRemove,
|
|
165
|
-
"on-preview": handlePreview,
|
|
166
|
-
"show-trigger": !props.isLock
|
|
167
|
-
}, {
|
|
168
|
-
default: () => [!props.isLock && createVNode("div", {
|
|
169
|
-
"class": "upload-img-wrap"
|
|
170
|
-
}, [createVNode(NIcon, {
|
|
171
|
-
"class": "prompt-icon",
|
|
172
|
-
"size": "28",
|
|
173
|
-
"component": CameraOutline
|
|
174
|
-
}, null), createTextVNode("\u70B9\u51FB\u4E0A\u4F20")])]
|
|
175
|
-
});
|
|
176
|
-
};
|
|
177
|
-
const renderFile = () => {
|
|
178
|
-
return createVNode(resolveComponent("n-upload"), {
|
|
179
|
-
"multiple": true,
|
|
180
|
-
"directory-dnd": true,
|
|
181
|
-
"disabled": props.isLock,
|
|
182
|
-
"action": props.uploadFileUrl,
|
|
183
|
-
"default-file-list": state.defaultFileList,
|
|
184
|
-
"show-retry-button": false,
|
|
185
|
-
"on-before-upload": beforeUploadFile,
|
|
186
|
-
"on-change": handleUploadChange,
|
|
187
|
-
"on-finish": handleUploadFinish,
|
|
188
|
-
"on-remove": handleUploadRemove,
|
|
189
|
-
"show-trigger": !props.isLock
|
|
190
|
-
}, {
|
|
191
|
-
default: () => [!props.isLock && createVNode(resolveComponent("n-upload-dragger"), null, {
|
|
192
|
-
default: () => [createVNode("div", {
|
|
193
|
-
"class": "dragger-upload-text"
|
|
194
|
-
}, [createVNode(NIcon, {
|
|
195
|
-
"class": "prompt-icon",
|
|
196
|
-
"size": "28",
|
|
197
|
-
"component": Add
|
|
198
|
-
}, null), createTextVNode("\u8BF7\u70B9\u51FB\u6587\u4EF6\u4E0A\u4F20,\u5355\u4E2A\u6587\u4EF650M\u4EE5\u5185\u3002")])]
|
|
199
|
-
})]
|
|
200
|
-
});
|
|
201
|
-
};
|
|
202
|
-
const renderDom = () => {
|
|
203
|
-
return createVNode("div", {
|
|
204
|
-
"class": ["c-scale-upload", {
|
|
205
|
-
"scale-upload-file": type === "UPFILE"
|
|
206
|
-
}]
|
|
207
|
-
}, [type === "UPFILE" && renderFile(), type === "UPPICTURE" && renderPicture()]);
|
|
208
|
-
};
|
|
209
|
-
return () => {
|
|
210
|
-
return renderDom();
|
|
211
|
-
};
|
|
212
|
-
}
|
|
213
|
-
});
|
|
214
|
-
|
|
215
|
-
export { RUpload as default };
|
|
1
|
+
import{defineComponent,reactive,createVNode,resolveComponent,createTextVNode}from"vue";import{NUpload,NUploadDragger,NModal,NIcon,useMessage}from"naive-ui";import{api}from"v-viewer";import{CameraOutline,Add}from"@vicons/ionicons5";var RUpload=defineComponent({name:"RUpload",components:{NUpload:NUpload,NUploadDragger:NUploadDragger,NModal:NModal,NIcon:NIcon},props:{form:{type:Object,default:()=>{}},item:{type:Object,default:()=>{}},isLock:{type:Boolean,default:!1},uploadPictureUrl:{type:String,default:""},uploadFileUrl:{type:String,default:""}},emits:["scaleChange"],setup(props,context){var _a,_b;const message=useMessage(),type=props.item.type,limitPic=(null==(_b=null==(_a=props.item)?void 0:_a.setting)?void 0:_b.limitPic)||1,max=isNaN(limitPic)?void 0:+limitPic,state=reactive({defaultFileList:[],fileList:[]}),handleDef=()=>{const e=props.form[props.item.val_key];e&&(e.forEach((e=>{e.status="finished",e.id=e.uid})),state.defaultFileList=e,state.fileList=e)};handleDef();const beforeUpload=e=>{var t;const{file:o}=e,i=(null==(t=o.file)?void 0:t.size)||0,a="image/jpeg"===o.type||"image/png"===o.type;a||message.error("仅支持jpeg/png格式");const l=i/1024/1024<2;return l||message.error("上传图片限制在2MB以内"),a&&l},beforeUploadFile=e=>{var t;const{file:o}=e,i=((null==(t=o.file)?void 0:t.size)||0)/1024/1024<50;return i||message.error("上传图片限制在50MB以内"),i},handleUploadChange=e=>{const{file:t}=e;let o;"uploading"==t.status&&t.file&&(o=state.fileList.find((e=>e.uid===t.id)),o||state.fileList.push({name:t.name,uid:t.id,size:t.file.size}))},handleUploadFinish=options=>{const{event:event,file:file}=options,res=eval("("+event.target.response+")"),matchIndex=state.fileList.findIndex((e=>e.uid===file.id)),matchItem=state.fileList[matchIndex];if("SUCCESS"!==res.result)return file.status="error",matchIndex>-1&&state.fileList.splice(matchIndex,1),void message.error(res.resultMsg||"上传失败!");matchItem&&(matchItem.url=res.map.url),context.emit("scaleChange",state.fileList,props.item)},handleUploadRemove=e=>{const{file:t}=e;if("finished"===t.status){const e=state.fileList.findIndex((e=>e.uid===t.id));e>-1&&state.fileList.splice(e,1),context.emit("scaleChange",state.fileList,props.item)}},handlePreview=e=>{const t=state.fileList;if(!t.length)return;const o=t.findIndex((t=>t.uid===e.id));if(!~o)return;const i=t.map((e=>e.url)).filter(Boolean);i.length&&api({images:i,options:{toolbar:!0,initialViewIndex:o}})},renderPicture=()=>createVNode(resolveComponent("n-upload"),{action:props.uploadPictureUrl,"default-file-list":state.defaultFileList,accept:"image/*","list-type":"image-card",max:max,disabled:props.isLock,"show-retry-button":!1,"on-before-upload":beforeUpload,"on-change":handleUploadChange,"on-finish":handleUploadFinish,"on-remove":handleUploadRemove,"on-preview":handlePreview,"show-trigger":!props.isLock},{default:()=>[!props.isLock&&createVNode("div",{class:"upload-img-wrap"},[createVNode(NIcon,{class:"prompt-icon",size:"28",component:CameraOutline},null),createTextVNode("点击上传")])]}),renderFile=()=>createVNode(resolveComponent("n-upload"),{multiple:!0,"directory-dnd":!0,disabled:props.isLock,action:props.uploadFileUrl,"default-file-list":state.defaultFileList,"show-retry-button":!1,"on-before-upload":beforeUploadFile,"on-change":handleUploadChange,"on-finish":handleUploadFinish,"on-remove":handleUploadRemove,"show-trigger":!props.isLock},{default:()=>[!props.isLock&&createVNode(resolveComponent("n-upload-dragger"),null,{default:()=>[createVNode("div",{class:"dragger-upload-text"},[createVNode(NIcon,{class:"prompt-icon",size:"28",component:Add},null),createTextVNode("请点击文件上传,单个文件50M以内。")])]})]}),renderDom=()=>createVNode("div",{class:["c-scale-upload",{"scale-upload-file":"UPFILE"===type}]},["UPFILE"===type&&renderFile(),"UPPICTURE"===type&&renderPicture()]);return()=>renderDom()}});export{RUpload as default};
|
|
@@ -1,307 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
var SignCom = defineComponent({
|
|
4
|
-
name: "SignCom",
|
|
5
|
-
props: {
|
|
6
|
-
width: {
|
|
7
|
-
type: Number,
|
|
8
|
-
default: 620
|
|
9
|
-
},
|
|
10
|
-
height: {
|
|
11
|
-
type: Number,
|
|
12
|
-
default: 300
|
|
13
|
-
},
|
|
14
|
-
lineWidth: {
|
|
15
|
-
type: Number,
|
|
16
|
-
default: 4
|
|
17
|
-
},
|
|
18
|
-
lineColor: {
|
|
19
|
-
type: String,
|
|
20
|
-
default: "#000000"
|
|
21
|
-
},
|
|
22
|
-
bgColor: {
|
|
23
|
-
type: String,
|
|
24
|
-
default: ""
|
|
25
|
-
},
|
|
26
|
-
isCrop: {
|
|
27
|
-
type: Boolean,
|
|
28
|
-
default: false
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
emits: [],
|
|
32
|
-
setup(props) {
|
|
33
|
-
const canvasRef = ref(null);
|
|
34
|
-
const canvasTxt = ref();
|
|
35
|
-
const resultImg = ref();
|
|
36
|
-
const hasDrew = ref(false);
|
|
37
|
-
const drawObj = reactive({
|
|
38
|
-
points: [],
|
|
39
|
-
startX: 0,
|
|
40
|
-
startY: 0,
|
|
41
|
-
isDrawing: false,
|
|
42
|
-
sratio: 1
|
|
43
|
-
});
|
|
44
|
-
const ratio = computed(() => {
|
|
45
|
-
return props.height / props.width;
|
|
46
|
-
});
|
|
47
|
-
const myBg = computed(() => {
|
|
48
|
-
return props.bgColor ? props.bgColor : "rgba(255, 255, 255, 0)";
|
|
49
|
-
});
|
|
50
|
-
const drawGrid = (context, color, stepx, stepy) => {
|
|
51
|
-
context.save();
|
|
52
|
-
context.fillStyle = "white";
|
|
53
|
-
console.log(context);
|
|
54
|
-
context.fillRect(0, 0, context.canvas.width, context.canvas.height);
|
|
55
|
-
context.lineWidth = 0.5;
|
|
56
|
-
context.strokeStyle = color;
|
|
57
|
-
for (let i = stepx; i < context.canvas.width; i += stepx) {
|
|
58
|
-
context.beginPath();
|
|
59
|
-
context.moveTo(i, 0);
|
|
60
|
-
context.lineTo(i, context.canvas.height);
|
|
61
|
-
context.closePath();
|
|
62
|
-
context.stroke();
|
|
63
|
-
}
|
|
64
|
-
for (let j = stepy; j < context.canvas.height; j += stepy) {
|
|
65
|
-
context.beginPath();
|
|
66
|
-
context.moveTo(0, j);
|
|
67
|
-
context.lineTo(context.canvas.width, j);
|
|
68
|
-
context.closePath();
|
|
69
|
-
context.stroke();
|
|
70
|
-
}
|
|
71
|
-
context.restore();
|
|
72
|
-
};
|
|
73
|
-
const drawStart = (obj) => {
|
|
74
|
-
drawObj.startX = obj.x;
|
|
75
|
-
drawObj.startY = obj.y;
|
|
76
|
-
canvasTxt.value.beginPath();
|
|
77
|
-
canvasTxt.value.moveTo(drawObj.startX, drawObj.startY);
|
|
78
|
-
canvasTxt.value.lineTo(obj.x, obj.y);
|
|
79
|
-
canvasTxt.value.lineCap = "round";
|
|
80
|
-
canvasTxt.value.lineJoin = "round";
|
|
81
|
-
canvasTxt.value.lineWidth = props.lineWidth * drawObj.sratio;
|
|
82
|
-
canvasTxt.value.stroke();
|
|
83
|
-
canvasTxt.value.closePath();
|
|
84
|
-
drawObj.points.push(obj);
|
|
85
|
-
};
|
|
86
|
-
const drawMove = (obj) => {
|
|
87
|
-
canvasTxt.value.beginPath();
|
|
88
|
-
canvasTxt.value.moveTo(drawObj.startX, drawObj.startY);
|
|
89
|
-
canvasTxt.value.lineTo(obj.x, obj.y);
|
|
90
|
-
canvasTxt.value.strokeStyle = props.lineColor;
|
|
91
|
-
canvasTxt.value.lineWidth = props.lineWidth * drawObj.sratio;
|
|
92
|
-
canvasTxt.value.lineCap = "round";
|
|
93
|
-
canvasTxt.value.lineJoin = "round";
|
|
94
|
-
canvasTxt.value.stroke();
|
|
95
|
-
canvasTxt.value.closePath();
|
|
96
|
-
drawObj.startY = obj.y;
|
|
97
|
-
drawObj.startX = obj.x;
|
|
98
|
-
drawObj.points.push(obj);
|
|
99
|
-
};
|
|
100
|
-
const drawEnd = (obj) => {
|
|
101
|
-
canvasTxt.value.beginPath();
|
|
102
|
-
canvasTxt.value.moveTo(drawObj.startX, drawObj.startY);
|
|
103
|
-
canvasTxt.value.lineCap = "round";
|
|
104
|
-
canvasTxt.value.lineJoin = "round";
|
|
105
|
-
canvasTxt.value.stroke();
|
|
106
|
-
canvasTxt.value.closePath();
|
|
107
|
-
drawObj.points.push(obj);
|
|
108
|
-
drawObj.points.push({
|
|
109
|
-
x: -1,
|
|
110
|
-
y: -1
|
|
111
|
-
});
|
|
112
|
-
};
|
|
113
|
-
const mouseDown = (e) => {
|
|
114
|
-
e.preventDefault();
|
|
115
|
-
drawObj.isDrawing = true;
|
|
116
|
-
hasDrew.value = true;
|
|
117
|
-
const obj = {
|
|
118
|
-
x: e.offsetX,
|
|
119
|
-
y: e.offsetY
|
|
120
|
-
};
|
|
121
|
-
drawStart(obj);
|
|
122
|
-
};
|
|
123
|
-
const mouseMove = (e) => {
|
|
124
|
-
e.preventDefault();
|
|
125
|
-
if (!drawObj.isDrawing)
|
|
126
|
-
return;
|
|
127
|
-
const obj = {
|
|
128
|
-
x: e.offsetX,
|
|
129
|
-
y: e.offsetY
|
|
130
|
-
};
|
|
131
|
-
drawMove(obj);
|
|
132
|
-
};
|
|
133
|
-
const mouseUp = (e) => {
|
|
134
|
-
e.preventDefault();
|
|
135
|
-
const obj = {
|
|
136
|
-
x: e.offsetX,
|
|
137
|
-
y: e.offsetY
|
|
138
|
-
};
|
|
139
|
-
drawEnd(obj);
|
|
140
|
-
drawObj.isDrawing = false;
|
|
141
|
-
};
|
|
142
|
-
const touchStart = (e) => {
|
|
143
|
-
e.preventDefault();
|
|
144
|
-
hasDrew.value = true;
|
|
145
|
-
if (e.touches.length === 1) {
|
|
146
|
-
const obj = {
|
|
147
|
-
x: e.targetTouches[0].clientX - canvasRef.value.getBoundingClientRect().left,
|
|
148
|
-
y: e.targetTouches[0].clientY - canvasRef.value.getBoundingClientRect().top
|
|
149
|
-
};
|
|
150
|
-
drawStart(obj);
|
|
151
|
-
}
|
|
152
|
-
};
|
|
153
|
-
const touchMove = (e) => {
|
|
154
|
-
e.preventDefault();
|
|
155
|
-
if (e.touches.length !== 1)
|
|
156
|
-
return;
|
|
157
|
-
const obj = {
|
|
158
|
-
x: e.targetTouches[0].clientX - canvasRef.value.getBoundingClientRect().left,
|
|
159
|
-
y: e.targetTouches[0].clientY - canvasRef.value.getBoundingClientRect().top
|
|
160
|
-
};
|
|
161
|
-
drawMove(obj);
|
|
162
|
-
};
|
|
163
|
-
const touchEnd = (e) => {
|
|
164
|
-
e.preventDefault();
|
|
165
|
-
if (e.touches.length !== 1)
|
|
166
|
-
return;
|
|
167
|
-
const obj = {
|
|
168
|
-
x: e.targetTouches[0].clientX - canvasRef.value.getBoundingClientRect().left,
|
|
169
|
-
y: e.targetTouches[0].clientY - canvasRef.value.getBoundingClientRect().top
|
|
170
|
-
};
|
|
171
|
-
drawEnd(obj);
|
|
172
|
-
};
|
|
173
|
-
const getCropArea = (imgData) => {
|
|
174
|
-
let topX = canvasRef.value.width;
|
|
175
|
-
let btmX = 0;
|
|
176
|
-
let topY = canvasRef.value.height;
|
|
177
|
-
let btnY = 0;
|
|
178
|
-
for (let i = 0; i < canvasRef.value.width; i++) {
|
|
179
|
-
for (let j = 0; j < canvasRef.value.height; j++) {
|
|
180
|
-
const pos = (i + canvasRef.value.width * j) * 4;
|
|
181
|
-
if (imgData[pos] > 0 || imgData[pos + 1] > 0 || imgData[pos + 2] || imgData[pos + 3] > 0) {
|
|
182
|
-
btnY = Math.max(j, btnY);
|
|
183
|
-
btmX = Math.max(i, btmX);
|
|
184
|
-
topY = Math.min(j, topY);
|
|
185
|
-
topX = Math.min(i, topX);
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
topX++;
|
|
190
|
-
btmX++;
|
|
191
|
-
topY++;
|
|
192
|
-
btnY++;
|
|
193
|
-
const data = [topX, topY, btmX, btnY];
|
|
194
|
-
return data;
|
|
195
|
-
};
|
|
196
|
-
const getImgSize = (url) => {
|
|
197
|
-
const strLength = url.length;
|
|
198
|
-
const strNum = strLength - strLength / 8 * 2;
|
|
199
|
-
return Math.floor(strNum);
|
|
200
|
-
};
|
|
201
|
-
const randomId = () => {
|
|
202
|
-
const str = Math.random() * 1e10 + "";
|
|
203
|
-
return parseInt(str).toString(36);
|
|
204
|
-
};
|
|
205
|
-
const generate = () => {
|
|
206
|
-
const pm = new Promise((resolve, reject) => {
|
|
207
|
-
if (!hasDrew.value) {
|
|
208
|
-
reject("Warning: Not Signned!");
|
|
209
|
-
return;
|
|
210
|
-
}
|
|
211
|
-
const resImgData = canvasTxt.value.getImageData(0, 0, canvasRef.value.width, canvasRef.value.height);
|
|
212
|
-
canvasTxt.value.globalCompositeOperation = "destination-over";
|
|
213
|
-
canvasTxt.value.fillStyle = myBg.value;
|
|
214
|
-
canvasTxt.value.fillRect(0, 0, canvasRef.value.width, canvasRef.value.height);
|
|
215
|
-
let resultImg2 = canvasRef.value.toDataURL();
|
|
216
|
-
canvasTxt.value.clearRect(0, 0, canvasRef.value.width, canvasRef.value.height);
|
|
217
|
-
canvasTxt.value.putImageData(resImgData, 0, 0);
|
|
218
|
-
canvasTxt.value.globalCompositeOperation = "source-over";
|
|
219
|
-
if (props.isCrop) {
|
|
220
|
-
const crop_area = getCropArea(resImgData.data);
|
|
221
|
-
let crop_canvas = document.createElement("canvas");
|
|
222
|
-
const crop_ctx = crop_canvas.getContext("2d");
|
|
223
|
-
crop_canvas.width = crop_area[2] - crop_area[0];
|
|
224
|
-
crop_canvas.height = crop_area[3] - crop_area[1];
|
|
225
|
-
const crop_imgData = canvasTxt.value.getImageData(...crop_area);
|
|
226
|
-
for (let i = 0; i < crop_imgData.data.length; i += 4) {
|
|
227
|
-
if (crop_imgData.data[i] > 200) {
|
|
228
|
-
crop_imgData.data[i] = 255;
|
|
229
|
-
crop_imgData.data[i + 1] = 255;
|
|
230
|
-
crop_imgData.data[i + 2] = 255;
|
|
231
|
-
crop_imgData.data[i + 3] = 255;
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
crop_ctx.globalCompositeOperation = "destination-over";
|
|
235
|
-
crop_ctx.putImageData(crop_imgData, 0, 0);
|
|
236
|
-
crop_ctx.fillStyle = myBg.value;
|
|
237
|
-
crop_ctx.fillRect(0, 0, crop_canvas.width, crop_canvas.height);
|
|
238
|
-
resultImg2 = crop_canvas.toDataURL();
|
|
239
|
-
crop_canvas = null;
|
|
240
|
-
}
|
|
241
|
-
const obj = {
|
|
242
|
-
name: randomId(),
|
|
243
|
-
url: resultImg2,
|
|
244
|
-
size: getImgSize(resultImg2)
|
|
245
|
-
};
|
|
246
|
-
resolve(obj);
|
|
247
|
-
});
|
|
248
|
-
return pm;
|
|
249
|
-
};
|
|
250
|
-
const reset = () => {
|
|
251
|
-
canvasTxt.value.clearRect(0, 0, canvasRef.value.width, canvasRef.value.height);
|
|
252
|
-
drawGrid(canvasTxt.value, "rgb(240, 240, 240)", 16, 16);
|
|
253
|
-
drawObj.points = [];
|
|
254
|
-
hasDrew.value = false;
|
|
255
|
-
resultImg.value = "";
|
|
256
|
-
};
|
|
257
|
-
const resizeHandler = () => {
|
|
258
|
-
canvasRef.value.style.width = props.width + "px";
|
|
259
|
-
const realw = parseFloat(window.getComputedStyle(canvasRef.value).width);
|
|
260
|
-
canvasRef.value.style.height = ratio.value * realw + "px";
|
|
261
|
-
canvasTxt.value = canvasRef.value.getContext("2d");
|
|
262
|
-
canvasTxt.value.globalAlpha = 1;
|
|
263
|
-
};
|
|
264
|
-
onBeforeMount(() => {
|
|
265
|
-
window.addEventListener("resize", resizeHandler);
|
|
266
|
-
});
|
|
267
|
-
onUnmounted(() => {
|
|
268
|
-
window.removeEventListener("resize", resizeHandler);
|
|
269
|
-
});
|
|
270
|
-
onMounted(() => {
|
|
271
|
-
canvasRef.value.height = props.height;
|
|
272
|
-
canvasRef.value.width = props.width;
|
|
273
|
-
resizeHandler();
|
|
274
|
-
drawGrid(canvasTxt.value, "rgb(240, 240, 240)", 16, 16);
|
|
275
|
-
document.onmouseup = () => {
|
|
276
|
-
drawObj.isDrawing = false;
|
|
277
|
-
};
|
|
278
|
-
});
|
|
279
|
-
const renderCanvas = () => {
|
|
280
|
-
return createVNode("canvas", {
|
|
281
|
-
"class": "sign-canvas",
|
|
282
|
-
"ref": canvasRef,
|
|
283
|
-
"onMousedown": mouseDown,
|
|
284
|
-
"onMousemove": mouseMove,
|
|
285
|
-
"onMouseup": mouseUp,
|
|
286
|
-
"onTouchstart": touchStart,
|
|
287
|
-
"onTouchmove": touchMove,
|
|
288
|
-
"onTouchend": touchEnd
|
|
289
|
-
}, null);
|
|
290
|
-
};
|
|
291
|
-
const renderContent = () => {
|
|
292
|
-
return createVNode("div", {
|
|
293
|
-
"class": "sign-com-wrap"
|
|
294
|
-
}, [createVNode("span", null, [createTextVNode("\u63D0\u793A\uFF1A\u8BF7\u5728\u4EE5\u4E0B\u533A\u57DF\u5185\u7B7E\u540D\uFF0CPC\u7535\u8111\u8BBE\u5907\u4F7F\u7528\u9F20\u6807\u7B7E\u5B57\u3002")]), renderCanvas()]);
|
|
295
|
-
};
|
|
296
|
-
return {
|
|
297
|
-
renderContent,
|
|
298
|
-
generate,
|
|
299
|
-
reset
|
|
300
|
-
};
|
|
301
|
-
},
|
|
302
|
-
render() {
|
|
303
|
-
return this.renderContent();
|
|
304
|
-
}
|
|
305
|
-
});
|
|
306
|
-
|
|
307
|
-
export { SignCom as default };
|
|
1
|
+
import{defineComponent as e,ref as t,reactive as a,computed as l,onBeforeMount as n,onUnmounted as o,onMounted as i,createVNode as u,createTextVNode as r}from"vue";var s=e({name:"SignCom",props:{width:{type:Number,default:620},height:{type:Number,default:300},lineWidth:{type:Number,default:4},lineColor:{type:String,default:"#000000"},bgColor:{type:String,default:""},isCrop:{type:Boolean,default:!1}},emits:[],setup(e){const s=t(null),v=t(),h=t(),g=t(!1),d=a({points:[],startX:0,startY:0,isDrawing:!1,sratio:1}),c=l((()=>e.height/e.width)),p=l((()=>e.bgColor?e.bgColor:"rgba(255, 255, 255, 0)")),f=(e,t,a,l)=>{e.save(),e.fillStyle="white",console.log(e),e.fillRect(0,0,e.canvas.width,e.canvas.height),e.lineWidth=.5,e.strokeStyle=t;for(let t=a;t<e.canvas.width;t+=a)e.beginPath(),e.moveTo(t,0),e.lineTo(t,e.canvas.height),e.closePath(),e.stroke();for(let t=l;t<e.canvas.height;t+=l)e.beginPath(),e.moveTo(0,t),e.lineTo(e.canvas.width,t),e.closePath(),e.stroke();e.restore()},m=t=>{d.startX=t.x,d.startY=t.y,v.value.beginPath(),v.value.moveTo(d.startX,d.startY),v.value.lineTo(t.x,t.y),v.value.lineCap="round",v.value.lineJoin="round",v.value.lineWidth=e.lineWidth*d.sratio,v.value.stroke(),v.value.closePath(),d.points.push(t)},w=t=>{v.value.beginPath(),v.value.moveTo(d.startX,d.startY),v.value.lineTo(t.x,t.y),v.value.strokeStyle=e.lineColor,v.value.lineWidth=e.lineWidth*d.sratio,v.value.lineCap="round",v.value.lineJoin="round",v.value.stroke(),v.value.closePath(),d.startY=t.y,d.startX=t.x,d.points.push(t)},C=e=>{v.value.beginPath(),v.value.moveTo(d.startX,d.startY),v.value.lineCap="round",v.value.lineJoin="round",v.value.stroke(),v.value.closePath(),d.points.push(e),d.points.push({x:-1,y:-1})},y=e=>{e.preventDefault(),d.isDrawing=!0,g.value=!0;const t={x:e.offsetX,y:e.offsetY};m(t)},b=e=>{if(e.preventDefault(),!d.isDrawing)return;const t={x:e.offsetX,y:e.offsetY};w(t)},x=e=>{e.preventDefault();const t={x:e.offsetX,y:e.offsetY};C(t),d.isDrawing=!1},T=e=>{if(e.preventDefault(),g.value=!0,1===e.touches.length){const t={x:e.targetTouches[0].clientX-s.value.getBoundingClientRect().left,y:e.targetTouches[0].clientY-s.value.getBoundingClientRect().top};m(t)}},D=e=>{if(e.preventDefault(),1!==e.touches.length)return;const t={x:e.targetTouches[0].clientX-s.value.getBoundingClientRect().left,y:e.targetTouches[0].clientY-s.value.getBoundingClientRect().top};w(t)},R=e=>{if(e.preventDefault(),1!==e.touches.length)return;const t={x:e.targetTouches[0].clientX-s.value.getBoundingClientRect().left,y:e.targetTouches[0].clientY-s.value.getBoundingClientRect().top};C(t)},P=e=>{const t=e.length,a=t-t/8*2;return Math.floor(a)},X=()=>{const e=1e10*Math.random()+"";return parseInt(e).toString(36)},Y=()=>{s.value.style.width=e.width+"px";const t=parseFloat(window.getComputedStyle(s.value).width);s.value.style.height=c.value*t+"px",v.value=s.value.getContext("2d"),v.value.globalAlpha=1};n((()=>{window.addEventListener("resize",Y)})),o((()=>{window.removeEventListener("resize",Y)})),i((()=>{s.value.height=e.height,s.value.width=e.width,Y(),f(v.value,"rgb(240, 240, 240)",16,16),document.onmouseup=()=>{d.isDrawing=!1}}));return{renderContent:()=>u("div",{class:"sign-com-wrap"},[u("span",null,[r("提示:请在以下区域内签名,PC电脑设备使用鼠标签字。")]),u("canvas",{class:"sign-canvas",ref:s,onMousedown:y,onMousemove:b,onMouseup:x,onTouchstart:T,onTouchmove:D,onTouchend:R},null)]),generate:()=>new Promise(((t,a)=>{if(!g.value)return void a("Warning: Not Signned!");const l=v.value.getImageData(0,0,s.value.width,s.value.height);v.value.globalCompositeOperation="destination-over",v.value.fillStyle=p.value,v.value.fillRect(0,0,s.value.width,s.value.height);let n=s.value.toDataURL();if(v.value.clearRect(0,0,s.value.width,s.value.height),v.value.putImageData(l,0,0),v.value.globalCompositeOperation="source-over",e.isCrop){const e=(e=>{let t=s.value.width,a=0,l=s.value.height,n=0;for(let o=0;o<s.value.width;o++)for(let i=0;i<s.value.height;i++){const u=4*(o+s.value.width*i);(e[u]>0||e[u+1]>0||e[u+2]||e[u+3]>0)&&(n=Math.max(i,n),a=Math.max(o,a),l=Math.min(i,l),t=Math.min(o,t))}return t++,a++,l++,n++,[t,l,a,n]})(l.data);let t=document.createElement("canvas");const a=t.getContext("2d");t.width=e[2]-e[0],t.height=e[3]-e[1];const o=v.value.getImageData(...e);for(let e=0;e<o.data.length;e+=4)o.data[e]>200&&(o.data[e]=255,o.data[e+1]=255,o.data[e+2]=255,o.data[e+3]=255);a.globalCompositeOperation="destination-over",a.putImageData(o,0,0),a.fillStyle=p.value,a.fillRect(0,0,t.width,t.height),n=t.toDataURL(),t=null}t({name:X(),url:n,size:P(n)})})),reset:()=>{v.value.clearRect(0,0,s.value.width,s.value.height),f(v.value,"rgb(240, 240, 240)",16,16),d.points=[],g.value=!1,h.value=""}}},render(){return this.renderContent()}});export{s as default};
|
|
@@ -1,129 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { NModal, NButton, NTooltip } from 'naive-ui';
|
|
3
|
-
|
|
4
|
-
const DEFAULT_WIDTH = "50vw";
|
|
5
|
-
const DEFAULT_HEIGHT = "50vh";
|
|
6
|
-
var StandardModal = defineComponent({
|
|
7
|
-
name: "StandardModal",
|
|
8
|
-
components: {
|
|
9
|
-
NModal,
|
|
10
|
-
NButton,
|
|
11
|
-
NTooltip
|
|
12
|
-
},
|
|
13
|
-
props: {
|
|
14
|
-
title: {
|
|
15
|
-
type: [Function, String],
|
|
16
|
-
default: ""
|
|
17
|
-
},
|
|
18
|
-
changeSize: {
|
|
19
|
-
type: Boolean,
|
|
20
|
-
default: false
|
|
21
|
-
},
|
|
22
|
-
closable: {
|
|
23
|
-
type: Boolean,
|
|
24
|
-
default: true
|
|
25
|
-
},
|
|
26
|
-
modalWidth: {
|
|
27
|
-
type: String,
|
|
28
|
-
default: ""
|
|
29
|
-
},
|
|
30
|
-
modalHeight: {
|
|
31
|
-
type: String,
|
|
32
|
-
default: ""
|
|
33
|
-
},
|
|
34
|
-
handleOk: {
|
|
35
|
-
type: Function,
|
|
36
|
-
default: () => {
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
cancel: {
|
|
40
|
-
type: Function,
|
|
41
|
-
default: () => {
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
visible: {
|
|
45
|
-
type: Boolean,
|
|
46
|
-
default: false
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
emits: ["update:visible", "onClose"],
|
|
50
|
-
setup(props, context) {
|
|
51
|
-
const showWidth = computed(() => {
|
|
52
|
-
return props.modalWidth || DEFAULT_WIDTH;
|
|
53
|
-
});
|
|
54
|
-
const showHeight = computed(() => {
|
|
55
|
-
return props.modalHeight || DEFAULT_HEIGHT;
|
|
56
|
-
});
|
|
57
|
-
const modalConfig = reactive({
|
|
58
|
-
modalWidth: showWidth.value,
|
|
59
|
-
modalHeight: showHeight.value,
|
|
60
|
-
maxHeight: "620px",
|
|
61
|
-
isChangeWindow: false
|
|
62
|
-
});
|
|
63
|
-
const isChangeWindow = ref(false);
|
|
64
|
-
const changeModalWindow = () => {
|
|
65
|
-
document.body.clientHeight;
|
|
66
|
-
Object.assign(modalConfig, {
|
|
67
|
-
isChangeWindow: !modalConfig.isChangeWindow,
|
|
68
|
-
modalWidth: modalConfig.modalWidth === showWidth.value ? "100vw" : showWidth.value,
|
|
69
|
-
modalHeight: modalConfig.modalHeight === showHeight.value ? "100vh" : showHeight.value
|
|
70
|
-
});
|
|
71
|
-
};
|
|
72
|
-
const handleOk = () => {
|
|
73
|
-
props.handleOk();
|
|
74
|
-
};
|
|
75
|
-
const cancel = () => {
|
|
76
|
-
props.cancel();
|
|
77
|
-
context.emit("update:visible", false);
|
|
78
|
-
};
|
|
79
|
-
const renderHeader = () => {
|
|
80
|
-
const title = props == null ? void 0 : props.title;
|
|
81
|
-
const type = typeof title;
|
|
82
|
-
return createVNode("div", {
|
|
83
|
-
"class": "n-dialog__title-content"
|
|
84
|
-
}, [type === "string" ? createVNode("div", null, [title]) : null, type === "function" ? createVNode("div", null, [title()]) : null, createVNode("div", {
|
|
85
|
-
"class": "svg-wrap"
|
|
86
|
-
}, [props.changeSize ? createVNode(resolveComponent("svg-icon"), {
|
|
87
|
-
"onClick": () => changeModalWindow(),
|
|
88
|
-
"icon-class": isChangeWindow.value ? "xitongtubiaodaohangtubiaozuixiaohua" : "xitongtubiaodaohangtubiaozuidahua"
|
|
89
|
-
}, null) : null, props.closable ? createVNode(resolveComponent("svg-icon"), {
|
|
90
|
-
"icon-class": "xitongtubiaodaohangtubiaoguanbi",
|
|
91
|
-
"onClick": () => cancel()
|
|
92
|
-
}, null) : null])]);
|
|
93
|
-
};
|
|
94
|
-
const rednerModal = () => {
|
|
95
|
-
const curSlot = {
|
|
96
|
-
...context.slots
|
|
97
|
-
};
|
|
98
|
-
if (!curSlot.header) {
|
|
99
|
-
curSlot.header = renderHeader;
|
|
100
|
-
}
|
|
101
|
-
return createVNode(resolveComponent("n-modal"), {
|
|
102
|
-
"class": "c-scale-modal-container",
|
|
103
|
-
"show": props.visible,
|
|
104
|
-
"mask-closable": false,
|
|
105
|
-
"show-icon": false,
|
|
106
|
-
"closable": false,
|
|
107
|
-
"style": {
|
|
108
|
-
width: modalConfig.modalWidth,
|
|
109
|
-
height: modalConfig.modalHeight
|
|
110
|
-
},
|
|
111
|
-
"preset": "dialog",
|
|
112
|
-
"positive-text": "\u786E\u8BA4",
|
|
113
|
-
"negative-text": "\u53D6\u6D88",
|
|
114
|
-
"on-positive-click": handleOk,
|
|
115
|
-
"on-negative-click": cancel,
|
|
116
|
-
"positiveButtonProps": {
|
|
117
|
-
type: "primary"
|
|
118
|
-
}
|
|
119
|
-
}, {
|
|
120
|
-
...curSlot
|
|
121
|
-
});
|
|
122
|
-
};
|
|
123
|
-
return () => {
|
|
124
|
-
return rednerModal();
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
});
|
|
128
|
-
|
|
129
|
-
export { StandardModal as default };
|
|
1
|
+
import{defineComponent as t,computed as e,reactive as i,ref as a,createVNode as l,resolveComponent as o}from"vue";import{NModal as n,NButton as d,NTooltip as u}from"naive-ui";var s=t({name:"StandardModal",components:{NModal:n,NButton:d,NTooltip:u},props:{title:{type:[Function,String],default:""},changeSize:{type:Boolean,default:!1},closable:{type:Boolean,default:!0},modalWidth:{type:String,default:""},modalHeight:{type:String,default:""},handleOk:{type:Function,default:()=>{}},cancel:{type:Function,default:()=>{}},visible:{type:Boolean,default:!1}},emits:["update:visible","onClose"],setup(t,n){const d=e((()=>t.modalWidth||"50vw")),u=e((()=>t.modalHeight||"50vh")),s=i({modalWidth:d.value,modalHeight:u.value,maxHeight:"620px",isChangeWindow:!1}),c=a(!1),h=()=>{t.handleOk()},g=()=>{t.cancel(),n.emit("update:visible",!1)},v=()=>{const e=null==t?void 0:t.title,i=typeof e;return l("div",{class:"n-dialog__title-content"},["string"===i?l("div",null,[e]):null,"function"===i?l("div",null,[e()]):null,l("div",{class:"svg-wrap"},[t.changeSize?l(o("svg-icon"),{onClick:()=>(document.body.clientHeight,void Object.assign(s,{isChangeWindow:!s.isChangeWindow,modalWidth:s.modalWidth===d.value?"100vw":d.value,modalHeight:s.modalHeight===u.value?"100vh":u.value})),"icon-class":c.value?"xitongtubiaodaohangtubiaozuixiaohua":"xitongtubiaodaohangtubiaozuidahua"},null):null,t.closable?l(o("svg-icon"),{"icon-class":"xitongtubiaodaohangtubiaoguanbi",onClick:()=>g()},null):null])])};return()=>(()=>{const e={...n.slots};return e.header||(e.header=v),l(o("n-modal"),{class:"c-scale-modal-container",show:t.visible,"mask-closable":!1,"show-icon":!1,closable:!1,style:{width:s.modalWidth,height:s.modalHeight},preset:"dialog","positive-text":"确认","negative-text":"取消","on-positive-click":h,"on-negative-click":g,positiveButtonProps:{type:"primary"}},{...e})})()}});export{s as default};
|