cnhis-design-vue 3.1.40-beta.11 → 3.1.40-beta.15
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/README.md +87 -87
- 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.d.ts +1 -1
- package/es/components/form-config/index.js +1 -10
- package/es/components/form-config/src/FormConfig.vue.d.ts +1 -1
- 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.d.ts +1 -1
- 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.d.ts +2 -1
- 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 +4 -21
- package/es/components/keyboard/index.js +1 -10
- package/es/components/keyboard/src/Keyboard.vue.d.ts +4 -21
- package/es/components/keyboard/src/Keyboard.vue.js +1 -164
- package/es/components/keyboard/src/components/InputNumber.vue.d.ts +2 -19
- package/es/components/keyboard/src/components/InputNumber.vue.js +1 -94
- package/es/components/keyboard/src/components/NumberPanel.vue.d.ts +4 -21
- 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.d.ts +0 -3
- 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.d.ts +1 -1
- package/es/components/shortcut-setter/index.js +1 -10
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +1 -1
- 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.d.ts +3 -0
- 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.d.ts +4 -3
- 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/env.d.ts +24 -24
- 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
- package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
- package/es/components/fabric-chart/src/utils/index.d.ts +0 -6823
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
- package/es/shared/utils/tapable/index.d.ts +0 -139
|
@@ -1,31 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import '../utils/index.js';
|
|
3
|
-
import { traverseDependKey } from '../utils/schema.js';
|
|
4
|
-
|
|
5
|
-
class FormItemDepsCollector {
|
|
6
|
-
constructor() {
|
|
7
|
-
this.collector = /* @__PURE__ */ new Map();
|
|
8
|
-
}
|
|
9
|
-
setDeps(key, dependKeys, callback) {
|
|
10
|
-
traverseDependKey(dependKeys, (dependKey) => {
|
|
11
|
-
const map = this.collector.get(dependKey) || /* @__PURE__ */ new Map();
|
|
12
|
-
map.set(key, callback);
|
|
13
|
-
this.collector.set(dependKey, map);
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
getDeps(dependKey) {
|
|
17
|
-
return this.collector.get(dependKey);
|
|
18
|
-
}
|
|
19
|
-
trigger(dependKey, payload) {
|
|
20
|
-
var _a;
|
|
21
|
-
(_a = this.getDeps(dependKey)) == null ? void 0 : _a.forEach((cb) => isFunction(cb) && cb(payload));
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
function useFormItemDeps() {
|
|
25
|
-
function create() {
|
|
26
|
-
return new FormItemDepsCollector();
|
|
27
|
-
}
|
|
28
|
-
return { create };
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export { FormItemDepsCollector, useFormItemDeps };
|
|
1
|
+
import{isFunction as t}from"lodash-es";import"../utils/index.js";import{traverseDependKey as e}from"../utils/schema.js";class r{constructor(){this.collector=new Map}setDeps(t,r,s){e(r,(e=>{const r=this.collector.get(e)||new Map;r.set(t,s),this.collector.set(e,r)}))}getDeps(t){return this.collector.get(t)}trigger(e,r){var s;null==(s=this.getDeps(e))||s.forEach((e=>t(e)&&e(r)))}}function s(){return{create:function(){return new r}}}export{r as FormItemDepsCollector,s as useFormItemDeps};
|
|
@@ -1,10 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
function useFormRenderLifeCycle(props) {
|
|
4
|
-
function callLifeCycle(lifeCycleName, payload) {
|
|
5
|
-
return props.lifeCycle && isFunction(props.lifeCycle[lifeCycleName]) && props.lifeCycle[lifeCycleName].apply(void 0, payload || []);
|
|
6
|
-
}
|
|
7
|
-
return { callLifeCycle };
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export { useFormRenderLifeCycle };
|
|
1
|
+
import{isFunction as e}from"lodash-es";function l(l){return{callLifeCycle:function(i,c){return l.lifeCycle&&e(l.lifeCycle[i])&&l.lifeCycle[i].apply(void 0,c||[])}}}export{l as useFormRenderLifeCycle};
|
|
@@ -1,278 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useMemoize, useDebounceFn } from '@vueuse/core';
|
|
3
|
-
import { identity, isString, isEqual, omit, isFunction } from 'lodash-es';
|
|
4
|
-
import { computed, inject, ref, watch } from 'vue';
|
|
5
|
-
import '../../index.js';
|
|
6
|
-
import { InjectionAsyncQueue, InjectionFormItemDepsCollector } from '../constants/index.js';
|
|
7
|
-
import { createUrlConfigParams, formRenderLog, keywordMatcher } from '../utils/index.js';
|
|
8
|
-
import { useFormField } from './useFormField.js';
|
|
9
|
-
import { useFormRequest } from './useFormRequest.js';
|
|
10
|
-
|
|
11
|
-
function createPropRef(props, key) {
|
|
12
|
-
const _ref = ref();
|
|
13
|
-
return computed({
|
|
14
|
-
get() {
|
|
15
|
-
if (_ref.value)
|
|
16
|
-
return _ref.value;
|
|
17
|
-
return props[key];
|
|
18
|
-
},
|
|
19
|
-
set(value) {
|
|
20
|
-
_ref.value = value;
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
const searchContentMatcher = (() => {
|
|
25
|
-
const cache = /* @__PURE__ */ new Map();
|
|
26
|
-
const getRegexp = useMemoize(
|
|
27
|
-
(searchContent) => {
|
|
28
|
-
return new RegExp(
|
|
29
|
-
`(.*)${searchContent.split("").map((char) => `(${char})`).join("(.*)")}(.*)`
|
|
30
|
-
);
|
|
31
|
-
},
|
|
32
|
-
{ getKey: identity }
|
|
33
|
-
);
|
|
34
|
-
return (searchContent, label) => {
|
|
35
|
-
const cacheObj = cache.get(searchContent) || {};
|
|
36
|
-
cache.set(searchContent, cacheObj);
|
|
37
|
-
if (Reflect.has(cacheObj, label))
|
|
38
|
-
return cacheObj[label];
|
|
39
|
-
return cacheObj[label] = label.match(getRegexp(searchContent));
|
|
40
|
-
};
|
|
41
|
-
})();
|
|
42
|
-
function useSearchContent() {
|
|
43
|
-
const searchContent = ref();
|
|
44
|
-
function filter(option, labelKey) {
|
|
45
|
-
if (!searchContent.value)
|
|
46
|
-
return true;
|
|
47
|
-
const label = option ? option[labelKey] : "";
|
|
48
|
-
if (!isString(label))
|
|
49
|
-
return false;
|
|
50
|
-
const matched = searchContentMatcher(searchContent.value, label);
|
|
51
|
-
if (matched)
|
|
52
|
-
return true;
|
|
53
|
-
return keywordMatcher(searchContent.value, option.keyword);
|
|
54
|
-
}
|
|
55
|
-
function optionSearchFilter(options, _labelKey) {
|
|
56
|
-
if (!searchContent.value)
|
|
57
|
-
return options;
|
|
58
|
-
return options.filter((option) => filter(option, _labelKey));
|
|
59
|
-
}
|
|
60
|
-
return { searchContent, optionSearchFilter };
|
|
61
|
-
}
|
|
62
|
-
function useRecommendOptions(props, options, emit, labelKey, valueKey) {
|
|
63
|
-
const commonListRef = createPropRef(props, "commonList");
|
|
64
|
-
const recentListRef = createPropRef(props, "recentList");
|
|
65
|
-
const { searchContent, optionSearchFilter } = useSearchContent();
|
|
66
|
-
function getRecommendOption(item) {
|
|
67
|
-
return jsonParse(item.itemObj);
|
|
68
|
-
}
|
|
69
|
-
const commonOptions = computed(() => {
|
|
70
|
-
var _a, _b;
|
|
71
|
-
return (_b = (_a = commonListRef.value) == null ? void 0 : _a.map(getRecommendOption)) != null ? _b : [];
|
|
72
|
-
});
|
|
73
|
-
const recentOptions = computed(() => {
|
|
74
|
-
var _a, _b;
|
|
75
|
-
return (_b = (_a = recentListRef.value) == null ? void 0 : _a.map(getRecommendOption)) != null ? _b : [];
|
|
76
|
-
});
|
|
77
|
-
const sortedOptions = computed(() => {
|
|
78
|
-
if (!props.recommend || !commonOptions.value.length && !recentOptions.value.length)
|
|
79
|
-
return options.value;
|
|
80
|
-
const optionWithoutRecommend = options.value.filter((option) => {
|
|
81
|
-
return commonOptions.value.every(notInList) && recentOptions.value.every(notInList);
|
|
82
|
-
function notInList(item) {
|
|
83
|
-
return item[valueKey.value] !== option[valueKey.value];
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
|
-
return [
|
|
87
|
-
...optionSearchFilter(commonOptions.value, labelKey.value),
|
|
88
|
-
...optionSearchFilter(recentOptions.value, labelKey.value),
|
|
89
|
-
...optionWithoutRecommend
|
|
90
|
-
];
|
|
91
|
-
});
|
|
92
|
-
const { getRecommendRequestInfo, getHttpInstance } = useFormRequest();
|
|
93
|
-
function getRecommendConfig(type) {
|
|
94
|
-
const { url, getRecommendIds } = getRecommendRequestInfo();
|
|
95
|
-
const globInfo = isFunction(getRecommendIds) ? getRecommendIds() : {};
|
|
96
|
-
const widgetInfo = isFunction(props.getRecommendInfo) ? props.getRecommendInfo() : {};
|
|
97
|
-
return { url: url[type], info: Object.assign({}, globInfo, widgetInfo) };
|
|
98
|
-
}
|
|
99
|
-
const { fieldKey } = useFormField();
|
|
100
|
-
const asyncQueue = inject(InjectionAsyncQueue);
|
|
101
|
-
async function getRecommend(content) {
|
|
102
|
-
if (!props.recommend)
|
|
103
|
-
return;
|
|
104
|
-
searchContent.value = content;
|
|
105
|
-
if (commonListRef.value && recentListRef.value && props.recommendCache)
|
|
106
|
-
return;
|
|
107
|
-
const list = await asyncQueue.addAsync(createParams(fieldKey.value, props.recommendCache));
|
|
108
|
-
const { commonly, recently } = classifyList(list);
|
|
109
|
-
commonListRef.value = commonly;
|
|
110
|
-
recentListRef.value = recently;
|
|
111
|
-
function classifyList(list2) {
|
|
112
|
-
return list2.reduce(
|
|
113
|
-
(res, item) => {
|
|
114
|
-
if (item.type === "commonly") {
|
|
115
|
-
res.commonly.push(omit(item, ["type"]));
|
|
116
|
-
} else if (item.type === "recently") {
|
|
117
|
-
res.recently.push(omit(item, ["type"]));
|
|
118
|
-
}
|
|
119
|
-
return res;
|
|
120
|
-
},
|
|
121
|
-
{ commonly: [], recently: [] }
|
|
122
|
-
);
|
|
123
|
-
}
|
|
124
|
-
function createParams(key, cache) {
|
|
125
|
-
const { url, info } = getRecommendConfig("get");
|
|
126
|
-
return {
|
|
127
|
-
url,
|
|
128
|
-
method: "get",
|
|
129
|
-
key,
|
|
130
|
-
cache,
|
|
131
|
-
params: { ...info, recNum: props.recommendNum, keyword: "" }
|
|
132
|
-
};
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
async function postRecommend(value) {
|
|
136
|
-
if (!props.recommend)
|
|
137
|
-
return;
|
|
138
|
-
const http = getHttpInstance();
|
|
139
|
-
if (!http)
|
|
140
|
-
return;
|
|
141
|
-
const { url, info } = getRecommendConfig("post");
|
|
142
|
-
const option = sortedOptions.value.find((o) => {
|
|
143
|
-
return o[valueKey.value] === value;
|
|
144
|
-
});
|
|
145
|
-
option && emit(
|
|
146
|
-
"postRecommend",
|
|
147
|
-
await http.post(url, {
|
|
148
|
-
...info,
|
|
149
|
-
keyword: "",
|
|
150
|
-
itemId: valueKey.value,
|
|
151
|
-
itemObj: JSON.stringify(option)
|
|
152
|
-
})
|
|
153
|
-
);
|
|
154
|
-
}
|
|
155
|
-
return {
|
|
156
|
-
postRecommend,
|
|
157
|
-
getRecommend,
|
|
158
|
-
sortedOptions
|
|
159
|
-
};
|
|
160
|
-
}
|
|
161
|
-
function useUrlConfigOptions(props, valueRef) {
|
|
162
|
-
checkInSetupEnv();
|
|
163
|
-
const asyncQueue = inject(InjectionAsyncQueue);
|
|
164
|
-
const labelKey = computed(() => {
|
|
165
|
-
var _a, _b;
|
|
166
|
-
return (_b = (_a = props.urlConfig) == null ? void 0 : _a.nameKey) != null ? _b : "text";
|
|
167
|
-
});
|
|
168
|
-
const valueKey = computed(() => {
|
|
169
|
-
var _a, _b;
|
|
170
|
-
return (_b = (_a = props.urlConfig) == null ? void 0 : _a.valueKey) != null ? _b : "value";
|
|
171
|
-
});
|
|
172
|
-
const { searchContent, optionSearchFilter } = useSearchContent();
|
|
173
|
-
const remoteOptions = ref(null);
|
|
174
|
-
const { field, fieldKey } = useFormField();
|
|
175
|
-
const fetchData = useDebounceFn(async function(content) {
|
|
176
|
-
searchContent.value = content || "";
|
|
177
|
-
if (!props.urlConfig) {
|
|
178
|
-
return remoteOptions.value = null;
|
|
179
|
-
}
|
|
180
|
-
try {
|
|
181
|
-
remoteOptions.value = await asyncQueue.addAsync(
|
|
182
|
-
await createUrlConfigParams({
|
|
183
|
-
config: props.urlConfig,
|
|
184
|
-
cache: props.requestCache,
|
|
185
|
-
field: field.value
|
|
186
|
-
})
|
|
187
|
-
);
|
|
188
|
-
} catch (e) {
|
|
189
|
-
isString(e) && formRenderLog(e);
|
|
190
|
-
}
|
|
191
|
-
}, 300);
|
|
192
|
-
const options = computed(() => {
|
|
193
|
-
if (remoteOptions.value)
|
|
194
|
-
return optionSearchFilter(remoteOptions.value, labelKey.value);
|
|
195
|
-
if (!Array.isArray(props.options))
|
|
196
|
-
return [];
|
|
197
|
-
return optionSearchFilter(props.options, labelKey.value);
|
|
198
|
-
});
|
|
199
|
-
const formItemDepsCollector = inject(InjectionFormItemDepsCollector);
|
|
200
|
-
watch(
|
|
201
|
-
() => props.urlConfig,
|
|
202
|
-
(config, oldConfig) => {
|
|
203
|
-
if (isEqual(config, oldConfig))
|
|
204
|
-
return;
|
|
205
|
-
remoteOptions.value = null;
|
|
206
|
-
if (!config)
|
|
207
|
-
return;
|
|
208
|
-
formItemDepsCollector.setDeps(fieldKey.value, config.dependKey || [], async () => {
|
|
209
|
-
remoteOptions.value = null;
|
|
210
|
-
valueRef.value = null;
|
|
211
|
-
!props.lazyRequest && await fetchData();
|
|
212
|
-
});
|
|
213
|
-
(valueRef.value || !props.lazyRequest) && fetchData();
|
|
214
|
-
},
|
|
215
|
-
{ immediate: true }
|
|
216
|
-
);
|
|
217
|
-
return { labelKey, valueKey, options, fetchData };
|
|
218
|
-
}
|
|
219
|
-
function useAutographOptions(props, valueRef) {
|
|
220
|
-
checkInSetupEnv();
|
|
221
|
-
const asyncQueue = inject(InjectionAsyncQueue);
|
|
222
|
-
const labelKey = computed(() => {
|
|
223
|
-
var _a, _b, _c;
|
|
224
|
-
return (_c = (_b = (_a = props.wordbook) == null ? void 0 : _a.render_key) == null ? void 0 : _b[0]) != null ? _c : "text";
|
|
225
|
-
});
|
|
226
|
-
const valueKey = computed(() => {
|
|
227
|
-
var _a, _b;
|
|
228
|
-
return (_b = (_a = props.wordbook) == null ? void 0 : _a.value_key) != null ? _b : "value";
|
|
229
|
-
});
|
|
230
|
-
const { searchContent, optionSearchFilter } = useSearchContent();
|
|
231
|
-
const remoteOptions = ref(null);
|
|
232
|
-
const { fieldKey } = useFormField();
|
|
233
|
-
const { getSearchRequestInfo } = useFormRequest();
|
|
234
|
-
const fetchData = useDebounceFn(async function(content) {
|
|
235
|
-
searchContent.value = content || "";
|
|
236
|
-
if (!props.autograph || !props.wordbook) {
|
|
237
|
-
return remoteOptions.value = null;
|
|
238
|
-
}
|
|
239
|
-
try {
|
|
240
|
-
remoteOptions.value = await asyncQueue.addAsync(createParams(props.wordbook, props.autograph, fieldKey.value));
|
|
241
|
-
} catch (e) {
|
|
242
|
-
isString(e) && formRenderLog(e);
|
|
243
|
-
}
|
|
244
|
-
function createParams(wordbook, autograph, key) {
|
|
245
|
-
const params = {
|
|
246
|
-
autograph,
|
|
247
|
-
wordbookId: wordbook.id,
|
|
248
|
-
wordbookType: wordbook.type,
|
|
249
|
-
fieldKeys: wordbook.search_key,
|
|
250
|
-
keyword: "",
|
|
251
|
-
page: 1
|
|
252
|
-
};
|
|
253
|
-
return { ...getSearchRequestInfo(), params, key, cache: props.requestCache };
|
|
254
|
-
}
|
|
255
|
-
}, 300);
|
|
256
|
-
const options = computed(() => {
|
|
257
|
-
if (remoteOptions.value)
|
|
258
|
-
return optionSearchFilter(remoteOptions.value, labelKey.value);
|
|
259
|
-
if (!Array.isArray(props.options))
|
|
260
|
-
return [];
|
|
261
|
-
return optionSearchFilter(props.options, labelKey.value);
|
|
262
|
-
});
|
|
263
|
-
watch(
|
|
264
|
-
() => props.wordbook,
|
|
265
|
-
(wordbook, oldWordbook) => {
|
|
266
|
-
if (isEqual(wordbook, oldWordbook))
|
|
267
|
-
return;
|
|
268
|
-
remoteOptions.value = null;
|
|
269
|
-
if (!wordbook)
|
|
270
|
-
return;
|
|
271
|
-
(valueRef.value || !props.lazyRequest) && fetchData();
|
|
272
|
-
},
|
|
273
|
-
{ immediate: true }
|
|
274
|
-
);
|
|
275
|
-
return { labelKey, valueKey, options, fetchData };
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
export { searchContentMatcher, useAutographOptions, useRecommendOptions, useUrlConfigOptions };
|
|
1
|
+
import{checkInSetupEnv as e,jsonParse as n}from"../../../../shared/utils/index.js";import{useMemoize as t,useDebounceFn as r}from"@vueuse/core";import{identity as o,isString as u,isEqual as l,omit as a,isFunction as i}from"lodash-es";import{computed as c,inject as s,ref as v,watch as m}from"vue";import"../../index.js";import{InjectionAsyncQueue as d,InjectionFormItemDepsCollector as f}from"../constants/index.js";import{createUrlConfigParams as y,formRenderLog as p,keywordMatcher as h}from"../utils/index.js";import{useFormField as g}from"./useFormField.js";import{useFormRequest as w}from"./useFormRequest.js";function k(e,n){const t=v();return c({get:()=>t.value?t.value:e[n],set(e){t.value=e}})}const R=(()=>{const e=new Map,n=t((e=>new RegExp(`(.*)${e.split("").map((e=>`(${e})`)).join("(.*)")}(.*)`)),{getKey:o});return(t,r)=>{const o=e.get(t)||{};return e.set(t,o),Reflect.has(o,r)?o[r]:o[r]=r.match(n(t))}})();function C(){const e=v();return{searchContent:e,optionSearchFilter:function(n,t){return e.value?n.filter((n=>function(n,t){if(!e.value)return!0;const r=n?n[t]:"";return!!u(r)&&(!!R(e.value,r)||h(e.value,n.keyword))}(n,t))):n}}}function b(e,t,r,o,u){const l=k(e,"commonList"),v=k(e,"recentList"),{searchContent:m,optionSearchFilter:f}=C();function y(e){return n(e.itemObj)}const p=c((()=>{var e,n;return null!=(n=null==(e=l.value)?void 0:e.map(y))?n:[]})),h=c((()=>{var e,n;return null!=(n=null==(e=v.value)?void 0:e.map(y))?n:[]})),R=c((()=>{if(!e.recommend||!p.value.length&&!h.value.length)return t.value;const n=t.value.filter((e=>{return p.value.every(n)&&h.value.every(n);function n(n){return n[u.value]!==e[u.value]}}));return[...f(p.value,o.value),...f(h.value,o.value),...n]})),{getRecommendRequestInfo:b,getHttpInstance:K}=w();function j(n){const{url:t,getRecommendIds:r}=b(),o=i(r)?r():{},u=i(e.getRecommendInfo)?e.getRecommendInfo():{};return{url:t[n],info:Object.assign({},o,u)}}const{fieldKey:q}=g(),x=s(d);return{postRecommend:async function(n){if(!e.recommend)return;const t=K();if(!t)return;const{url:o,info:l}=j("post"),a=R.value.find((e=>e[u.value]===n));a&&r("postRecommend",await t.post(o,{...l,keyword:"",itemId:u.value,itemObj:JSON.stringify(a)}))},getRecommend:async function(n){if(!e.recommend)return;if(m.value=n,l.value&&v.value&&e.recommendCache)return;const t=await x.addAsync(function(n,t){const{url:r,info:o}=j("get");return{url:r,method:"get",key:n,cache:t,params:{...o,recNum:e.recommendNum,keyword:""}}}(q.value,e.recommendCache)),{commonly:r,recently:o}=t.reduce(((e,n)=>("commonly"===n.type?e.commonly.push(a(n,["type"])):"recently"===n.type&&e.recently.push(a(n,["type"])),e)),{commonly:[],recently:[]});l.value=r,v.value=o},sortedOptions:R}}function K(n,t){e();const o=s(d),a=c((()=>{var e,t;return null!=(t=null==(e=n.urlConfig)?void 0:e.nameKey)?t:"text"})),i=c((()=>{var e,t;return null!=(t=null==(e=n.urlConfig)?void 0:e.valueKey)?t:"value"})),{searchContent:h,optionSearchFilter:w}=C(),k=v(null),{field:R,fieldKey:b}=g(),K=r((async function(e){if(h.value=e||"",!n.urlConfig)return k.value=null;try{k.value=await o.addAsync(await y({config:n.urlConfig,cache:n.requestCache,field:R.value}))}catch(e){u(e)&&p(e)}}),300),j=c((()=>k.value?w(k.value,a.value):Array.isArray(n.options)?w(n.options,a.value):[])),q=s(f);return m((()=>n.urlConfig),((e,r)=>{l(e,r)||(k.value=null,e&&(q.setDeps(b.value,e.dependKey||[],(async()=>{k.value=null,t.value=null,!n.lazyRequest&&await K()})),(t.value||!n.lazyRequest)&&K()))}),{immediate:!0}),{labelKey:a,valueKey:i,options:j,fetchData:K}}function j(n,t){e();const o=s(d),a=c((()=>{var e,t,r;return null!=(r=null==(t=null==(e=n.wordbook)?void 0:e.render_key)?void 0:t[0])?r:"text"})),i=c((()=>{var e,t;return null!=(t=null==(e=n.wordbook)?void 0:e.value_key)?t:"value"})),{searchContent:f,optionSearchFilter:y}=C(),h=v(null),{fieldKey:k}=g(),{getSearchRequestInfo:R}=w(),b=r((async function(e){if(f.value=e||"",!n.autograph||!n.wordbook)return h.value=null;try{h.value=await o.addAsync(function(e,t,r){const o={autograph:t,wordbookId:e.id,wordbookType:e.type,fieldKeys:e.search_key,keyword:"",page:1};return{...R(),params:o,key:r,cache:n.requestCache}}(n.wordbook,n.autograph,k.value))}catch(e){u(e)&&p(e)}}),300),K=c((()=>h.value?y(h.value,a.value):Array.isArray(n.options)?y(n.options,a.value):[]));return m((()=>n.wordbook),((e,r)=>{l(e,r)||(h.value=null,e&&(t.value||!n.lazyRequest)&&b())}),{immediate:!0}),{labelKey:a,valueKey:i,options:K,fetchData:b}}export{R as searchContentMatcher,j as useAutographOptions,b as useRecommendOptions,K as useUrlConfigOptions};
|
|
@@ -1,42 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
let http = null;
|
|
4
|
-
const searchRequestInfo = { method: "post", url: "", primaryKeyUrl: "" };
|
|
5
|
-
const recommendRequestInfo = {
|
|
6
|
-
url: {
|
|
7
|
-
get: "/fdp-api/fdp/aiRec/search",
|
|
8
|
-
post: "/fdp-api/fdp/aiRec/sendBehaviorData",
|
|
9
|
-
delete: "/fdp-api/fdp/aiRec/delete"
|
|
10
|
-
},
|
|
11
|
-
getRecommendIds: () => ({})
|
|
12
|
-
};
|
|
13
|
-
function useFormRequest() {
|
|
14
|
-
function getHttpInstance() {
|
|
15
|
-
return http;
|
|
16
|
-
}
|
|
17
|
-
function registGlobHttpInstance(instance) {
|
|
18
|
-
http = instance;
|
|
19
|
-
}
|
|
20
|
-
function getSearchRequestInfo() {
|
|
21
|
-
return { ...searchRequestInfo };
|
|
22
|
-
}
|
|
23
|
-
function getRecommendRequestInfo() {
|
|
24
|
-
return cloneDeep(recommendRequestInfo);
|
|
25
|
-
}
|
|
26
|
-
function registGlobSearchInfo(info) {
|
|
27
|
-
Object.assign(searchRequestInfo, info);
|
|
28
|
-
}
|
|
29
|
-
function registGlobRecommendInfo(info) {
|
|
30
|
-
Object.assign(recommendRequestInfo, info);
|
|
31
|
-
}
|
|
32
|
-
return {
|
|
33
|
-
getHttpInstance,
|
|
34
|
-
registGlobHttpInstance,
|
|
35
|
-
registGlobRecommendInfo,
|
|
36
|
-
registGlobSearchInfo,
|
|
37
|
-
getSearchRequestInfo,
|
|
38
|
-
getRecommendRequestInfo
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export { useFormRequest };
|
|
1
|
+
import{cloneDeep as e}from"lodash-es";let t=null;const n={method:"post",url:"",primaryKeyUrl:""},o={url:{get:"/fdp-api/fdp/aiRec/search",post:"/fdp-api/fdp/aiRec/sendBehaviorData",delete:"/fdp-api/fdp/aiRec/delete"},getRecommendIds:()=>({})};function r(){return{getHttpInstance:function(){return t},registGlobHttpInstance:function(e){t=e},registGlobRecommendInfo:function(e){Object.assign(o,e)},registGlobSearchInfo:function(e){Object.assign(n,e)},getSearchRequestInfo:function(){return{...n}},getRecommendRequestInfo:function(){return e(o)}}}export{r as useFormRequest};
|
|
@@ -1,83 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { once, isString } from 'lodash-es';
|
|
3
|
-
import '../utils/index.js';
|
|
4
|
-
import { isFunction } from '@vueuse/core';
|
|
5
|
-
import { registerValidateLocale } from '@formily/core';
|
|
6
|
-
import { isIdCard } from '../utils/business.js';
|
|
7
|
-
|
|
8
|
-
function useFormValidator() {
|
|
9
|
-
const validateMap = /* @__PURE__ */ new Map([
|
|
10
|
-
["mobile", ({ validate }) => ({ format: "phone", message: validate == null ? void 0 : validate.message })],
|
|
11
|
-
["integer", ({ validate }) => ({ format: "integer", message: validate == null ? void 0 : validate.message })],
|
|
12
|
-
["number", ({ validate }) => ({ format: "number", message: validate == null ? void 0 : validate.message })],
|
|
13
|
-
[
|
|
14
|
-
"id_card",
|
|
15
|
-
({ validate }) => ({
|
|
16
|
-
validator(value) {
|
|
17
|
-
var _a;
|
|
18
|
-
if (value == null)
|
|
19
|
-
return;
|
|
20
|
-
if (!isString(value) || !isIdCard(value))
|
|
21
|
-
return (_a = validate == null ? void 0 : validate.message) != null ? _a : "\u8BE5\u5B57\u6BB5\u4E0D\u662F\u5408\u6CD5\u7684\u8EAB\u4EFD\u8BC1\u683C\u5F0F";
|
|
22
|
-
}
|
|
23
|
-
})
|
|
24
|
-
],
|
|
25
|
-
[
|
|
26
|
-
"regular",
|
|
27
|
-
({ validate, regular_expression, regular_error_tip }) => {
|
|
28
|
-
const pattern = regular_expression || (validate == null ? void 0 : validate.regular_expression) || "";
|
|
29
|
-
const message = regular_error_tip || (validate == null ? void 0 : validate.regular_error_tip) || (validate == null ? void 0 : validate.message) || "\u683C\u5F0F\u9519\u8BEF";
|
|
30
|
-
return { pattern, message };
|
|
31
|
-
}
|
|
32
|
-
]
|
|
33
|
-
]);
|
|
34
|
-
const commonValidateConfig = { triggerType: "onBlur" };
|
|
35
|
-
const createDecimalValidator = (decimal, message) => {
|
|
36
|
-
const errorMessage = message != null ? message : `\u5C0F\u6570\u4F4D\u6570\u6700\u591A${decimal}\u4F4D`;
|
|
37
|
-
return {
|
|
38
|
-
validator(value) {
|
|
39
|
-
var _a;
|
|
40
|
-
return ((_a = String(value).split(".")[1]) == null ? void 0 : _a.length) > decimal ? errorMessage : "";
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
function createValidatorSchema(fieldItem) {
|
|
45
|
-
const rules = [];
|
|
46
|
-
const {
|
|
47
|
-
validate: { vali_obj, max_length, min_length, message, max_value, min_value, decimal_length } = {},
|
|
48
|
-
validator
|
|
49
|
-
} = fieldItem;
|
|
50
|
-
if (validator) {
|
|
51
|
-
arrayed(validator).forEach((f) => {
|
|
52
|
-
if (!isFunction(f))
|
|
53
|
-
return;
|
|
54
|
-
rules.push({ validator: (value) => f(value, fieldItem) });
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
if (max_length)
|
|
58
|
-
rules.push({ max: max_length, message });
|
|
59
|
-
if (min_length)
|
|
60
|
-
rules.push({ min: min_length, message });
|
|
61
|
-
if (max_value)
|
|
62
|
-
rules.push({ maximum: max_value, message });
|
|
63
|
-
if (min_value)
|
|
64
|
-
rules.push({ minimum: min_value, message });
|
|
65
|
-
if (decimal_length != null)
|
|
66
|
-
rules.push(createDecimalValidator(+decimal_length, message));
|
|
67
|
-
if (vali_obj) {
|
|
68
|
-
const ruleCreator = validateMap.get(vali_obj) || (({ validate }) => ({ format: vali_obj, message: validate == null ? void 0 : validate.message }));
|
|
69
|
-
rules.push(Object.assign({}, commonValidateConfig, ruleCreator(fieldItem)));
|
|
70
|
-
}
|
|
71
|
-
return rules;
|
|
72
|
-
}
|
|
73
|
-
return { createValidatorSchema };
|
|
74
|
-
}
|
|
75
|
-
const validateMessageLocale = once(() => {
|
|
76
|
-
registerValidateLocale({
|
|
77
|
-
"zh-CN": {
|
|
78
|
-
required: "${alias}\u4E3A\u5FC5\u586B"
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
export { useFormValidator, validateMessageLocale };
|
|
1
|
+
import{arrayed as e}from"../../../../shared/utils/index.js";import{once as a,isString as r}from"lodash-es";import"../utils/index.js";import{isFunction as s}from"@vueuse/core";import{registerValidateLocale as i}from"@formily/core";import{isIdCard as l}from"../utils/business.js";function t(){const a=new Map([["mobile",({validate:e})=>({format:"phone",message:null==e?void 0:e.message})],["integer",({validate:e})=>({format:"integer",message:null==e?void 0:e.message})],["number",({validate:e})=>({format:"number",message:null==e?void 0:e.message})],["id_card",({validate:e})=>({validator(a){var s;if(null!=a)return r(a)&&l(a)?void 0:null!=(s=null==e?void 0:e.message)?s:"该字段不是合法的身份证格式"}})],["regular",({validate:e,regular_expression:a,regular_error_tip:r})=>({pattern:a||(null==e?void 0:e.regular_expression)||"",message:r||(null==e?void 0:e.regular_error_tip)||(null==e?void 0:e.message)||"格式错误"})]]),i={triggerType:"onBlur"};return{createValidatorSchema:function(r){const l=[],{validate:{vali_obj:t,max_length:o,min_length:n,message:m,max_value:u,min_value:g,decimal_length:d}={},validator:v}=r;if(v&&e(v).forEach((e=>{s(e)&&l.push({validator:a=>e(a,r)})})),o&&l.push({max:o,message:m}),n&&l.push({min:n,message:m}),u&&l.push({maximum:u,message:m}),g&&l.push({minimum:g,message:m}),null!=d&&l.push(((e,a)=>{const r=null!=a?a:`小数位数最多${e}位`;return{validator(a){var s;return(null==(s=String(a).split(".")[1])?void 0:s.length)>e?r:""}}})(+d,m)),t){const e=a.get(t)||(({validate:e})=>({format:t,message:null==e?void 0:e.message}));l.push(Object.assign({},i,e(r)))}return l}}}const o=a((()=>{i({"zh-CN":{required:"${alias}为必填"}})}));export{t as useFormValidator,o as validateMessageLocale};
|
|
@@ -1,85 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { isArray, isString, includes, isEmpty, negate, gt, gte, lt, lte } from 'lodash-es';
|
|
3
|
-
import { computed, unref } from 'vue';
|
|
4
|
-
import { Path } from '@formily/path';
|
|
5
|
-
|
|
6
|
-
function useLowCodeReactions(configListRef, formModel) {
|
|
7
|
-
const compareMap = {
|
|
8
|
-
EQ: (v1, v2) => `${v1}` === v2,
|
|
9
|
-
NEQ: (v1, v2) => `${v1}` !== v2,
|
|
10
|
-
CL: (v1, v2) => isArray(v1) || isString(v1) ? includes(v1, v2) : false,
|
|
11
|
-
NC: (v1, v2) => isArray(v1) || isString(v1) ? !includes(v1, v2) : true,
|
|
12
|
-
NULL: isEmpty,
|
|
13
|
-
NOT_NULL: negate(isEmpty),
|
|
14
|
-
BIG: gt,
|
|
15
|
-
BIGEQ: gte,
|
|
16
|
-
LESS: lt,
|
|
17
|
-
LESSEQ: lte
|
|
18
|
-
};
|
|
19
|
-
const triggerMap = {
|
|
20
|
-
hideField: createFieldHandler((field) => field.setDisplay("none")),
|
|
21
|
-
showField: createFieldHandler((field) => field.setDisplay("visible")),
|
|
22
|
-
requiredField: createFieldHandler((field) => field.required = true),
|
|
23
|
-
notRequiredField: createFieldHandler((field) => {
|
|
24
|
-
field.required = false;
|
|
25
|
-
field.validate();
|
|
26
|
-
}),
|
|
27
|
-
enabledField: createFieldHandler((field) => field.editable = true),
|
|
28
|
-
disabledField: createFieldHandler((field) => field.editable = false)
|
|
29
|
-
};
|
|
30
|
-
function createFieldHandler(cb) {
|
|
31
|
-
return (fields) => {
|
|
32
|
-
fields.forEach((field) => {
|
|
33
|
-
const state = formModel.query(field).take();
|
|
34
|
-
state && isField(state) && cb(state);
|
|
35
|
-
});
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
const reactionKeys = computed(() => {
|
|
39
|
-
if (!unref(configListRef))
|
|
40
|
-
return [];
|
|
41
|
-
return unref(configListRef).reduce((res, config) => {
|
|
42
|
-
isArray(config.conObj) && config.conObj.forEach((conObj) => res.push(conObj.field_key));
|
|
43
|
-
return res;
|
|
44
|
-
}, []);
|
|
45
|
-
});
|
|
46
|
-
function conObjMatcher(field, value, conObj) {
|
|
47
|
-
if (conObj.field_key !== field)
|
|
48
|
-
return;
|
|
49
|
-
const relation = compareMap[conObj.con] || (() => false);
|
|
50
|
-
return relation(value, `${conObj.value}`);
|
|
51
|
-
}
|
|
52
|
-
function lowCodeReactionsHandler(field, value) {
|
|
53
|
-
const configList = unref(configListRef);
|
|
54
|
-
if (!configList || !reactionKeys.value.includes(field))
|
|
55
|
-
return;
|
|
56
|
-
configList.forEach((config) => {
|
|
57
|
-
shouldTriggerReactions(field, value, config.conObj) && trigger(config);
|
|
58
|
-
});
|
|
59
|
-
function shouldTriggerReactions(field2, value2, conObjs) {
|
|
60
|
-
return conObjs.every((conObj) => conObjMatcher(field2, value2, conObj));
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
function trigger(config) {
|
|
64
|
-
Object.entries(config).forEach(([k, v]) => triggerMap[k] && triggerMap[k](v));
|
|
65
|
-
}
|
|
66
|
-
function triggerAllReactionsHandler() {
|
|
67
|
-
const configList = unref(configListRef);
|
|
68
|
-
if (!configList)
|
|
69
|
-
return;
|
|
70
|
-
const formData = formModel.getFormState().values;
|
|
71
|
-
configList.forEach((config) => {
|
|
72
|
-
shouldTriggerReactions(formData, config) && trigger(config);
|
|
73
|
-
});
|
|
74
|
-
function shouldTriggerReactions(formData2, config) {
|
|
75
|
-
if (!isArray(config.conObj))
|
|
76
|
-
return;
|
|
77
|
-
return config.conObj.every(
|
|
78
|
-
(conObj) => conObjMatcher(conObj.field_key, Path.getIn(formData2, conObj.field_key), conObj)
|
|
79
|
-
);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
return { lowCodeReactionsHandler, triggerAllReactionsHandler };
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
export { useLowCodeReactions };
|
|
1
|
+
import{isField as e}from"@formily/core";import{isArray as r,isString as o,includes as i,isEmpty as n,negate as t,gt as c,gte as l,lt as d,lte as u}from"lodash-es";import{computed as a,unref as f}from"vue";import{Path as s}from"@formily/path";function b(b,m){const y={EQ:(e,r)=>`${e}`===r,NEQ:(e,r)=>`${e}`!==r,CL:(e,n)=>!(!r(e)&&!o(e))&&i(e,n),NC:(e,n)=>!r(e)&&!o(e)||!i(e,n),NULL:n,NOT_NULL:t(n),BIG:c,BIGEQ:l,LESS:d,LESSEQ:u},E={hideField:h((e=>e.setDisplay("none"))),showField:h((e=>e.setDisplay("visible"))),requiredField:h((e=>e.required=!0)),notRequiredField:h((e=>{e.required=!1,e.validate()})),enabledField:h((e=>e.editable=!0)),disabledField:h((e=>e.editable=!1))};function h(r){return o=>{o.forEach((o=>{const i=m.query(o).take();i&&e(i)&&r(i)}))}}const p=a((()=>f(b)?f(b).reduce(((e,o)=>(r(o.conObj)&&o.conObj.forEach((r=>e.push(r.field_key))),e)),[]):[]));function v(e,r,o){if(o.field_key!==e)return;return(y[o.con]||(()=>!1))(r,`${o.value}`)}function F(e){Object.entries(e).forEach((([e,r])=>E[e]&&E[e](r)))}return{lowCodeReactionsHandler:function(e,r){const o=f(b);o&&p.value.includes(e)&&o.forEach((o=>{var i,n;i=e,n=r,o.conObj.every((e=>v(i,n,e)))&&F(o)}))},triggerAllReactionsHandler:function(){const e=f(b);if(!e)return;const o=m.getFormState().values;e.forEach((e=>{(function(e,o){if(!r(o.conObj))return;return o.conObj.every((r=>v(r.field_key,s.getIn(e,r.field_key),r)))})(o,e)&&F(e)}))}}}export{b as useLowCodeReactions};
|
|
@@ -1,18 +1 @@
|
|
|
1
|
-
function
|
|
2
|
-
const nuiThemeOverrides = {
|
|
3
|
-
Input: { paddingMedium: "8px", paddingSmall: "8px", paddingLarge: "8px", paddingTiny: "8px" },
|
|
4
|
-
InternalSelection: { paddingSingle: "8px", paddingMultiple: "2px" },
|
|
5
|
-
Form: {
|
|
6
|
-
feedbackHeightMedium: "16px",
|
|
7
|
-
feedbackHeightLarge: "16px",
|
|
8
|
-
feedbackHeightSmall: "16px",
|
|
9
|
-
feedbackFontSizeLarge: "12px",
|
|
10
|
-
feedbackFontSizeMedium: "12px",
|
|
11
|
-
feedbackFontSizeSmall: "12px",
|
|
12
|
-
feedbackPadding: "0px"
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
return { nuiThemeOverrides };
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export { useNuiThemeOverrides };
|
|
1
|
+
function e(){return{nuiThemeOverrides:{Input:{paddingMedium:"8px",paddingSmall:"8px",paddingLarge:"8px",paddingTiny:"8px"},InternalSelection:{paddingSingle:"8px",paddingMultiple:"2px"},Form:{feedbackHeightMedium:"16px",feedbackHeightLarge:"16px",feedbackHeightSmall:"16px",feedbackFontSizeLarge:"12px",feedbackFontSizeMedium:"12px",feedbackFontSizeSmall:"12px",feedbackPadding:"0px"}}}}export{e as useNuiThemeOverrides};
|
|
@@ -1,22 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import '../utils/index.js';
|
|
3
|
-
import { isIdCard, isMobile } from '../utils/business.js';
|
|
4
|
-
|
|
5
|
-
function usePresetScope() {
|
|
6
|
-
return {
|
|
7
|
-
isIdCard(value) {
|
|
8
|
-
return isString(value) && isIdCard(value);
|
|
9
|
-
},
|
|
10
|
-
isMobile(value) {
|
|
11
|
-
return isString(value) && isMobile(value);
|
|
12
|
-
},
|
|
13
|
-
isEmail(value) {
|
|
14
|
-
return isString(value) && /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(value);
|
|
15
|
-
},
|
|
16
|
-
isNumber(value) {
|
|
17
|
-
return isString(value) && /\d+/.test(value);
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export { usePresetScope };
|
|
1
|
+
import{isString as s}from"lodash-es";import"../utils/index.js";import{isIdCard as i,isMobile as t}from"../utils/business.js";function r(){return{isIdCard:t=>s(t)&&i(t),isMobile:i=>s(i)&&t(i),isEmail:i=>s(i)&&/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(i),isNumber:i=>s(i)&&/\d+/.test(i)}}export{r as usePresetScope};
|
|
@@ -4,6 +4,7 @@ import { CSSProperties, VNode } from 'vue';
|
|
|
4
4
|
import { DependKeyType, FormCommonState, FormRequestType } from '../../../../../es/components/form-render';
|
|
5
5
|
export * from '@formily/core';
|
|
6
6
|
declare type FieldBusinessType = 'password' | 'id_card' | 'age' | 'age_unit' | 'mobile' | 'telephone' | 'email' | 'sex' | 'birthday' | 'bank_card' | 'website' | 'gestational_weeks' | 'gestational_stage' | 'customer_name';
|
|
7
|
+
declare type HtmlType = 'INPUT' | 'SELECT' | 'LINEBAR' | 'LINE_BREAKS' | 'INPUT_NUMBER' | 'REMOTE_SEARCH' | 'DATE' | 'LEVEL_SEARCH_CASCADER' | 'SEARCH_CASCADER' | 'COMBINATION' | 'RADIO' | 'CHECKBOX' | 'SWITCH' | 'SLIDER' | 'COMPLEX' | 'SEARCH' | 'PHONE_TYPE' | 'IDCARD_TYPE' | 'SEARCH_MORE' | 'DIGITAL' | 'CHECKBOX_BLOCK' | 'RADIO_BLOCK' | 'DATE-INPUT' | 'DATETIME-INPUT' | 'SWITCH_COMPONENT' | 'SLIDER_COMPONENT' | 'LEVEL_SEARCH_CASCADE' | 'SEARCH_CASCADE' | ({} & string);
|
|
7
8
|
export declare type ValidateItem = Partial<{
|
|
8
9
|
/**
|
|
9
10
|
* 业务类型
|
|
@@ -92,7 +93,7 @@ export declare type FieldItem = {
|
|
|
92
93
|
/**
|
|
93
94
|
* 控件类型
|
|
94
95
|
*/
|
|
95
|
-
html_type:
|
|
96
|
+
html_type: HtmlType;
|
|
96
97
|
} & Partial<{
|
|
97
98
|
/**
|
|
98
99
|
* 是否开启批注(需要先在表单维度开启)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export*from"@formily/core";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export*from"@formily/core";
|