cnhis-design-vue 3.1.40-beta.12 → 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/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.js +1 -10
- 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.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/table-filter/style/index.css +1 -1
- 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,114 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { isObjectField } from '@formily/core';
|
|
3
|
-
import { RecursionField, connect } from '@formily/vue';
|
|
4
|
-
import { AddCircleOutline, RemoveCircle } from '@vicons/ionicons5';
|
|
5
|
-
import { isNumber, isArray, range } from 'lodash-es';
|
|
6
|
-
import { NButton, NIcon } from 'naive-ui';
|
|
7
|
-
import '../../../index.js';
|
|
8
|
-
import { InjectionBusinessCollector } from '../../constants/index.js';
|
|
9
|
-
import '../../utils/index.js';
|
|
10
|
-
import { useFormField } from '../../hooks/useFormField.js';
|
|
11
|
-
import { useFieldListAdaptor } from '../../hooks/useFieldListAdaptor.js';
|
|
12
|
-
import { createObjSchema } from '../../utils/schema.js';
|
|
13
|
-
|
|
14
|
-
const script = defineComponent({
|
|
15
|
-
name: "FormCombination",
|
|
16
|
-
props: {
|
|
17
|
-
title: {
|
|
18
|
-
type: String,
|
|
19
|
-
default: ""
|
|
20
|
-
},
|
|
21
|
-
value: {
|
|
22
|
-
type: Array
|
|
23
|
-
},
|
|
24
|
-
maxGroupNum: {
|
|
25
|
-
type: Number
|
|
26
|
-
},
|
|
27
|
-
disabled: {
|
|
28
|
-
type: Boolean
|
|
29
|
-
},
|
|
30
|
-
getProperties: {
|
|
31
|
-
type: Function,
|
|
32
|
-
default: () => []
|
|
33
|
-
},
|
|
34
|
-
onInput: {},
|
|
35
|
-
onBlur: {},
|
|
36
|
-
onChange: {}
|
|
37
|
-
},
|
|
38
|
-
emits: ["update:value"],
|
|
39
|
-
setup(props) {
|
|
40
|
-
const {
|
|
41
|
-
field,
|
|
42
|
-
fieldKey
|
|
43
|
-
} = useFormField();
|
|
44
|
-
const currentGroupNum = ref(1);
|
|
45
|
-
const maxGroupNum = computed(() => {
|
|
46
|
-
if (!isNumber(props.maxGroupNum))
|
|
47
|
-
return Infinity;
|
|
48
|
-
if (props.maxGroupNum < 1)
|
|
49
|
-
return 0;
|
|
50
|
-
return ~~props.maxGroupNum;
|
|
51
|
-
});
|
|
52
|
-
watch(() => props.value, (value) => {
|
|
53
|
-
if (!isArray(value))
|
|
54
|
-
return;
|
|
55
|
-
currentGroupNum.value = Math.min(Math.max(value.length, 1), maxGroupNum.value);
|
|
56
|
-
}, {
|
|
57
|
-
immediate: true
|
|
58
|
-
});
|
|
59
|
-
function addGroup() {
|
|
60
|
-
currentGroupNum.value++;
|
|
61
|
-
}
|
|
62
|
-
async function removeGroup(idx) {
|
|
63
|
-
if (currentGroupNum.value > 1) {
|
|
64
|
-
currentGroupNum.value--;
|
|
65
|
-
await field.value.remove(idx);
|
|
66
|
-
} else {
|
|
67
|
-
const currentField = field.value.query(`${fieldKey.value}.${idx}`).take();
|
|
68
|
-
if (!currentField || !isObjectField(currentField))
|
|
69
|
-
return;
|
|
70
|
-
await currentField.reset();
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
const collector = inject(InjectionBusinessCollector);
|
|
74
|
-
const {
|
|
75
|
-
schemaAdaptor
|
|
76
|
-
} = useFieldListAdaptor(collector);
|
|
77
|
-
return () => {
|
|
78
|
-
return createVNode("section", {
|
|
79
|
-
"class": "form-render__combination"
|
|
80
|
-
}, [createVNode("header", {
|
|
81
|
-
"class": "form-render__combinationHeader"
|
|
82
|
-
}, [createVNode("div", {
|
|
83
|
-
"class": "form-render__combinationHeaderText"
|
|
84
|
-
}, [props.title]), createVNode(NButton, {
|
|
85
|
-
"onClick": addGroup,
|
|
86
|
-
"type": "info",
|
|
87
|
-
"text": true,
|
|
88
|
-
"disabled": currentGroupNum.value >= maxGroupNum.value || props.disabled
|
|
89
|
-
}, {
|
|
90
|
-
icon: () => createVNode(NIcon, {
|
|
91
|
-
"component": AddCircleOutline
|
|
92
|
-
}, null),
|
|
93
|
-
default: () => "\u65B0\u589E"
|
|
94
|
-
})]), range(currentGroupNum.value).map((_, idx) => createVNode("section", {
|
|
95
|
-
"class": "form-render__combinationContent"
|
|
96
|
-
}, [createVNode(RecursionField, {
|
|
97
|
-
"schema": createObjSchema(schemaAdaptor(props.getProperties())),
|
|
98
|
-
"name": idx
|
|
99
|
-
}, null), createVNode(NButton, {
|
|
100
|
-
"text": true,
|
|
101
|
-
"type": "error",
|
|
102
|
-
"class": "form-render__combinationClose",
|
|
103
|
-
"onClick": () => removeGroup(idx)
|
|
104
|
-
}, {
|
|
105
|
-
icon: () => createVNode(NIcon, {
|
|
106
|
-
"component": RemoveCircle
|
|
107
|
-
}, null)
|
|
108
|
-
})]))]);
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
|
-
const COMBINATION = connect(script);
|
|
113
|
-
|
|
114
|
-
export { COMBINATION };
|
|
1
|
+
import{defineComponent as e,ref as o,computed as t,watch as r,inject as i,createVNode as n}from"vue";import{isObjectField as a}from"@formily/core";import{RecursionField as m,connect as s}from"@formily/vue";import{AddCircleOutline as l,RemoveCircle as u}from"@vicons/ionicons5";import{isNumber as p,isArray as c,range as d}from"lodash-es";import{NButton as f,NIcon as v}from"naive-ui";import"../../../index.js";import{InjectionBusinessCollector as y}from"../../constants/index.js";import"../../utils/index.js";import{useFormField as x}from"../../hooks/useFormField.js";import{useFieldListAdaptor as h}from"../../hooks/useFieldListAdaptor.js";import{createObjSchema as b}from"../../utils/schema.js";const _=s(e({name:"FormCombination",props:{title:{type:String,default:""},value:{type:Array},maxGroupNum:{type:Number},disabled:{type:Boolean},getProperties:{type:Function,default:()=>[]},onInput:{},onBlur:{},onChange:{}},emits:["update:value"],setup(e){const{field:s,fieldKey:_}=x(),j=o(1),C=t((()=>p(e.maxGroupNum)?e.maxGroupNum<1?0:~~e.maxGroupNum:1/0));function g(){j.value++}r((()=>e.value),(e=>{c(e)&&(j.value=Math.min(Math.max(e.length,1),C.value))}),{immediate:!0});const k=i(y),{schemaAdaptor:F}=h(k);return()=>n("section",{class:"form-render__combination"},[n("header",{class:"form-render__combinationHeader"},[n("div",{class:"form-render__combinationHeaderText"},[e.title]),n(f,{onClick:g,type:"info",text:!0,disabled:j.value>=C.value||e.disabled},{icon:()=>n(v,{component:l},null),default:()=>"新增"})]),d(j.value).map(((o,t)=>n("section",{class:"form-render__combinationContent"},[n(m,{schema:b(F(e.getProperties())),name:t},null),n(f,{text:!0,type:"error",class:"form-render__combinationClose",onClick:()=>async function(e){if(j.value>1)j.value--,await s.value.remove(e);else{const o=s.value.query(`${_.value}.${e}`).take();if(!o||!a(o))return;await o.reset()}}(t)},{icon:()=>n(v,{component:u},null)})])))])}}));export{_ as COMBINATION};
|
|
@@ -1,37 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { connect, mapProps } from '@formily/vue';
|
|
3
|
-
import '../../utils/index.js';
|
|
4
|
-
import { assignUpdateValue } from '../../utils/schema.js';
|
|
5
|
-
|
|
6
|
-
const script = defineComponent({
|
|
7
|
-
props: {
|
|
8
|
-
onChange: {},
|
|
9
|
-
span: {
|
|
10
|
-
type: Number,
|
|
11
|
-
default: 6
|
|
12
|
-
},
|
|
13
|
-
display: {
|
|
14
|
-
type: String,
|
|
15
|
-
default: "grid"
|
|
16
|
-
},
|
|
17
|
-
wrapperStyle: {
|
|
18
|
-
type: Object,
|
|
19
|
-
default: () => ({})
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
setup(props, {
|
|
23
|
-
slots
|
|
24
|
-
}) {
|
|
25
|
-
return () => {
|
|
26
|
-
return createVNode("section", {
|
|
27
|
-
"class": "form-render__complex"
|
|
28
|
-
}, [createVNode("section", {
|
|
29
|
-
"class": `form-render__complexContent--${props.display}`,
|
|
30
|
-
"style": props.wrapperStyle
|
|
31
|
-
}, [slots.default && slots.default()])]);
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
const COMPLEX = connect(script, mapProps(assignUpdateValue));
|
|
36
|
-
|
|
37
|
-
export { COMPLEX };
|
|
1
|
+
import{defineComponent as e,createVNode as t}from"vue";import{connect as r,mapProps as o}from"@formily/vue";import"../../utils/index.js";import{assignUpdateValue as p}from"../../utils/schema.js";const s=r(e({props:{onChange:{},span:{type:Number,default:6},display:{type:String,default:"grid"},wrapperStyle:{type:Object,default:()=>({})}},setup:(e,{slots:r})=>()=>t("section",{class:"form-render__complex"},[t("section",{class:`form-render__complexContent--${e.display}`,style:e.wrapperStyle},[r.default&&r.default()])])}),o(p));export{s as COMPLEX};
|
|
@@ -1,171 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { generateTimeFormat } from '../../../../../shared/utils/index.js';
|
|
3
|
-
import { connect, mapProps } from '@formily/vue';
|
|
4
|
-
import { isObject } from '@vueuse/core';
|
|
5
|
-
import { format } from 'date-fns';
|
|
6
|
-
import { NDatePicker } from 'naive-ui';
|
|
7
|
-
import { useCommonInjection } from '../../hooks/useCommonInjection.js';
|
|
8
|
-
import '../../utils/index.js';
|
|
9
|
-
import { assignUpdateValue, assignClearBindVisited } from '../../utils/schema.js';
|
|
10
|
-
import { businessDateParser } from '../../utils/business.js';
|
|
11
|
-
|
|
12
|
-
const script = defineComponent({
|
|
13
|
-
props: {
|
|
14
|
-
onChange: {},
|
|
15
|
-
value: {
|
|
16
|
-
type: String
|
|
17
|
-
},
|
|
18
|
-
validate: {
|
|
19
|
-
type: Object
|
|
20
|
-
},
|
|
21
|
-
valueFormat: {
|
|
22
|
-
type: String,
|
|
23
|
-
default: "yyyy-MM-dd"
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
emits: ["update:value"],
|
|
27
|
-
setup(props, {
|
|
28
|
-
emit
|
|
29
|
-
}) {
|
|
30
|
-
const {
|
|
31
|
-
injectValueValidate,
|
|
32
|
-
injectValueBindKey
|
|
33
|
-
} = useCommonInjection();
|
|
34
|
-
injectValueValidate(() => props.value);
|
|
35
|
-
function minCurrentDate() {
|
|
36
|
-
var _a;
|
|
37
|
-
return ((_a = props.validate) == null ? void 0 : _a.min_date) === "currTime";
|
|
38
|
-
}
|
|
39
|
-
function maxCurrentDate() {
|
|
40
|
-
var _a;
|
|
41
|
-
return ((_a = props.validate) == null ? void 0 : _a.max_date) === "currTime";
|
|
42
|
-
}
|
|
43
|
-
function isDateDisabled(time) {
|
|
44
|
-
return minCurrentDate() && time < yesterday() || maxCurrentDate() && time > Date.now();
|
|
45
|
-
function yesterday() {
|
|
46
|
-
return Date.now() - 24 * 60 * 60 * 1e3;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
function isTimeDisabled(time) {
|
|
50
|
-
const checkDate = new Date(time);
|
|
51
|
-
const currentDate = new Date();
|
|
52
|
-
const checkDateDuplicate = new Date(checkDate);
|
|
53
|
-
checkDateDuplicate.setHours(0);
|
|
54
|
-
checkDateDuplicate.setMinutes(0);
|
|
55
|
-
checkDateDuplicate.setSeconds(0);
|
|
56
|
-
return {
|
|
57
|
-
isHourDisabled,
|
|
58
|
-
isMinuteDisabled
|
|
59
|
-
};
|
|
60
|
-
function checkHour() {
|
|
61
|
-
return checkDate.getHours();
|
|
62
|
-
}
|
|
63
|
-
function currentHour() {
|
|
64
|
-
return currentDate.getHours();
|
|
65
|
-
}
|
|
66
|
-
function currentMinute() {
|
|
67
|
-
return currentDate.getMinutes();
|
|
68
|
-
}
|
|
69
|
-
function isOverDate() {
|
|
70
|
-
return checkDateDuplicate > currentDate;
|
|
71
|
-
}
|
|
72
|
-
function isHourDisabled(hour) {
|
|
73
|
-
if (isOverDate())
|
|
74
|
-
return false;
|
|
75
|
-
return minCurrentDate() && hour < currentHour() || maxCurrentDate() && hour > currentHour();
|
|
76
|
-
}
|
|
77
|
-
function isMinuteDisabled(minute) {
|
|
78
|
-
if (isOverDate())
|
|
79
|
-
return false;
|
|
80
|
-
if (checkHour() === currentHour()) {
|
|
81
|
-
return minCurrentDate() && minute < currentMinute() || maxCurrentDate() && minute > currentMinute();
|
|
82
|
-
}
|
|
83
|
-
return minCurrentDate() && checkHour() < currentHour() || maxCurrentDate() && checkHour() > currentHour();
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
const validateConfig = computed(() => {
|
|
87
|
-
const result = {};
|
|
88
|
-
if (isObject(props.validate)) {
|
|
89
|
-
const {
|
|
90
|
-
min_date,
|
|
91
|
-
max_date
|
|
92
|
-
} = props.validate;
|
|
93
|
-
if (min_date || max_date) {
|
|
94
|
-
result.isDateDisabled = isDateDisabled;
|
|
95
|
-
result.isTimeDisabled = isTimeDisabled;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
return result;
|
|
99
|
-
});
|
|
100
|
-
const formatConfig = computed(() => {
|
|
101
|
-
return {
|
|
102
|
-
valueFormat: props.valueFormat,
|
|
103
|
-
format: props.valueFormat,
|
|
104
|
-
timePickerProps: {
|
|
105
|
-
format: generateTimeFormat(props.valueFormat)
|
|
106
|
-
}
|
|
107
|
-
};
|
|
108
|
-
});
|
|
109
|
-
function formatDate(value) {
|
|
110
|
-
if (!value)
|
|
111
|
-
return value;
|
|
112
|
-
return format(new Date(value), props.valueFormat);
|
|
113
|
-
}
|
|
114
|
-
let prevInputContent = "";
|
|
115
|
-
function onKeydown(evt) {
|
|
116
|
-
if (evt.key !== "Enter") {
|
|
117
|
-
prevInputContent = evt.target.value + evt.key;
|
|
118
|
-
return;
|
|
119
|
-
}
|
|
120
|
-
const result = businessDateParser(prevInputContent);
|
|
121
|
-
if (!result)
|
|
122
|
-
return;
|
|
123
|
-
const {
|
|
124
|
-
isTimeDisabled: isTimeDisabled2,
|
|
125
|
-
isDateDisabled: isDateDisabled2
|
|
126
|
-
} = validateConfig.value;
|
|
127
|
-
if (!isValidDate(result))
|
|
128
|
-
return;
|
|
129
|
-
valueRef.value = format(result, props.valueFormat);
|
|
130
|
-
function isValidDate(date) {
|
|
131
|
-
const dateDisabled = !isDateDisabled2 || isDateDisabled2(date.getTime());
|
|
132
|
-
if (dateDisabled)
|
|
133
|
-
return;
|
|
134
|
-
const {
|
|
135
|
-
isHourDisabled,
|
|
136
|
-
isMinuteDisabled
|
|
137
|
-
} = isTimeDisabled2 ? isTimeDisabled2(date.getTime()) : {};
|
|
138
|
-
const hourDisabled = !isHourDisabled || isHourDisabled(date.getHours());
|
|
139
|
-
if (hourDisabled)
|
|
140
|
-
return;
|
|
141
|
-
const minuteDisabled = !isMinuteDisabled || isMinuteDisabled(date.getMinutes());
|
|
142
|
-
if (minuteDisabled)
|
|
143
|
-
return;
|
|
144
|
-
return true;
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
watch(() => props.value, (value) => {
|
|
148
|
-
if (!value || formatDate(value) === value)
|
|
149
|
-
return;
|
|
150
|
-
emit("update:value", formatDate(value));
|
|
151
|
-
});
|
|
152
|
-
const valueRef = computed({
|
|
153
|
-
get: () => formatDate(props.value),
|
|
154
|
-
set: (value) => {
|
|
155
|
-
emit("update:value", value);
|
|
156
|
-
prevInputContent = "";
|
|
157
|
-
}
|
|
158
|
-
});
|
|
159
|
-
const key = injectValueBindKey(valueRef);
|
|
160
|
-
return () => createVNode(NDatePicker, mergeProps({
|
|
161
|
-
"key": key.value
|
|
162
|
-
}, validateConfig.value, formatConfig.value, {
|
|
163
|
-
"formatted-value": valueRef.value,
|
|
164
|
-
"onUpdate:formatted-value": ($event) => valueRef.value = $event,
|
|
165
|
-
"onKeydown": onKeydown
|
|
166
|
-
}), null);
|
|
167
|
-
}
|
|
168
|
-
});
|
|
169
|
-
const DATE = connect(script, mapProps(assignUpdateValue, assignClearBindVisited));
|
|
170
|
-
|
|
171
|
-
export { DATE };
|
|
1
|
+
import{defineComponent as e,computed as t,watch as r,createVNode as n,mergeProps as u}from"vue";import{generateTimeFormat as i}from"../../../../../shared/utils/index.js";import{connect as a,mapProps as o}from"@formily/vue";import{isObject as s}from"@vueuse/core";import{format as l}from"date-fns";import{NDatePicker as m}from"naive-ui";import{useCommonInjection as v}from"../../hooks/useCommonInjection.js";import"../../utils/index.js";import{assignUpdateValue as d,assignClearBindVisited as f}from"../../utils/schema.js";import{businessDateParser as c}from"../../utils/business.js";const p=a(e({props:{onChange:{},value:{type:String},validate:{type:Object},valueFormat:{type:String,default:"yyyy-MM-dd"}},emits:["update:value"],setup(e,{emit:a}){const{injectValueValidate:o,injectValueBindKey:d}=v();function f(){var t;return"currTime"===(null==(t=e.validate)?void 0:t.min_date)}function p(){var t;return"currTime"===(null==(t=e.validate)?void 0:t.max_date)}function D(e){return f()&&e<Date.now()-864e5||p()&&e>Date.now()}function y(e){const t=new Date(e),r=new Date,n=new Date(t);return n.setHours(0),n.setMinutes(0),n.setSeconds(0),{isHourDisabled:function(e){return!o()&&(f()&&e<i()||p()&&e>i())},isMinuteDisabled:function(e){if(o())return!1;if(u()===i())return f()&&e<a()||p()&&e>a();return f()&&u()<i()||p()&&u()>i()}};function u(){return t.getHours()}function i(){return r.getHours()}function a(){return r.getMinutes()}function o(){return n>r}}o((()=>e.value));const g=t((()=>{const t={};if(s(e.validate)){const{min_date:r,max_date:n}=e.validate;(r||n)&&(t.isDateDisabled=D,t.isTimeDisabled=y)}return t})),b=t((()=>({valueFormat:e.valueFormat,format:e.valueFormat,timePickerProps:{format:i(e.valueFormat)}})));function j(t){return t?l(new Date(t),e.valueFormat):t}let w="";function F(t){if("Enter"!==t.key)return void(w=t.target.value+t.key);const r=c(w);if(!r)return;const{isTimeDisabled:n,isDateDisabled:u}=g.value;(function(e){if(!u||u(e.getTime()))return;const{isHourDisabled:t,isMinuteDisabled:r}=n?n(e.getTime()):{};if(!t||t(e.getHours()))return;if(!r||r(e.getMinutes()))return;return!0})(r)&&(M.value=l(r,e.valueFormat))}r((()=>e.value),(e=>{e&&j(e)!==e&&a("update:value",j(e))}));const M=t({get:()=>j(e.value),set:e=>{a("update:value",e),w=""}}),H=d(M);return()=>n(m,u({key:H.value},g.value,b.value,{"formatted-value":M.value,"onUpdate:formatted-value":e=>M.value=e,onKeydown:F}),null)}}),o(d,f));export{p as DATE};
|
|
@@ -1,128 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { arrayed, widthAppend } from '../../../../../shared/utils/index.js';
|
|
3
|
-
import { isVoidField } from '@formily/core';
|
|
4
|
-
import { connect, mapProps } from '@formily/vue';
|
|
5
|
-
import { isString, isArray } from 'lodash-es';
|
|
6
|
-
import { NFormItem } from 'naive-ui';
|
|
7
|
-
import Annotation from '../../../../annotation-edit/index.js';
|
|
8
|
-
import '../../../index.js';
|
|
9
|
-
import TooltipMessage from '../tooltipMessage.vue.js';
|
|
10
|
-
import { InjectionAnnotation, InjectionFormUUID } from '../../constants/index.js';
|
|
11
|
-
import { useComplexOptionsSpan } from '../../hooks/useComplexOptions.js';
|
|
12
|
-
import { dotEscape } from '../../utils/schema.js';
|
|
13
|
-
import { useFormField } from '../../hooks/useFormField.js';
|
|
14
|
-
import { validateMessageParser } from '../../utils/index.js';
|
|
15
|
-
|
|
16
|
-
const script = defineComponent({
|
|
17
|
-
props: {
|
|
18
|
-
label: String,
|
|
19
|
-
propertyKey: String,
|
|
20
|
-
remark: String,
|
|
21
|
-
span: {
|
|
22
|
-
type: Number,
|
|
23
|
-
default: 6
|
|
24
|
-
},
|
|
25
|
-
annotation: {},
|
|
26
|
-
fieldItem: {}
|
|
27
|
-
},
|
|
28
|
-
setup(props, {
|
|
29
|
-
slots
|
|
30
|
-
}) {
|
|
31
|
-
const annotation = inject(InjectionAnnotation);
|
|
32
|
-
const annotationContent = computed({
|
|
33
|
-
get() {
|
|
34
|
-
var _a, _b;
|
|
35
|
-
return (_b = (_a = annotation.value) == null ? void 0 : _a[props.propertyKey]) != null ? _b : "";
|
|
36
|
-
},
|
|
37
|
-
set(value) {
|
|
38
|
-
annotation.value = {
|
|
39
|
-
property: props.propertyKey,
|
|
40
|
-
value
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
function renderAnnotation() {
|
|
45
|
-
return createVNode(Annotation, {
|
|
46
|
-
"class": "form-render__formItemLabel--annotation",
|
|
47
|
-
"modelValue": annotationContent.value,
|
|
48
|
-
"onUpdate:modelValue": ($event) => annotationContent.value = $event
|
|
49
|
-
}, null);
|
|
50
|
-
}
|
|
51
|
-
const showAnnotation = computed(() => {
|
|
52
|
-
return annotation.value && props.annotation !== false;
|
|
53
|
-
});
|
|
54
|
-
const needRenderLabel = computed(() => props.label && props.label !== " ");
|
|
55
|
-
const {
|
|
56
|
-
field,
|
|
57
|
-
fieldKey
|
|
58
|
-
} = useFormField();
|
|
59
|
-
const uuid = inject(InjectionFormUUID);
|
|
60
|
-
const id = computed(() => {
|
|
61
|
-
return dotEscape(`${uuid}-${fieldKey.value}`);
|
|
62
|
-
});
|
|
63
|
-
const marginRight = computed(() => {
|
|
64
|
-
let result = 0;
|
|
65
|
-
showAnnotation.value && (result += 18);
|
|
66
|
-
props.remark && (result += 18);
|
|
67
|
-
return result;
|
|
68
|
-
});
|
|
69
|
-
function renderLabel() {
|
|
70
|
-
return needRenderLabel.value ? createVNode("section", {
|
|
71
|
-
"class": "form-render__formItemLabel"
|
|
72
|
-
}, [createVNode("span", {
|
|
73
|
-
"class": "form-render__formItemLabel--text",
|
|
74
|
-
"style": {
|
|
75
|
-
marginRight: widthAppend(marginRight.value)
|
|
76
|
-
}
|
|
77
|
-
}, [props.label]), marginRight.value ? createVNode("section", {
|
|
78
|
-
"class": "form-render__formItemLabel--operation"
|
|
79
|
-
}, [props.remark ? createVNode("div", {
|
|
80
|
-
"class": "form-render__formItemLabel--tooltip"
|
|
81
|
-
}, [createVNode(TooltipMessage, {
|
|
82
|
-
"message": props.remark
|
|
83
|
-
}, null)]) : null, showAnnotation.value ? renderAnnotation() : null]) : null]) : null;
|
|
84
|
-
}
|
|
85
|
-
const {
|
|
86
|
-
getSpan
|
|
87
|
-
} = useComplexOptionsSpan();
|
|
88
|
-
return () => createVNode(NFormItem, mergeProps({
|
|
89
|
-
"class": "form-render__formItem",
|
|
90
|
-
"style": {
|
|
91
|
-
"--form-item-column": getSpan(uuid, field.value.address) + props.span
|
|
92
|
-
}
|
|
93
|
-
}, {
|
|
94
|
-
id: id.value,
|
|
95
|
-
"widget-type": field.value.componentType,
|
|
96
|
-
"form-field": fieldKey.value
|
|
97
|
-
}), {
|
|
98
|
-
...slots,
|
|
99
|
-
label: renderLabel
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
|
-
const FORM_ITEM = connect(script, mapProps({
|
|
104
|
-
title: "label"
|
|
105
|
-
}, (props, field) => {
|
|
106
|
-
const feedback = !isVoidField(field) ? arrayed(field.selfErrors).length ? parseFeedback(arrayed(field.selfErrors), props.fieldItem) : void 0 : void 0;
|
|
107
|
-
const required = isVoidField(field) ? isSuffixRequired(props.fieldItem) : field.required;
|
|
108
|
-
return {
|
|
109
|
-
...props,
|
|
110
|
-
fieldItem: void 0,
|
|
111
|
-
required,
|
|
112
|
-
feedback,
|
|
113
|
-
"validation-status": feedback ? "error" : void 0
|
|
114
|
-
};
|
|
115
|
-
}));
|
|
116
|
-
function parseFeedback(selfErrors, fieldItem) {
|
|
117
|
-
if (!isString(fieldItem.defined_error_msg) || !fieldItem.defined_error_msg) {
|
|
118
|
-
return selfErrors.map((message) => validateMessageParser(message, fieldItem)).join(",");
|
|
119
|
-
}
|
|
120
|
-
return validateMessageParser(fieldItem.defined_error_msg, fieldItem);
|
|
121
|
-
}
|
|
122
|
-
function isSuffixRequired(field) {
|
|
123
|
-
if (!field || !isArray(field.suffixConfig) || !field.suffixConfig.length)
|
|
124
|
-
return false;
|
|
125
|
-
return `${field.is_null}` === "0";
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
export { FORM_ITEM };
|
|
1
|
+
import{defineComponent as e,inject as r,computed as o,createVNode as t,mergeProps as l}from"vue";import{arrayed as n,widthAppend as i}from"../../../../../shared/utils/index.js";import{isVoidField as m}from"@formily/core";import{connect as s,mapProps as a}from"@formily/vue";import{isString as u,isArray as f}from"lodash-es";import{NFormItem as d}from"naive-ui";import p from"../../../../annotation-edit/index.js";import"../../../index.js";import v from"../tooltipMessage.vue.js";import{InjectionAnnotation as c,InjectionFormUUID as _}from"../../constants/index.js";import{useComplexOptionsSpan as g}from"../../hooks/useComplexOptions.js";import{dotEscape as y}from"../../utils/schema.js";import{useFormField as b}from"../../hooks/useFormField.js";import{validateMessageParser as j}from"../../utils/index.js";const x=s(e({props:{label:String,propertyKey:String,remark:String,span:{type:Number,default:6},annotation:{},fieldItem:{}},setup(e,{slots:n}){const m=r(c),s=o({get(){var r,o;return null!=(o=null==(r=m.value)?void 0:r[e.propertyKey])?o:""},set(r){m.value={property:e.propertyKey,value:r}}});const a=o((()=>m.value&&!1!==e.annotation)),u=o((()=>e.label&&" "!==e.label)),{field:f,fieldKey:j}=b(),x=r(_),I=o((()=>y(`${x}-${j.value}`))),h=o((()=>{let r=0;return a.value&&(r+=18),e.remark&&(r+=18),r}));function k(){return u.value?t("section",{class:"form-render__formItemLabel"},[t("span",{class:"form-render__formItemLabel--text",style:{marginRight:i(h.value)}},[e.label]),h.value?t("section",{class:"form-render__formItemLabel--operation"},[e.remark?t("div",{class:"form-render__formItemLabel--tooltip"},[t(v,{message:e.remark},null)]):null,a.value?t(p,{class:"form-render__formItemLabel--annotation",modelValue:s.value,"onUpdate:modelValue":e=>s.value=e},null):null]):null]):null}const{getSpan:L}=g();return()=>t(d,l({class:"form-render__formItem",style:{"--form-item-column":L(x,f.value.address)+e.span}},{id:I.value,"widget-type":f.value.componentType,"form-field":j.value}),{...n,label:k})}}),a({title:"label"},((e,r)=>{const o=m(r)?void 0:n(r.selfErrors).length?function(e,r){if(!u(r.defined_error_msg)||!r.defined_error_msg)return e.map((e=>j(e,r))).join(",");return j(r.defined_error_msg,r)}(n(r.selfErrors),e.fieldItem):void 0,t=m(r)?function(e){return!!(e&&f(e.suffixConfig)&&e.suffixConfig.length)&&"0"==`${e.is_null}`}(e.fieldItem):r.required;return{...e,fieldItem:void 0,required:t,feedback:o,"validation-status":o?"error":void 0}})));export{x as FORM_ITEM};
|
|
@@ -1,43 +1 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as complex from './complex.js';
|
|
3
|
-
import * as date from './date.js';
|
|
4
|
-
import * as formItem from './formItem.js';
|
|
5
|
-
import * as input from './input.js';
|
|
6
|
-
import * as inputGroup from './inputGroup.js';
|
|
7
|
-
import * as inputNumber from './inputNumber.js';
|
|
8
|
-
import * as index from './jsonCombination/index.js';
|
|
9
|
-
import * as levelSearchCascader from './levelSearchCascader.js';
|
|
10
|
-
import * as index$1 from './lineBar/index.js';
|
|
11
|
-
import * as radio_checkbox from './radio_checkbox.js';
|
|
12
|
-
import * as remoteSearch from './remoteSearch.js';
|
|
13
|
-
import * as searchCascade from './searchCascade.js';
|
|
14
|
-
import * as select from './select.js';
|
|
15
|
-
import * as simpleComponent from './simpleComponent.js';
|
|
16
|
-
import * as slider from './slider.js';
|
|
17
|
-
import * as _switch from './switch.js';
|
|
18
|
-
import * as textarea from './textarea.js';
|
|
19
|
-
import { separateMetaModule } from '../../../../../shared/utils/index.js';
|
|
20
|
-
|
|
21
|
-
const modules = Object.assign({
|
|
22
|
-
"./combination.tsx": combination,
|
|
23
|
-
"./complex.tsx": complex,
|
|
24
|
-
"./date.tsx": date,
|
|
25
|
-
"./formItem.tsx": formItem,
|
|
26
|
-
"./input.tsx": input,
|
|
27
|
-
"./inputGroup.ts": inputGroup,
|
|
28
|
-
"./inputNumber.tsx": inputNumber,
|
|
29
|
-
"./jsonCombination/index.tsx": index,
|
|
30
|
-
"./levelSearchCascader.tsx": levelSearchCascader,
|
|
31
|
-
"./lineBar/index.ts": index$1,
|
|
32
|
-
"./radio&checkbox.tsx": radio_checkbox,
|
|
33
|
-
"./remoteSearch.tsx": remoteSearch,
|
|
34
|
-
"./searchCascade.tsx": searchCascade,
|
|
35
|
-
"./select.tsx": select,
|
|
36
|
-
"./simpleComponent.tsx": simpleComponent,
|
|
37
|
-
"./slider.tsx": slider,
|
|
38
|
-
"./switch.tsx": _switch,
|
|
39
|
-
"./textarea.tsx": textarea
|
|
40
|
-
});
|
|
41
|
-
var components = separateMetaModule(modules);
|
|
42
|
-
|
|
43
|
-
export { components as default };
|
|
1
|
+
import*as s from"./combination.js";import*as t from"./complex.js";import*as o from"./date.js";import*as r from"./formItem.js";import*as m from"./input.js";import*as e from"./inputGroup.js";import*as a from"./inputNumber.js";import*as i from"./jsonCombination/index.js";import*as p from"./levelSearchCascader.js";import*as n from"./lineBar/index.js";import*as x from"./radio_checkbox.js";import*as c from"./remoteSearch.js";import*as f from"./searchCascade.js";import*as j from"./select.js";import*as d from"./simpleComponent.js";import*as l from"./slider.js";import*as u from"./switch.js";import*as h from"./textarea.js";import{separateMetaModule as b}from"../../../../../shared/utils/index.js";var C=b(Object.assign({"./combination.tsx":s,"./complex.tsx":t,"./date.tsx":o,"./formItem.tsx":r,"./input.tsx":m,"./inputGroup.ts":e,"./inputNumber.tsx":a,"./jsonCombination/index.tsx":i,"./levelSearchCascader.tsx":p,"./lineBar/index.ts":n,"./radio&checkbox.tsx":x,"./remoteSearch.tsx":c,"./searchCascade.tsx":f,"./select.tsx":j,"./simpleComponent.tsx":d,"./slider.tsx":l,"./switch.tsx":u,"./textarea.tsx":h}));export{C as default};
|
|
@@ -1,50 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useVModel } from '@vueuse/core';
|
|
3
|
-
import { useCommonInjection } from '../../hooks/useCommonInjection.js';
|
|
4
|
-
import { createInputSlot } from '../../utils/index.js';
|
|
5
|
-
import { connect, mapProps } from '@formily/vue';
|
|
6
|
-
import { NInput } from 'naive-ui';
|
|
7
|
-
import { assignUpdateValue, assignClearBindVisited } from '../../utils/schema.js';
|
|
8
|
-
|
|
9
|
-
const script = defineComponent({
|
|
10
|
-
name: "FormInput",
|
|
11
|
-
props: {
|
|
12
|
-
value: {
|
|
13
|
-
type: String
|
|
14
|
-
},
|
|
15
|
-
prefix: {
|
|
16
|
-
type: String
|
|
17
|
-
},
|
|
18
|
-
suffix: {
|
|
19
|
-
type: String
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
emits: ["update:value"],
|
|
23
|
-
setup(props, {
|
|
24
|
-
emit
|
|
25
|
-
}) {
|
|
26
|
-
const valueRef = useVModel(props, "value", emit);
|
|
27
|
-
const key = useCommonInjection().injectValueBindKey(valueRef);
|
|
28
|
-
const _slots = createInputSlot(props, (v) => {
|
|
29
|
-
return [createVNode("i", {
|
|
30
|
-
"style": {
|
|
31
|
-
color: "rgba(33,33,33,.4)"
|
|
32
|
-
}
|
|
33
|
-
}, [v])];
|
|
34
|
-
});
|
|
35
|
-
return () => {
|
|
36
|
-
return createVNode(NInput, {
|
|
37
|
-
"key": key.value,
|
|
38
|
-
"value": valueRef.value,
|
|
39
|
-
"onUpdate:value": ($event) => valueRef.value = $event
|
|
40
|
-
}, _slots.value);
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
const INPUT = connect(script, mapProps((props, field) => {
|
|
45
|
-
const _props = assignUpdateValue(props, field);
|
|
46
|
-
_props.allowInput = (value) => !value.startsWith(" ") && !value.endsWith(" ");
|
|
47
|
-
return _props;
|
|
48
|
-
}, assignClearBindVisited));
|
|
49
|
-
|
|
50
|
-
export { INPUT };
|
|
1
|
+
import{defineComponent as e,createVNode as t}from"vue";import{useVModel as o}from"@vueuse/core";import{useCommonInjection as r}from"../../hooks/useCommonInjection.js";import{createInputSlot as i}from"../../utils/index.js";import{connect as u,mapProps as m}from"@formily/vue";import{NInput as n}from"naive-ui";import{assignUpdateValue as s,assignClearBindVisited as p}from"../../utils/schema.js";const a=u(e({name:"FormInput",props:{value:{type:String},prefix:{type:String},suffix:{type:String}},emits:["update:value"],setup(e,{emit:u}){const m=o(e,"value",u),s=r().injectValueBindKey(m),p=i(e,(e=>[t("i",{style:{color:"rgba(33,33,33,.4)"}},[e])]));return()=>t(n,{key:s.value,value:m.value,"onUpdate:value":e=>m.value=e},p.value)}}),m(((e,t)=>{const o=s(e,t);return o.allowInput=e=>!e.startsWith(" ")&&!e.endsWith(" "),o}),p));export{a as INPUT};
|
|
@@ -1,11 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { NInputGroup } from 'naive-ui';
|
|
3
|
-
|
|
4
|
-
const INPUT_GROUP = connect(
|
|
5
|
-
NInputGroup,
|
|
6
|
-
mapProps((props) => {
|
|
7
|
-
return { style: { "--column": props.span }, class: "form-render__inputGroup" };
|
|
8
|
-
})
|
|
9
|
-
);
|
|
10
|
-
|
|
11
|
-
export { INPUT_GROUP };
|
|
1
|
+
import{connect as o,mapProps as r}from"@formily/vue";import{NInputGroup as m}from"naive-ui";const e=o(m,r((o=>({style:{"--column":o.span},class:"form-render__inputGroup"}))));export{e as INPUT_GROUP};
|
|
@@ -1,55 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { isString, isNumber } from 'lodash-es';
|
|
3
|
-
import { useCommonInjection } from '../../hooks/useCommonInjection.js';
|
|
4
|
-
import { createInputSlot, parseNumberFromMaybeString } from '../../utils/index.js';
|
|
5
|
-
import { connect, mapProps } from '@formily/vue';
|
|
6
|
-
import { NInputNumber } from 'naive-ui';
|
|
7
|
-
import { assignUpdateValue, assignClearBindVisited } from '../../utils/schema.js';
|
|
8
|
-
|
|
9
|
-
const script = defineComponent({
|
|
10
|
-
props: {
|
|
11
|
-
value: {
|
|
12
|
-
type: [Number, String]
|
|
13
|
-
},
|
|
14
|
-
onChange: {
|
|
15
|
-
type: Function,
|
|
16
|
-
required: true
|
|
17
|
-
},
|
|
18
|
-
prefix: {
|
|
19
|
-
type: String
|
|
20
|
-
},
|
|
21
|
-
suffix: {
|
|
22
|
-
type: String
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
setup(props) {
|
|
26
|
-
const _slots = createInputSlot(props);
|
|
27
|
-
useCommonInjection().injectValueValidate(() => props.value);
|
|
28
|
-
watch(() => props.value, (value) => {
|
|
29
|
-
if (value == null)
|
|
30
|
-
return;
|
|
31
|
-
if (!isString(value) && !isNumber(value) || Number.isNaN(+value))
|
|
32
|
-
return props.onChange(null);
|
|
33
|
-
props.onChange(+value);
|
|
34
|
-
});
|
|
35
|
-
const valueRef = computed({
|
|
36
|
-
get: () => parseNumberFromMaybeString(props.value),
|
|
37
|
-
set: (v) => {
|
|
38
|
-
var _a;
|
|
39
|
-
return (_a = props.onChange) == null ? void 0 : _a.call(props, v);
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
const key = useCommonInjection().injectValueBindKey(valueRef);
|
|
43
|
-
return () => {
|
|
44
|
-
return createVNode(NInputNumber, {
|
|
45
|
-
"key": key.value,
|
|
46
|
-
"value": valueRef.value,
|
|
47
|
-
"onUpdate:value": ($event) => valueRef.value = $event,
|
|
48
|
-
"show-button": false
|
|
49
|
-
}, _slots.value);
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
const INPUT_NUMBER = connect(script, mapProps(assignUpdateValue, assignClearBindVisited));
|
|
54
|
-
|
|
55
|
-
export { INPUT_NUMBER };
|
|
1
|
+
import{defineComponent as e,watch as o,computed as t,createVNode as n}from"vue";import{isString as r,isNumber as u}from"lodash-es";import{useCommonInjection as i}from"../../hooks/useCommonInjection.js";import{createInputSlot as a,parseNumberFromMaybeString as l}from"../../utils/index.js";import{connect as m,mapProps as s}from"@formily/vue";import{NInputNumber as p}from"naive-ui";import{assignUpdateValue as v,assignClearBindVisited as f}from"../../utils/schema.js";const c=m(e({props:{value:{type:[Number,String]},onChange:{type:Function,required:!0},prefix:{type:String},suffix:{type:String}},setup(e){const m=a(e);i().injectValueValidate((()=>e.value)),o((()=>e.value),(o=>{if(null!=o)return!r(o)&&!u(o)||Number.isNaN(+o)?e.onChange(null):void e.onChange(+o)}));const s=t({get:()=>l(e.value),set:o=>{var t;return null==(t=e.onChange)?void 0:t.call(e,o)}}),v=i().injectValueBindKey(s);return()=>n(p,{key:v.value,value:s.value,"onUpdate:value":e=>s.value=e,"show-button":!1},m.value)}}),s(v,f));export{c as INPUT_NUMBER};
|