cnhis-design-vue 3.1.40-beta.12 → 3.1.40-beta.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/_virtual/plugin-vue_export-helper.js +1 -9
- package/es/components/annotation-edit/index.js +1 -10
- package/es/components/annotation-edit/src/AnnotationEdit.js +1 -164
- package/es/components/big-table/index.js +1 -15
- package/es/components/big-table/src/BigTable.vue.js +1 -6
- package/es/components/big-table/src/BigTable.vue2.js +1 -2498
- package/es/components/big-table/src/bigTableEmits.js +1 -53
- package/es/components/big-table/src/bigTableProps.js +1 -120
- package/es/components/big-table/src/bigTableState.js +1 -62
- package/es/components/big-table/src/components/NoData.vue.js +1 -74
- package/es/components/big-table/src/components/edit-form/edit-date.js +1 -214
- package/es/components/big-table/src/components/edit-form/edit-input.js +1 -95
- package/es/components/big-table/src/components/edit-form/edit-select.js +1 -139
- package/es/components/big-table/src/components/edit-form/edit-separate.vue.js +1 -103
- package/es/components/big-table/src/components/edit-form/edit-time.js +1 -122
- package/es/components/big-table/src/components/edit-form/useCommon.js +1 -23
- package/es/components/big-table/src/components/input-button.vue.js +1 -39
- package/es/components/big-table/src/components/separate.vue.js +1 -30
- package/es/components/big-table/src/constants/index.js +1 -3
- package/es/components/big-table/src/hooks/index.js +1 -9
- package/es/components/big-table/src/hooks/useAnchor.js +1 -49
- package/es/components/big-table/src/hooks/useAnnotation.js +1 -21
- package/es/components/big-table/src/hooks/useBatchEditing.js +1 -301
- package/es/components/big-table/src/hooks/useEdit.js +1 -133
- package/es/components/big-table/src/hooks/useEvent.js +1 -95
- package/es/components/big-table/src/hooks/useFormat.js +1 -507
- package/es/components/big-table/src/hooks/useNestTable.js +1 -86
- package/es/components/big-table/src/hooks/useSeparateRow.js +1 -177
- package/es/components/big-table/src/hooks/useTableParse.js +1 -142
- package/es/components/big-table/src/utils.js +1 -618
- package/es/components/bpmn-workflow/index.js +1 -10
- package/es/components/bpmn-workflow/src/BpmnWorkflow.vue.js +1 -258
- package/es/components/bpmn-workflow/src/custom/customModeler/customBpmn/BpmnRenderer.js +1 -1452
- package/es/components/bpmn-workflow/src/custom/customModeler/customBpmn/CustomPathMap.js +1 -99
- package/es/components/bpmn-workflow/src/custom/customModeler/customBpmn/CustomRenderer.js +1 -114
- package/es/components/bpmn-workflow/src/custom/customModeler/customBpmn/CustomRules.js +1 -40
- package/es/components/bpmn-workflow/src/custom/customOtherModule/customViewerRenderer.js +1 -14
- package/es/components/bpmn-workflow/src/custom/customOtherModule/zoomScroll.js +1 -10
- package/es/components/button-print/index.js +1 -12
- package/es/components/button-print/src/ButtonPrint.vue.js +1 -6
- package/es/components/button-print/src/ButtonPrint.vue2.js +1 -528
- package/es/components/button-print/src/components/EditFormat.vue.js +1 -173
- package/es/components/button-print/src/components/IdentityVerification.vue.js +1 -182
- package/es/components/button-print/src/components/Preview.vue.js +1 -6
- package/es/components/button-print/src/components/Preview.vue2.js +1 -67
- package/es/components/button-print/src/utils/browserPrint.d.ts +2 -1
- package/es/components/button-print/src/utils/browserPrint.js +1 -43
- package/es/components/button-print/src/utils/dialog.js +1 -121
- package/es/components/button-print/src/utils/index.js +1 -2
- package/es/components/button-print/src/utils/print.d.ts +5 -1
- package/es/components/button-print/src/utils/print.js +1 -432
- package/es/components/editor/index.js +1 -10
- package/es/components/editor/src/Editor.js +1 -77
- package/es/components/fabric-chart/index.js +1 -10
- package/es/components/fabric-chart/src/FabricChart.vue.js +1 -71
- package/es/components/fabric-chart/src/components/PopupMenu.js +1 -118
- package/es/components/fabric-chart/src/components/PopupTip.vue.js +1 -34
- package/es/components/fabric-chart/src/components/useStyle.js +1 -36
- package/es/components/fabric-chart/src/hooks/constant.js +1 -78
- package/es/components/fabric-chart/src/hooks/index.js +1 -11
- package/es/components/fabric-chart/src/hooks/useBirthProcess.js +1 -642
- package/es/components/fabric-chart/src/hooks/useBirthProcessChart.js +1 -153
- package/es/components/fabric-chart/src/hooks/useBottom.js +1 -91
- package/es/components/fabric-chart/src/hooks/useCenter.js +1 -734
- package/es/components/fabric-chart/src/hooks/useCommon.js +1 -32
- package/es/components/fabric-chart/src/hooks/useCumputedPoint.js +1 -79
- package/es/components/fabric-chart/src/hooks/useDraw.js +1 -182
- package/es/components/fabric-chart/src/hooks/useEvent.js +1 -146
- package/es/components/fabric-chart/src/hooks/useGrid.js +1 -54
- package/es/components/fabric-chart/src/hooks/useLeft.js +1 -331
- package/es/components/fabric-chart/src/hooks/useOther.js +1 -95
- package/es/components/fabric-chart/src/hooks/useRight.js +1 -22
- package/es/components/fabric-chart/src/hooks/useShadow.js +1 -132
- package/es/components/fabric-chart/src/hooks/useTemperatureChart.js +1 -341
- package/es/components/fabric-chart/src/hooks/useTop.js +1 -154
- package/es/components/fabric-chart/src/utils/index.js +1 -15624
- package/es/components/fabric-chart/src/utils/utils.js +1 -32
- package/es/components/field-set/index.js +1 -10
- package/es/components/field-set/src/FieldSet.vue.js +1 -470
- package/es/components/form-config/index.js +1 -10
- package/es/components/form-config/src/FormConfig.vue.js +1 -124
- package/es/components/form-config/src/components/FormConfigCreator.vue.js +1 -100
- package/es/components/form-config/src/components/FormConfigDragDisplay.vue.js +1 -45
- package/es/components/form-config/src/components/FormConfigEdit.vue.js +1 -97
- package/es/components/form-config/src/components/FormConfigMaterialItem.js +1 -28
- package/es/components/form-config/src/components/index.js +1 -6
- package/es/components/form-config/src/components/renderer/CloseButton.vue.js +1 -45
- package/es/components/form-config/src/components/renderer/ComplexNode.vue.js +1 -45
- package/es/components/form-config/src/components/renderer/DefaultNode.vue.js +1 -60
- package/es/components/form-config/src/components/renderer/index.js +1 -3
- package/es/components/form-config/src/constants/index.js +1 -61
- package/es/components/form-config/src/hooks/index.js +1 -3
- package/es/components/form-config/src/hooks/useConfigurationField.js +1 -90
- package/es/components/form-config/src/hooks/useDataNormalize.js +1 -35
- package/es/components/form-config/src/hooks/usePresetRenderer.js +1 -36
- package/es/components/form-config/src/hooks/useSortalbeConfig.js +1 -42
- package/es/components/form-config/src/utils/index.js +1 -26
- package/es/components/form-render/index.js +1 -30
- package/es/components/form-render/src/FormRender.vue.js +1 -239
- package/es/components/form-render/src/FormRenderWrapper.vue.js +1 -49
- package/es/components/form-render/src/components/renderer/combination.js +1 -114
- package/es/components/form-render/src/components/renderer/complex.js +1 -37
- package/es/components/form-render/src/components/renderer/date.js +1 -171
- package/es/components/form-render/src/components/renderer/formItem.js +1 -128
- package/es/components/form-render/src/components/renderer/index.js +1 -43
- package/es/components/form-render/src/components/renderer/input.js +1 -50
- package/es/components/form-render/src/components/renderer/inputGroup.js +1 -11
- package/es/components/form-render/src/components/renderer/inputNumber.js +1 -55
- package/es/components/form-render/src/components/renderer/jsonCombination/hooks/useDeepValidate.js +1 -35
- package/es/components/form-render/src/components/renderer/jsonCombination/index.js +1 -175
- package/es/components/form-render/src/components/renderer/levelSearchCascader.js +1 -274
- package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.js +1 -71
- package/es/components/form-render/src/components/renderer/lineBar/index.js +1 -11
- package/es/components/form-render/src/components/renderer/radio_checkbox.js +1 -111
- package/es/components/form-render/src/components/renderer/remoteSearch.js +1 -139
- package/es/components/form-render/src/components/renderer/searchCascade.js +1 -244
- package/es/components/form-render/src/components/renderer/select.js +1 -176
- package/es/components/form-render/src/components/renderer/simpleComponent.js +1 -57
- package/es/components/form-render/src/components/renderer/slider.js +1 -38
- package/es/components/form-render/src/components/renderer/switch.js +1 -48
- package/es/components/form-render/src/components/renderer/textarea.js +1 -36
- package/es/components/form-render/src/components/tooltipMessage.vue.js +1 -37
- package/es/components/form-render/src/constants/index.js +1 -59
- package/es/components/form-render/src/hooks/index.js +1 -15
- package/es/components/form-render/src/hooks/useAnchor.js +1 -99
- package/es/components/form-render/src/hooks/useAsyncQueue.js +1 -153
- package/es/components/form-render/src/hooks/useAutoHidden.js +1 -43
- package/es/components/form-render/src/hooks/useBusinessBinding.js +1 -119
- package/es/components/form-render/src/hooks/useChangeContext.js +1 -20
- package/es/components/form-render/src/hooks/useCommonInjection.js +1 -43
- package/es/components/form-render/src/hooks/useCommonLog.js +1 -12
- package/es/components/form-render/src/hooks/useComplexOptions.js +1 -225
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -290
- package/es/components/form-render/src/hooks/useFieldNormalize.js +1 -65
- package/es/components/form-render/src/hooks/useFieldVisitor.js +1 -46
- package/es/components/form-render/src/hooks/useFormContext.js +1 -70
- package/es/components/form-render/src/hooks/useFormEvent.js +1 -140
- package/es/components/form-render/src/hooks/useFormField.js +1 -13
- package/es/components/form-render/src/hooks/useFormItemDeps.js +1 -31
- package/es/components/form-render/src/hooks/useFormRenderLifeCycle.js +1 -10
- package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -278
- package/es/components/form-render/src/hooks/useFormRequest.js +1 -42
- package/es/components/form-render/src/hooks/useFormValidator.js +1 -83
- package/es/components/form-render/src/hooks/useLowCodeReactions.js +1 -85
- package/es/components/form-render/src/hooks/useNuiThemeOverrides.js +1 -18
- package/es/components/form-render/src/hooks/usePresetScope.js +1 -22
- package/es/components/form-render/src/types/fieldItem.js +1 -1
- package/es/components/form-render/src/types/index.js +1 -1
- package/es/components/form-render/src/utils/business.js +1 -114
- package/es/components/form-render/src/utils/dom.js +1 -38
- package/es/components/form-render/src/utils/index.js +1 -241
- package/es/components/form-render/src/utils/schema.js +1 -105
- package/es/components/grid/index.js +1 -11
- package/es/components/grid/src/Grid.js +1 -28
- package/es/components/grid/src/hooks.js +1 -168
- package/es/components/iho-table/index.js +1 -36
- package/es/components/iho-table/src/IhoTable.vue.js +1 -157
- package/es/components/iho-table/src/constants/index.js +1 -157
- package/es/components/iho-table/src/hooks/export.js +1 -2
- package/es/components/iho-table/src/hooks/index.js +1 -2
- package/es/components/iho-table/src/hooks/tapHooks/index.js +1 -159
- package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks.js +1 -67
- package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.js +1 -26
- package/es/components/iho-table/src/hooks/tapHooks/useDomInsertHooks.js +1 -27
- package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.js +1 -280
- package/es/components/iho-table/src/hooks/tapHooks/useExposeHooks.js +1 -26
- package/es/components/iho-table/src/hooks/tapHooks/useFieldHooks.js +1 -38
- package/es/components/iho-table/src/hooks/tapHooks/useSetupHooks.js +1 -27
- package/es/components/iho-table/src/hooks/useColumnConfigAdaptor.js +1 -164
- package/es/components/iho-table/src/hooks/useTableContext.js +1 -17
- package/es/components/iho-table/src/hooks/useTablePlugin.js +1 -20
- package/es/components/iho-table/src/plugins/anchorPlugin/index.js +1 -19
- package/es/components/iho-table/src/plugins/anchorPlugin/tableAnchor.js +1 -51
- package/es/components/iho-table/src/plugins/anchorPlugin/useAnchor.js +1 -87
- package/es/components/iho-table/src/plugins/defaultConfigPlugin/index.js +1 -48
- package/es/components/iho-table/src/plugins/filterPlugin/filter.vue.js +1 -230
- package/es/components/iho-table/src/plugins/filterPlugin/index.js +1 -240
- package/es/components/iho-table/src/plugins/index.js +1 -47
- package/es/components/iho-table/src/plugins/keyboardEventPlugin/index.js +1 -30
- package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +1 -127
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.js +1 -203
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/index.js +1 -41
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useAutoFocus.js +1 -21
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/inputRendererPlugin.js +1 -41
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +1 -79
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -64
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -46
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js +1 -16
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue.js +1 -108
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +1 -163
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/separateUtils.js +1 -42
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin.js +1 -50
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/checkRendererPlugin.js +1 -30
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/colorRendererPlugin.js +1 -48
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/defaultRendererPlugin.js +1 -62
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/labelRendererPlugin.js +1 -52
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/pictureRendererPlugin.js +1 -92
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/seqRendererPlugin.js +1 -59
- package/es/components/iho-table/src/plugins/rowClickPlugin/index.js +1 -34
- package/es/components/iho-table/src/plugins/rowGroupSettingPlugin/index.js +1 -30
- package/es/components/iho-table/src/plugins/rowGroupSettingPlugin/rowGroupUtils.js +1 -53
- package/es/components/iho-table/src/plugins/virtualTreePlugin/index.js +1 -100
- package/es/components/iho-table/src/types/index.js +1 -1
- package/es/components/iho-table/src/types/pluginType.js +1 -16
- package/es/components/iho-table/src/utils/index.js +1 -169
- package/es/components/index.js +1 -119
- package/es/components/info-header/index.js +1 -10
- package/es/components/info-header/src/HiddenContent.vue.js +1 -70
- package/es/components/info-header/src/InfoEllipsis.vue.js +1 -43
- package/es/components/info-header/src/InfoHeader.vue.js +1 -313
- package/es/components/insurance-sdk/index.js +1 -1
- package/es/components/insurance-sdk/src/constants/index.js +1 -160
- package/es/components/insurance-sdk/src/utils/index.js +1 -1
- package/es/components/insurance-sdk/src/utils/insurance.js +1 -268
- package/es/components/keyboard/index.d.ts +1 -1
- package/es/components/keyboard/index.js +1 -10
- package/es/components/keyboard/src/Keyboard.vue.d.ts +1 -1
- package/es/components/keyboard/src/Keyboard.vue.js +1 -164
- package/es/components/keyboard/src/components/InputNumber.vue.js +1 -86
- package/es/components/keyboard/src/components/NumberPanel.vue.d.ts +1 -1
- package/es/components/keyboard/src/components/NumberPanel.vue.js +1 -299
- package/es/components/keyboard/src/utils/index.js +1 -5
- package/es/components/map/index.js +1 -10
- package/es/components/map/src/Map.vue.js +1 -336
- package/es/components/recommend-search/index.js +1 -10
- package/es/components/recommend-search/src/RecommendSearch.vue.js +1 -63
- package/es/components/recommend-search/src/components/BaseSearch.vue.js +1 -157
- package/es/components/recommend-search/src/components/RecommendInput.vue.js +1 -125
- package/es/components/recommend-search/src/components/RecommendMenu.vue.js +1 -104
- package/es/components/recommend-search/src/components/RecommendSelect.vue.js +1 -146
- package/es/components/recommend-search/src/constant/index.js +1 -7
- package/es/components/scale-view/index.js +1 -35
- package/es/components/scale-view/src/ScaleView.vue.js +1 -429
- package/es/components/scale-view/src/components/AnswerParse.vue.js +1 -80
- package/es/components/scale-view/src/components/EvaluateCountdown.vue.js +1 -117
- package/es/components/scale-view/src/components/EvaluatePage.vue.js +1 -141
- package/es/components/scale-view/src/components/LoadingCom.vue.js +1 -19
- package/es/components/scale-view/src/components/NoData.vue.js +1 -74
- package/es/components/scale-view/src/components/ScaleScore.js +1 -63
- package/es/components/scale-view/src/components/composables/choose-common.js +1 -83
- package/es/components/scale-view/src/components/formitem/address.js +1 -3993
- package/es/components/scale-view/src/components/formitem/r-address.js +1 -226
- package/es/components/scale-view/src/components/formitem/r-cascader.js +1 -133
- package/es/components/scale-view/src/components/formitem/r-checkbox.js +1 -281
- package/es/components/scale-view/src/components/formitem/r-collection.js +1 -111
- package/es/components/scale-view/src/components/formitem/r-datetime.js +1 -212
- package/es/components/scale-view/src/components/formitem/r-input.js +1 -86
- package/es/components/scale-view/src/components/formitem/r-map.js +1 -106
- package/es/components/scale-view/src/components/formitem/r-radio.js +1 -240
- package/es/components/scale-view/src/components/formitem/r-select.js +1 -202
- package/es/components/scale-view/src/components/formitem/r-sign.js +1 -177
- package/es/components/scale-view/src/components/formitem/r-upload.js +1 -215
- package/es/components/scale-view/src/components/formitem/sign-com.js +1 -307
- package/es/components/scale-view/src/components/formitem/standard-modal.js +1 -129
- package/es/components/scale-view/src/hooks/scaleview-computed.js +1 -354
- package/es/components/scale-view/src/hooks/scaleview-init.js +1 -437
- package/es/components/scale-view/src/hooks/scaleview-props.js +1 -81
- package/es/components/scale-view/src/hooks/scaleview-state.js +1 -38
- package/es/components/scale-view/src/hooks/scaleview-submit.js +1 -154
- package/es/components/scale-view/src/hooks/scaleview-validate.js +1 -187
- package/es/components/scale-view/src/hooks/use-component.js +1 -86
- package/es/components/scale-view/src/hooks/use-evaluate.js +1 -150
- package/es/components/scale-view/src/hooks/use-event.js +1 -129
- package/es/components/scale-view/src/hooks/use-noData.js +1 -41
- package/es/components/scale-view/src/utils/judge-types.js +1 -36
- package/es/components/search-cascader/index.js +1 -10
- package/es/components/search-cascader/src/SearchCascader.vue.js +1 -194
- package/es/components/search-cascader/src/components/SearchMenu.js +1 -196
- package/es/components/search-cascader/src/components/index.js +1 -1
- package/es/components/search-cascader/src/constants/index.js +1 -11
- package/es/components/search-cascader/src/hooks/index.js +1 -1
- package/es/components/search-cascader/src/hooks/useCssVariable.js +1 -7
- package/es/components/search-cascader/src/utils/index.js +1 -11
- package/es/components/select-label/index.js +1 -15
- package/es/components/select-label/src/LabelFormContent.vue.js +1 -447
- package/es/components/select-label/src/SelectLabel.vue.js +1 -6
- package/es/components/select-label/src/SelectLabel.vue2.js +1 -451
- package/es/components/select-label/src/components/label-classify.vue.js +1 -132
- package/es/components/select-person/index.js +1 -10
- package/es/components/select-person/src/SelectPerson.vue.js +1 -6
- package/es/components/select-person/src/SelectPerson.vue2.js +1 -303
- package/es/components/select-person/src/utils/index.js +1 -58
- package/es/components/shortcut-provider/index.js +1 -12
- package/es/components/shortcut-provider/src/ShortcutProvider.vue.js +1 -42
- package/es/components/shortcut-provider/src/constants/index.js +1 -8
- package/es/components/shortcut-provider/src/hooks/index.js +1 -2
- package/es/components/shortcut-provider/src/hooks/useShortcutSignature.js +1 -12
- package/es/components/shortcut-provider/src/hooks/useShortcuts.js +1 -188
- package/es/components/shortcut-provider/src/utils/index.js +1 -92
- package/es/components/shortcut-setter/index.js +1 -10
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.js +1 -98
- package/es/components/shortcut-setter/src/ShortcutSetterItem.vue.js +1 -76
- package/es/components/steps-wheel/index.js +1 -10
- package/es/components/steps-wheel/src/StepsWheel.vue.js +1 -376
- package/es/components/table-filter/index.js +1 -21
- package/es/components/table-filter/src/base-search-com/BaseSearch.vue.js +1 -2272
- package/es/components/table-filter/src/classification/Classification-com.vue.js +1 -1315
- package/es/components/table-filter/src/classification/search-class-name.vue.js +1 -195
- package/es/components/table-filter/src/classification/search-professional-model.vue.js +1 -594
- package/es/components/table-filter/src/components/age-com/index.vue.js +1 -185
- package/es/components/table-filter/src/components/button-group/ButtonGroup.vue.js +1 -86
- package/es/components/table-filter/src/components/button-icon/getBtnIcon.js +1 -30
- package/es/components/table-filter/src/components/c-tree-select/tree-select.vue.js +1 -253
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.js +1 -114
- package/es/components/table-filter/src/components/classify-filter/helpers/options.js +1 -14
- package/es/components/table-filter/src/components/classify-filter/hooks/useDisplayCategory.js +1 -87
- package/es/components/table-filter/src/components/classify-filter/hooks/useFilterConditions.js +1 -147
- package/es/components/table-filter/src/components/classify-filter/index.vue.js +1 -304
- package/es/components/table-filter/src/components/multi-select/multi-select.vue.js +1 -153
- package/es/components/table-filter/src/components/out-quick-search/out-quick-search.vue.js +1 -310
- package/es/components/table-filter/src/components/range-age/index.vue.js +1 -137
- package/es/components/table-filter/src/components/render-widget/components/CheckboxGroup.vue.js +1 -64
- package/es/components/table-filter/src/components/render-widget/components/Select.vue.js +1 -45
- package/es/components/table-filter/src/components/render-widget/components/index.js +1 -2
- package/es/components/table-filter/src/components/render-widget/enums.js +1 -27
- package/es/components/table-filter/src/components/render-widget/helpers/presetValToTimestamp.js +1 -70
- package/es/components/table-filter/src/components/render-widget/index.vue.js +1 -107
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -152
- package/es/components/table-filter/src/components/search-condition/SearchCondition.vue.js +1 -1520
- package/es/components/table-filter/src/components/search-condition/fieldTypeList.js +1 -171
- package/es/components/table-filter/src/components/search-filter/SearchFilter.vue.js +1 -199
- package/es/components/table-filter/src/components/search-modal/set-classification.vue.js +1 -241
- package/es/components/table-filter/src/components/table-modal/TableModal.vue.js +1 -526
- package/es/components/table-filter/src/const/dataOptions.js +1 -107
- package/es/components/table-filter/src/const/index.js +1 -5
- package/es/components/table-filter/src/directive/flexibleResize.js +1 -157
- package/es/components/table-filter/src/directive/preventReClick.js +1 -14
- package/es/components/table-filter/src/directive/resize.js +1 -12
- package/es/components/table-filter/src/hooks/export.js +1 -1
- package/es/components/table-filter/src/hooks/useAdvanced.js +1 -64
- package/es/components/table-filter/src/hooks/useMixins.js +1 -532
- package/es/components/table-filter/src/hooks/useRenderWidget.js +1 -94
- package/es/components/table-filter/src/hooks/useTableSearchCon.js +1 -131
- package/es/components/table-filter/src/hooks/useWordBookutils.js +1 -91
- package/es/components/table-filter/src/quick-search/QuickSearch.vue.js +1 -2038
- package/es/components/table-filter/src/tool/generateDefOptions.js +1 -65
- package/es/components/table-filter/src/tool/getWidgetType.js +1 -27
- package/es/components/table-filter/src/tool/options.js +1 -200
- package/es/components/table-filter/src/tool/resizeSensor.js +1 -123
- package/es/components/table-filter/src/tool/time-domain.js +1 -100
- package/es/components/table-filter/src/tool/transformData.js +1 -169
- package/es/components/table-filter/src/tool/utils.js +1 -29
- package/es/components/table-filter/src/types/enums.js +1 -67
- package/es/components/time-line/index.js +1 -10
- package/es/components/time-line/src/TimeLine.vue.js +1 -70
- package/es/components/vod-chunk-upload/index.js +1 -14
- package/es/components/vod-chunk-upload/src/chunk-upload-new.vue.js +1 -480
- package/es/components/vod-chunk-upload/src/hooks/upload-computed.js +1 -70
- package/es/components/vod-chunk-upload/src/hooks/upload-data.js +1 -96
- package/es/components/vod-chunk-upload/src/hooks/vod-computed.js +1 -79
- package/es/components/vod-chunk-upload/src/hooks/vod-data.js +1 -28
- package/es/components/vod-chunk-upload/src/vod-chunk-upload/index.js +1 -2
- package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue.js +1 -332
- package/es/components/vod-chunk-upload/src/vod-upload-modal.js +1 -94
- package/es/shared/assets/img/failure.png.js +1 -3
- package/es/shared/assets/img/no-permission.png.js +1 -3
- package/es/shared/assets/img/nodata.png.js +1 -3
- package/es/shared/assets/img/notfound.png.js +1 -3
- package/es/shared/assets/img/qr.png.js +1 -3
- package/es/shared/assets/img/success.png.js +1 -3
- package/es/shared/assets/img/video.png.js +1 -3
- package/es/shared/assets/img/video_default_cover.png.js +1 -3
- package/es/shared/assets/img/xb_big.png.js +1 -3
- package/es/shared/assets/img/xb_small.png.js +1 -3
- package/es/shared/components/SelectPage/SelectPage.vue.js +1 -61
- package/es/shared/components/SelectPage/index.js +1 -2
- package/es/shared/components/SlotRender/SlotRender.js +1 -35
- package/es/shared/components/SlotRender/index.js +1 -2
- package/es/shared/components/SvgIcon/SvgIcon.vue.js +1 -36
- package/es/shared/components/SvgIcon/index.js +1 -2
- package/es/shared/components/TextOverTooltip/TextOverTooltip.vue.js +1 -77
- package/es/shared/components/TextOverTooltip/index.js +1 -2
- package/es/shared/components/VueDraggable/index.js +1 -2
- package/es/shared/components/VueDraggable/src/core/componentBuilderHelper.js +1 -35
- package/es/shared/components/VueDraggable/src/core/componentStructure.js +1 -54
- package/es/shared/components/VueDraggable/src/core/renderHelper.js +1 -47
- package/es/shared/components/VueDraggable/src/core/sortableEvents.js +1 -14
- package/es/shared/components/VueDraggable/src/util/console.js +1 -9
- package/es/shared/components/VueDraggable/src/util/htmlHelper.js +1 -11
- package/es/shared/components/VueDraggable/src/util/string.js +1 -11
- package/es/shared/components/VueDraggable/src/util/tags.js +1 -130
- package/es/shared/components/VueDraggable/src/vuedraggable.js +1 -265
- package/es/shared/components/no-data/NoData.vue.js +1 -74
- package/es/shared/components/no-data/index.js +1 -2
- package/es/shared/components/player-vod/player.js +1 -121
- package/es/shared/components/player-vod/video-modal.js +1 -91
- package/es/shared/global/variable.js +1 -3
- package/es/shared/utils/anime.js +1 -129
- package/es/shared/utils/colorLog.js +1 -53
- package/es/shared/utils/index.js +1 -167
- package/es/shared/utils/loadViewer.js +1 -11
- package/es/shared/utils/tapable/AsyncParallelBailHook.js +1 -63
- package/es/shared/utils/tapable/AsyncParallelHook.js +1 -27
- package/es/shared/utils/tapable/AsyncSeriesBailHook.js +1 -18
- package/es/shared/utils/tapable/AsyncSeriesHook.js +1 -27
- package/es/shared/utils/tapable/AsyncSeriesLoopHook.js +1 -12
- package/es/shared/utils/tapable/AsyncSeriesWaterfallHook.js +1 -22
- package/es/shared/utils/tapable/Hook.js +1 -140
- package/es/shared/utils/tapable/HookCodeFactory.js +1 -456
- package/es/shared/utils/tapable/SyncBailHook.js +1 -19
- package/es/shared/utils/tapable/SyncHook.js +1 -34
- package/es/shared/utils/tapable/SyncLoopHook.js +1 -13
- package/es/shared/utils/tapable/SyncWaterfallHook.js +1 -47
- package/es/shared/utils/utilExpand.js +1 -781
- package/es/shared/utils/vexutils.js +1 -59
- package/package.json +2 -2
|
@@ -1,16 +1 @@
|
|
|
1
|
-
function
|
|
2
|
-
const value = row[item.columnName];
|
|
3
|
-
if (Array.isArray(value))
|
|
4
|
-
return value.map((v) => getValue(v)).join(",");
|
|
5
|
-
return getValue(value);
|
|
6
|
-
function getValue(value2) {
|
|
7
|
-
var _a;
|
|
8
|
-
const findValue = (options) => {
|
|
9
|
-
var _a2;
|
|
10
|
-
return ((_a2 = options == null ? void 0 : options.find((v) => v.value == value2)) == null ? void 0 : _a2.label) || value2 || "";
|
|
11
|
-
};
|
|
12
|
-
return findValue(((_a = item.componentProps) == null ? void 0 : _a.options) || item.options || []);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export { getDefaultValue };
|
|
1
|
+
function n(n,o){const r=n[o.columnName];return Array.isArray(r)?r.map((n=>i(n))).join(","):i(r);function i(n){var r;return i=(null==(r=o.componentProps)?void 0:r.options)||o.options||[],(null==(l=null==i?void 0:i.find((o=>o.value==n)))?void 0:l.label)||n||"";var i,l}}export{n as getDefaultValue};
|
|
@@ -1,108 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { cloneDeep, isObject, isArray } from 'lodash-es';
|
|
3
|
-
import { NPopover, NInput } from 'naive-ui';
|
|
4
|
-
import { InjectionIhoTableHandler } from '../../../../constants/index.js';
|
|
5
|
-
import { useIhoTableFormEvent } from '../../../../utils/index.js';
|
|
6
|
-
import _export_sfc from '../../../../../../../_virtual/plugin-vue_export-helper.js';
|
|
7
|
-
|
|
8
|
-
const _hoisted_1 = ["onClick"];
|
|
9
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
10
|
-
__name: "editSeparate",
|
|
11
|
-
props: {
|
|
12
|
-
value: {},
|
|
13
|
-
height: { type: Number, default: 48 },
|
|
14
|
-
column: { type: Object, required: true },
|
|
15
|
-
row: { type: Object, required: true },
|
|
16
|
-
displayContent: { type: String, default: "" },
|
|
17
|
-
rowIndex: { type: Number, required: true }
|
|
18
|
-
},
|
|
19
|
-
emits: ["update:value", "click"],
|
|
20
|
-
setup(__props, { emit }) {
|
|
21
|
-
const props = __props;
|
|
22
|
-
const tableHandler = inject(InjectionIhoTableHandler);
|
|
23
|
-
const popoverRef = ref();
|
|
24
|
-
const editContent = ref();
|
|
25
|
-
function setEditContent(value) {
|
|
26
|
-
editContent.value = value;
|
|
27
|
-
}
|
|
28
|
-
const show = ref(false);
|
|
29
|
-
function setShow(v) {
|
|
30
|
-
show.value = v;
|
|
31
|
-
}
|
|
32
|
-
function onContentClick(event) {
|
|
33
|
-
show.value = !show.value;
|
|
34
|
-
emit("click", event);
|
|
35
|
-
}
|
|
36
|
-
watch(show, updateShow);
|
|
37
|
-
function updateShow(show2) {
|
|
38
|
-
show2 ? onShow() : onClose();
|
|
39
|
-
}
|
|
40
|
-
async function onShow() {
|
|
41
|
-
var _a;
|
|
42
|
-
editContent.value = cloneDeep(props.value);
|
|
43
|
-
await new Promise((resolve) => setTimeout(resolve));
|
|
44
|
-
(_a = popoverRef.value) == null ? void 0 : _a.syncPosition();
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
const { emitFormChangeWithParams } = useIhoTableFormEvent(props);
|
|
48
|
-
async function onClose() {
|
|
49
|
-
if (!isObject(editContent.value) && !isArray(editContent.value)) {
|
|
50
|
-
if (props.value === editContent.value)
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
const oldValue = props.value;
|
|
54
|
-
emit("update:value", editContent.value);
|
|
55
|
-
emitFormChangeWithParams({ oldValue });
|
|
56
|
-
tableHandler.updateTableDataRef();
|
|
57
|
-
}
|
|
58
|
-
const style = computed(() => ({
|
|
59
|
-
border: "1px solid #f5f5f5",
|
|
60
|
-
height: props.height - 16 + "px",
|
|
61
|
-
display: "flex",
|
|
62
|
-
alignItems: "center",
|
|
63
|
-
padding: "0",
|
|
64
|
-
background: "white",
|
|
65
|
-
wordBreak: "keep-all",
|
|
66
|
-
boxSizing: "border-box",
|
|
67
|
-
"border-radius": "4px"
|
|
68
|
-
}));
|
|
69
|
-
onMounted(() => setShow(true));
|
|
70
|
-
onDeactivated(onClose);
|
|
71
|
-
return (_ctx, _cache) => {
|
|
72
|
-
return openBlock(), createBlock(unref(NPopover), {
|
|
73
|
-
ref_key: "popoverRef",
|
|
74
|
-
ref: popoverRef,
|
|
75
|
-
trigger: "manual",
|
|
76
|
-
show: show.value,
|
|
77
|
-
"onUpdate:show": _cache[1] || (_cache[1] = ($event) => show.value = $event),
|
|
78
|
-
"show-arrow": false
|
|
79
|
-
}, {
|
|
80
|
-
trigger: withCtx(() => [
|
|
81
|
-
createElementVNode("div", {
|
|
82
|
-
onClick: withModifiers(onContentClick, ["stop"]),
|
|
83
|
-
style: normalizeStyle(unref(style))
|
|
84
|
-
}, toDisplayString(__props.displayContent || " "), 13, _hoisted_1)
|
|
85
|
-
]),
|
|
86
|
-
default: withCtx(() => [
|
|
87
|
-
renderSlot(_ctx.$slots, "menu", {
|
|
88
|
-
value: editContent.value,
|
|
89
|
-
"onUpdate:value": setEditContent,
|
|
90
|
-
"onUpdate:show": setShow,
|
|
91
|
-
col: __props.column,
|
|
92
|
-
row: __props.row
|
|
93
|
-
}, () => [
|
|
94
|
-
createVNode(unref(NInput), {
|
|
95
|
-
value: editContent.value,
|
|
96
|
-
"onUpdate:value": _cache[0] || (_cache[0] = ($event) => editContent.value = $event),
|
|
97
|
-
type: "textarea"
|
|
98
|
-
}, null, 8, ["value"])
|
|
99
|
-
])
|
|
100
|
-
]),
|
|
101
|
-
_: 3
|
|
102
|
-
}, 8, ["show"]);
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
var EditSeparate = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "editSeparate.vue"]]);
|
|
107
|
-
|
|
108
|
-
export { EditSeparate as default };
|
|
1
|
+
import{defineComponent as e,inject as t,ref as a,watch as o,computed as u,onMounted as r,onDeactivated as l,openBlock as i,createBlock as n,unref as s,withCtx as p,createElementVNode as v,withModifiers as d,normalizeStyle as c,toDisplayString as m,renderSlot as f,createVNode as h}from"vue";import{cloneDeep as g,isObject as w,isArray as y}from"lodash-es";import{NPopover as x,NInput as b}from"naive-ui";import{InjectionIhoTableHandler as k}from"../../../../constants/index.js";import{useIhoTableFormEvent as _}from"../../../../utils/index.js";import j from"../../../../../../../_virtual/plugin-vue_export-helper.js";const C=["onClick"];var S=j(e({__name:"editSeparate",props:{value:{},height:{type:Number,default:48},column:{type:Object,required:!0},row:{type:Object,required:!0},displayContent:{type:String,default:""},rowIndex:{type:Number,required:!0}},emits:["update:value","click"],setup(e,{emit:j}){const S=e,U=t(k),q=a(),P=a();function I(e){P.value=e}const N=a(!1);function O(e){N.value=e}function R(e){N.value=!N.value,j("click",e)}o(N,(function(e){e?async function(){var e;P.value=g(S.value),await new Promise((e=>setTimeout(e))),null==(e=q.value)||e.syncPosition()}():z()}));const{emitFormChangeWithParams:T}=_(S);async function z(){if(!w(P.value)&&!y(P.value)&&S.value===P.value)return;const e=S.value;j("update:value",P.value),T({oldValue:e}),U.updateTableDataRef()}const B=u((()=>({border:"1px solid #f5f5f5",height:S.height-16+"px",display:"flex",alignItems:"center",padding:"0",background:"white",wordBreak:"keep-all",boxSizing:"border-box","border-radius":"4px"})));return r((()=>O(!0))),l(z),(t,a)=>(i(),n(s(x),{ref_key:"popoverRef",ref:q,trigger:"manual",show:N.value,"onUpdate:show":a[1]||(a[1]=e=>N.value=e),"show-arrow":!1},{trigger:p((()=>[v("div",{onClick:d(R,["stop"]),style:c(s(B))},m(e.displayContent||" "),13,C)])),default:p((()=>[f(t.$slots,"menu",{value:P.value,"onUpdate:value":I,"onUpdate:show":O,col:e.column,row:e.row},(()=>[h(s(b),{value:P.value,"onUpdate:value":a[0]||(a[0]=e=>P.value=e),type:"textarea"},null,8,["value"])]))])),_:3},8,["show"]))}}),[["__file","editSeparate.vue"]]);export{S as default};
|
|
@@ -1,163 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { traverse } from '../../../../../../../shared/utils/index.js';
|
|
3
|
-
import { isFunction, isObject, range } from 'lodash-es';
|
|
4
|
-
import '../../../../../index.js';
|
|
5
|
-
import { EDITABLE_WIDGET_TYPE, InjectionIhoTableUUID } from '../../../../constants/index.js';
|
|
6
|
-
import { createIhoTableClearActivedInterceptor, IhoTableRenderHelper, getRowHeight, getColumnRenderWidth } from '../../../../utils/index.js';
|
|
7
|
-
import { isSeparateColumn, contentSeparate, getColumnInfoMaxLength, generateSeparateRowData } from './separateUtils.js';
|
|
8
|
-
import EditSeparate from './editSeparate.vue.js';
|
|
9
|
-
import { defineTablePlugin } from '../../../../hooks/useTablePlugin.js';
|
|
10
|
-
|
|
11
|
-
function separateRendererPlugins() {
|
|
12
|
-
const pluginName = "separateRendererPlugins";
|
|
13
|
-
const separateRowMap = reactive(/* @__PURE__ */ new Map());
|
|
14
|
-
function getSeparateRowData(uuid, rowData) {
|
|
15
|
-
var _a;
|
|
16
|
-
return (_a = separateRowMap.get(uuid)) == null ? void 0 : _a.get(rowData);
|
|
17
|
-
}
|
|
18
|
-
function setSeparateRowData(uuid, rowData, data) {
|
|
19
|
-
const map = separateRowMap.get(uuid) || /* @__PURE__ */ new WeakMap();
|
|
20
|
-
separateRowMap.set(uuid, map);
|
|
21
|
-
map.set(rowData, data);
|
|
22
|
-
}
|
|
23
|
-
const separateColumnMap = reactive(/* @__PURE__ */ new Map());
|
|
24
|
-
return defineTablePlugin({
|
|
25
|
-
name: pluginName,
|
|
26
|
-
vxe(instance) {
|
|
27
|
-
instance.interceptor.add("event.clearActived", createIhoTableClearActivedInterceptor(EDITABLE_WIDGET_TYPE.SEPARATE, (ele) => ele.classList.contains("v-binder-follower-content")));
|
|
28
|
-
instance.renderer.add(EDITABLE_WIDGET_TYPE.SEPARATE, {
|
|
29
|
-
renderCell(renderOpts, {
|
|
30
|
-
column,
|
|
31
|
-
row
|
|
32
|
-
}) {
|
|
33
|
-
const uuid = inject(InjectionIhoTableUUID);
|
|
34
|
-
const separateRow = getSeparateRowData(uuid, row) || {
|
|
35
|
-
separateData: {}
|
|
36
|
-
};
|
|
37
|
-
return createVNode("section", null, [separateRow.separateData[column.field]]);
|
|
38
|
-
},
|
|
39
|
-
renderEdit: IhoTableRenderHelper.createRenderEdit(({
|
|
40
|
-
fieldItem,
|
|
41
|
-
column,
|
|
42
|
-
row,
|
|
43
|
-
emitFormClick
|
|
44
|
-
}) => {
|
|
45
|
-
var _a, _b, _c;
|
|
46
|
-
const uuid = inject(InjectionIhoTableUUID);
|
|
47
|
-
const separateRow = getSeparateRowData(uuid, row);
|
|
48
|
-
const height = getRowHeight();
|
|
49
|
-
const slots = {};
|
|
50
|
-
let separateSlot = (_b = (_a = fieldItem.componentProps) == null ? void 0 : _a.separateSlot) != null ? _b : fieldItem.separateSlot;
|
|
51
|
-
if (separateSlot) {
|
|
52
|
-
separateSlot = toRaw(separateSlot);
|
|
53
|
-
slots.menu = isFunction(separateSlot) ? separateSlot : isObject(separateSlot) ? (props) => h(separateSlot, props) : void 0;
|
|
54
|
-
}
|
|
55
|
-
return [createVNode(EditSeparate, {
|
|
56
|
-
"value": row[column.field],
|
|
57
|
-
"onUpdate:value": ($event) => row[column.field] = $event,
|
|
58
|
-
"row-index": separateRow == null ? void 0 : separateRow.index,
|
|
59
|
-
"height": height,
|
|
60
|
-
"column": column,
|
|
61
|
-
"row": row,
|
|
62
|
-
"display-content": (_c = separateRow == null ? void 0 : separateRow.separateData) == null ? void 0 : _c[column.field],
|
|
63
|
-
"onClick": emitFormClick
|
|
64
|
-
}, slots)];
|
|
65
|
-
})
|
|
66
|
-
});
|
|
67
|
-
},
|
|
68
|
-
apply(hooks) {
|
|
69
|
-
hooks.fieldHooks.fieldList.tap(pluginName, (fieldList, {
|
|
70
|
-
uuid
|
|
71
|
-
}) => {
|
|
72
|
-
uuid && separateColumnMap.set(uuid, getSeparateColumn(fieldList));
|
|
73
|
-
return fieldList;
|
|
74
|
-
function getSeparateColumn(fieldList2) {
|
|
75
|
-
return fieldList2.reduce((res, field) => {
|
|
76
|
-
traverse(field, (item) => {
|
|
77
|
-
isSeparateColumn(item) && res.push(toRaw(item));
|
|
78
|
-
});
|
|
79
|
-
return res;
|
|
80
|
-
}, []);
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
hooks.dataHooks.data.tapPromise(pluginName, async (rowData, config, {
|
|
84
|
-
insertAfter,
|
|
85
|
-
index: dataIndex,
|
|
86
|
-
$table
|
|
87
|
-
}) => {
|
|
88
|
-
if (!config.uuid)
|
|
89
|
-
return;
|
|
90
|
-
const separateColumns = separateColumnMap.get(config.uuid);
|
|
91
|
-
if (!separateColumns || !separateColumns.length)
|
|
92
|
-
return;
|
|
93
|
-
const parsedRowDataInfo = [];
|
|
94
|
-
for (const column of separateColumns) {
|
|
95
|
-
if (!column.field)
|
|
96
|
-
continue;
|
|
97
|
-
const width = await getColumnRenderWidth(column, $table);
|
|
98
|
-
parsedRowDataInfo.push({
|
|
99
|
-
field: column.field,
|
|
100
|
-
data: contentSeparate(rowData[column.field], column, width)
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
range(getColumnInfoMaxLength(parsedRowDataInfo)).forEach((_, index) => {
|
|
104
|
-
const separateData = generateSeparateRowData(parsedRowDataInfo, index);
|
|
105
|
-
if (index === 0) {
|
|
106
|
-
setSeparateRowData(config.uuid, rowData, {
|
|
107
|
-
index: dataIndex,
|
|
108
|
-
separateData
|
|
109
|
-
});
|
|
110
|
-
rowData.$__SEPARATE_DATA = [separateData];
|
|
111
|
-
return;
|
|
112
|
-
}
|
|
113
|
-
const data = {
|
|
114
|
-
$__SEPARATE: true
|
|
115
|
-
};
|
|
116
|
-
setSeparateRowData(config.uuid, data, {
|
|
117
|
-
index: dataIndex,
|
|
118
|
-
separateData
|
|
119
|
-
});
|
|
120
|
-
rowData.$__SEPARATE_DATA.push(separateData);
|
|
121
|
-
insertAfter(data);
|
|
122
|
-
});
|
|
123
|
-
});
|
|
124
|
-
hooks.eventHooks.onResizableChange.tap(pluginName, async ({
|
|
125
|
-
column
|
|
126
|
-
}, _, context) => {
|
|
127
|
-
if (!isSeparateColumn(column))
|
|
128
|
-
return;
|
|
129
|
-
context.updateTableDataRef();
|
|
130
|
-
});
|
|
131
|
-
hooks.configHooks.editConfig.tap(pluginName, (editConfig = {}, config) => {
|
|
132
|
-
editConfig.beforeEditMethod = avoidOperationDecorator(editConfig.beforeEditMethod);
|
|
133
|
-
return editConfig;
|
|
134
|
-
});
|
|
135
|
-
hooks.configHooks.checkboxConfig.tap(pluginName, (checkboxConfig = {}, config) => {
|
|
136
|
-
checkboxConfig.checkMethod = avoidOperationDecorator(checkboxConfig.checkMethod);
|
|
137
|
-
checkboxConfig.visibleMethod = avoidOperationDecorator(checkboxConfig.visibleMethod);
|
|
138
|
-
return checkboxConfig;
|
|
139
|
-
});
|
|
140
|
-
function avoidOperationDecorator(oldFn) {
|
|
141
|
-
return (...args) => {
|
|
142
|
-
var _a;
|
|
143
|
-
if ((_a = args[0].row) == null ? void 0 : _a.$__SEPARATE)
|
|
144
|
-
return false;
|
|
145
|
-
if (isFunction(oldFn)) {
|
|
146
|
-
return oldFn(...args);
|
|
147
|
-
}
|
|
148
|
-
return true;
|
|
149
|
-
};
|
|
150
|
-
}
|
|
151
|
-
hooks.setupHooks.setup.tap(pluginName, (config) => {
|
|
152
|
-
onBeforeUnmount(() => {
|
|
153
|
-
if (config.value.uuid) {
|
|
154
|
-
separateRowMap.delete(config.value.uuid);
|
|
155
|
-
separateColumnMap.delete(config.value.uuid);
|
|
156
|
-
}
|
|
157
|
-
});
|
|
158
|
-
});
|
|
159
|
-
}
|
|
160
|
-
});
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
export { separateRendererPlugins };
|
|
1
|
+
import{reactive as e,inject as t,createVNode as o,toRaw as n,h as i,onBeforeUnmount as r}from"vue";import{traverse as a}from"../../../../../../../shared/utils/index.js";import{isFunction as d,isObject as s,range as l}from"lodash-es";import"../../../../../index.js";import{EDITABLE_WIDGET_TYPE as u,InjectionIhoTableUUID as c}from"../../../../constants/index.js";import{createIhoTableClearActivedInterceptor as p,IhoTableRenderHelper as f,getRowHeight as m,getColumnRenderWidth as v}from"../../../../utils/index.js";import{isSeparateColumn as h,contentSeparate as A,getColumnInfoMaxLength as E,generateSeparateRowData as g}from"./separateUtils.js";import k from"./editSeparate.vue.js";import{defineTablePlugin as x}from"../../../../hooks/useTablePlugin.js";function b(){const b="separateRendererPlugins",w=e(new Map);function P(e,t){var o;return null==(o=w.get(e))?void 0:o.get(t)}function R(e,t,o){const n=w.get(e)||new WeakMap;w.set(e,n),n.set(t,o)}const T=e(new Map);return x({name:b,vxe(e){e.interceptor.add("event.clearActived",p(u.SEPARATE,(e=>e.classList.contains("v-binder-follower-content")))),e.renderer.add(u.SEPARATE,{renderCell(e,{column:n,row:i}){const r=P(t(c),i)||{separateData:{}};return o("section",null,[r.separateData[n.field]])},renderEdit:f.createRenderEdit((({fieldItem:e,column:r,row:a,emitFormClick:l})=>{var u,p,f;const v=P(t(c),a),h=m(),A={};let E=null!=(p=null==(u=e.componentProps)?void 0:u.separateSlot)?p:e.separateSlot;return E&&(E=n(E),A.menu=d(E)?E:s(E)?e=>i(E,e):void 0),[o(k,{value:a[r.field],"onUpdate:value":e=>a[r.field]=e,"row-index":null==v?void 0:v.index,height:h,column:r,row:a,"display-content":null==(f=null==v?void 0:v.separateData)?void 0:f[r.field],onClick:l},A)]}))})},apply(e){function t(e){return(...t)=>{var o;return!(null==(o=t[0].row)?void 0:o.$__SEPARATE)&&(!d(e)||e(...t))}}e.fieldHooks.fieldList.tap(b,((e,{uuid:t})=>(t&&T.set(t,e.reduce(((e,t)=>(a(t,(t=>{h(t)&&e.push(n(t))})),e)),[])),e))),e.dataHooks.data.tapPromise(b,(async(e,t,{insertAfter:o,index:n,$table:i})=>{if(!t.uuid)return;const r=T.get(t.uuid);if(!r||!r.length)return;const a=[];for(const t of r){if(!t.field)continue;const o=await v(t,i);a.push({field:t.field,data:A(e[t.field],t,o)})}l(E(a)).forEach(((i,r)=>{const d=g(a,r);if(0===r)return R(t.uuid,e,{index:n,separateData:d}),void(e.$__SEPARATE_DATA=[d]);const s={$__SEPARATE:!0};R(t.uuid,s,{index:n,separateData:d}),e.$__SEPARATE_DATA.push(d),o(s)}))})),e.eventHooks.onResizableChange.tap(b,(async({column:e},t,o)=>{h(e)&&o.updateTableDataRef()})),e.configHooks.editConfig.tap(b,((e={},o)=>(e.beforeEditMethod=t(e.beforeEditMethod),e))),e.configHooks.checkboxConfig.tap(b,((e={},o)=>(e.checkMethod=t(e.checkMethod),e.visibleMethod=t(e.visibleMethod),e))),e.setupHooks.setup.tap(b,(e=>{r((()=>{e.value.uuid&&(w.delete(e.value.uuid),T.delete(e.value.uuid))}))}))}})}export{b as separateRendererPlugins};
|
|
@@ -1,42 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { isArray, cloneDeep, isString, isNumber } from 'lodash-es';
|
|
3
|
-
import { EDITABLE_WIDGET_TYPE } from '../../../../constants/index.js';
|
|
4
|
-
|
|
5
|
-
function getColumnInfoMaxLength(parsedRowDataInfo) {
|
|
6
|
-
return Math.max(...parsedRowDataInfo.map((r) => r.data.length), 1);
|
|
7
|
-
}
|
|
8
|
-
function generateSeparateRowData(parsedRowDataInfo, index) {
|
|
9
|
-
return parsedRowDataInfo.reduce((res, info) => {
|
|
10
|
-
res[info.field] = info.data[index];
|
|
11
|
-
return res;
|
|
12
|
-
}, {});
|
|
13
|
-
}
|
|
14
|
-
function contentSeparate(value, field, width) {
|
|
15
|
-
if (isArray(value)) {
|
|
16
|
-
return value.map((row) => {
|
|
17
|
-
var _a, _b, _c, _d;
|
|
18
|
-
return (_d = (_c = (_b = (_a = field.editRender) == null ? void 0 : _a.props) == null ? void 0 : _b.separateFormatter) == null ? void 0 : _c.call(_b, cloneDeep(row))) != null ? _d : row;
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
if (!isString(value) || !isNumber(width))
|
|
22
|
-
return [value];
|
|
23
|
-
width -= 24;
|
|
24
|
-
return [...value].reduce(
|
|
25
|
-
(res, char) => {
|
|
26
|
-
const latestString = res[res.length - 1];
|
|
27
|
-
if (getStringWidth(latestString + char) > width) {
|
|
28
|
-
res.push(char);
|
|
29
|
-
} else {
|
|
30
|
-
res[res.length - 1] = latestString + char;
|
|
31
|
-
}
|
|
32
|
-
return res;
|
|
33
|
-
},
|
|
34
|
-
[""]
|
|
35
|
-
);
|
|
36
|
-
}
|
|
37
|
-
function isSeparateColumn(field) {
|
|
38
|
-
var _a;
|
|
39
|
-
return field.field && ((_a = field.editRender) == null ? void 0 : _a.name) === EDITABLE_WIDGET_TYPE.SEPARATE;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export { contentSeparate, generateSeparateRowData, getColumnInfoMaxLength, isSeparateColumn };
|
|
1
|
+
import{getStringWidth as e}from"../../../../../../../shared/utils/index.js";import{isArray as n,cloneDeep as r,isString as t,isNumber as o}from"lodash-es";import{EDITABLE_WIDGET_TYPE as l}from"../../../../constants/index.js";function u(e){return Math.max(...e.map((e=>e.data.length)),1)}function a(e,n){return e.reduce(((e,r)=>(e[r.field]=r.data[n],e)),{})}function d(l,u,a){return n(l)?l.map((e=>{var n,t,o,l;return null!=(l=null==(o=null==(t=null==(n=u.editRender)?void 0:n.props)?void 0:t.separateFormatter)?void 0:o.call(t,r(e)))?l:e})):t(l)&&o(a)?(a-=24,[...l].reduce(((n,r)=>{const t=n[n.length-1];return e(t+r)>a?n.push(r):n[n.length-1]=t+r,n}),[""])):[l]}function i(e){var n;return e.field&&(null==(n=e.editRender)?void 0:n.name)===l.SEPARATE}export{d as contentSeparate,a as generateSeparateRowData,u as getColumnInfoMaxLength,i as isSeparateColumn};
|
package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin.js
CHANGED
|
@@ -1,50 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import '../../../../index.js';
|
|
3
|
-
import { EDITABLE_WIDGET_TYPE } from '../../../constants/index.js';
|
|
4
|
-
import { NTimePicker } from 'naive-ui';
|
|
5
|
-
import { createIhoTableClearActivedInterceptor, IhoTableRenderHelper } from '../../../utils/index.js';
|
|
6
|
-
import { defineTablePlugin } from '../../../hooks/useTablePlugin.js';
|
|
7
|
-
|
|
8
|
-
function timeRendererPlugin() {
|
|
9
|
-
const pluginName = "timeRendererPlugin";
|
|
10
|
-
return defineTablePlugin({
|
|
11
|
-
name: pluginName,
|
|
12
|
-
vxe(instance) {
|
|
13
|
-
instance.interceptor.add("event.clearActived", createIhoTableClearActivedInterceptor(EDITABLE_WIDGET_TYPE.TIME, (ele) => ele.classList.contains("n-time-picker-panel")));
|
|
14
|
-
instance.renderer.add(EDITABLE_WIDGET_TYPE.TIME, {
|
|
15
|
-
renderCell: IhoTableRenderHelper.createDefaultRenderCell(),
|
|
16
|
-
renderEdit: IhoTableRenderHelper.createRenderEdit(({
|
|
17
|
-
fieldItem,
|
|
18
|
-
row,
|
|
19
|
-
column,
|
|
20
|
-
emitFormChangeWithParams,
|
|
21
|
-
emitFormClick
|
|
22
|
-
}) => {
|
|
23
|
-
const {
|
|
24
|
-
placeholder = "\u8BF7\u9009\u62E9",
|
|
25
|
-
valueFormat = "HH:mm"
|
|
26
|
-
} = fieldItem.componentProps || {};
|
|
27
|
-
const config = {
|
|
28
|
-
placeholder,
|
|
29
|
-
valueFormat,
|
|
30
|
-
format: valueFormat || "yyyy-MM-dd HH:mm:ss",
|
|
31
|
-
onUpdateFormattedValue: (value) => {
|
|
32
|
-
const oldValue = row[column.field];
|
|
33
|
-
row[column.field] = value;
|
|
34
|
-
emitFormChangeWithParams({
|
|
35
|
-
oldValue
|
|
36
|
-
});
|
|
37
|
-
},
|
|
38
|
-
onClick: emitFormClick
|
|
39
|
-
};
|
|
40
|
-
return [createVNode(NTimePicker, mergeProps({
|
|
41
|
-
"formattedValue": row[column.field],
|
|
42
|
-
"onUpdate:formattedValue": ($event) => row[column.field] = $event
|
|
43
|
-
}, config, fieldItem.componentProps), null)];
|
|
44
|
-
})
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export { timeRendererPlugin };
|
|
1
|
+
import{createVNode as e,mergeProps as r}from"vue";import"../../../../index.js";import{EDITABLE_WIDGET_TYPE as t}from"../../../constants/index.js";import{NTimePicker as o}from"naive-ui";import{createIhoTableClearActivedInterceptor as n,IhoTableRenderHelper as i}from"../../../utils/index.js";import{defineTablePlugin as l}from"../../../hooks/useTablePlugin.js";function m(){return l({name:"timeRendererPlugin",vxe(l){l.interceptor.add("event.clearActived",n(t.TIME,(e=>e.classList.contains("n-time-picker-panel")))),l.renderer.add(t.TIME,{renderCell:i.createDefaultRenderCell(),renderEdit:i.createRenderEdit((({fieldItem:t,row:n,column:i,emitFormChangeWithParams:l,emitFormClick:m})=>{const{placeholder:a="请选择",valueFormat:d="HH:mm"}=t.componentProps||{},s={placeholder:a,valueFormat:d,format:d||"yyyy-MM-dd HH:mm:ss",onUpdateFormattedValue:e=>{const r=n[i.field];n[i.field]=e,l({oldValue:r})},onClick:m};return[e(o,r({formattedValue:n[i.field],"onUpdate:formattedValue":e=>n[i.field]=e},s,t.componentProps),null)]}))})}})}export{m as timeRendererPlugin};
|
|
@@ -1,30 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { defineTablePlugin } from '../../../hooks/useTablePlugin.js';
|
|
3
|
-
|
|
4
|
-
function checkRendererPlugin() {
|
|
5
|
-
const pluginName = "checkRendererPlugin";
|
|
6
|
-
return defineTablePlugin({
|
|
7
|
-
name: pluginName,
|
|
8
|
-
apply(hooks) {
|
|
9
|
-
hooks.fieldHooks.field.tap(pluginName, (field, {
|
|
10
|
-
index,
|
|
11
|
-
insertBefore
|
|
12
|
-
}, config) => {
|
|
13
|
-
if (index === 0 && config.selectType) {
|
|
14
|
-
insertBefore({
|
|
15
|
-
field: pluginName,
|
|
16
|
-
annotation: false,
|
|
17
|
-
type: config.selectType,
|
|
18
|
-
...config.checkboxConfig,
|
|
19
|
-
width: 45,
|
|
20
|
-
align: "center",
|
|
21
|
-
fixed: "left"
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
return field;
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export { checkRendererPlugin };
|
|
1
|
+
import"../../../../index.js";import{defineTablePlugin as e}from"../../../hooks/useTablePlugin.js";function n(){const n="checkRendererPlugin";return e({name:n,apply(e){e.fieldHooks.field.tap(n,((e,{index:i,insertBefore:t},o)=>(0===i&&o.selectType&&t({field:n,annotation:!1,type:o.selectType,...o.checkboxConfig,width:45,align:"center",fixed:"left"}),e)))}})}export{n as checkRendererPlugin};
|
|
@@ -1,48 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import '../../../../index.js';
|
|
3
|
-
import { WIDGET_TYPE } from '../../../constants/index.js';
|
|
4
|
-
import { getRowHeight } from '../../../utils/index.js';
|
|
5
|
-
import { defineTablePlugin } from '../../../hooks/useTablePlugin.js';
|
|
6
|
-
|
|
7
|
-
function colorRendererPlugin() {
|
|
8
|
-
const pluginName = "checkRendererPlugin";
|
|
9
|
-
const colorMap = {
|
|
10
|
-
blue: "blue",
|
|
11
|
-
sky: "skyblue",
|
|
12
|
-
azure: "azure",
|
|
13
|
-
palegreen: "palegreen",
|
|
14
|
-
yellow: "yellow",
|
|
15
|
-
darkorange: "darkorange",
|
|
16
|
-
magenta: "magenta",
|
|
17
|
-
purple: "purple",
|
|
18
|
-
maroon: "maroon",
|
|
19
|
-
orange: "orange",
|
|
20
|
-
green: "green",
|
|
21
|
-
red: "red",
|
|
22
|
-
grey: "grey"
|
|
23
|
-
};
|
|
24
|
-
return defineTablePlugin({
|
|
25
|
-
name: pluginName,
|
|
26
|
-
vxe(instance) {
|
|
27
|
-
instance.renderer.add(WIDGET_TYPE.COLOR, {
|
|
28
|
-
renderCell(renderOpts, {
|
|
29
|
-
row,
|
|
30
|
-
column
|
|
31
|
-
}) {
|
|
32
|
-
const value = row[column.field];
|
|
33
|
-
if (!value)
|
|
34
|
-
return [];
|
|
35
|
-
const [color, alias] = value.split("-");
|
|
36
|
-
return [createVNode("div", {
|
|
37
|
-
"style": {
|
|
38
|
-
background: colorMap[alias] || color,
|
|
39
|
-
height: getRowHeight() - 8 + "px"
|
|
40
|
-
}
|
|
41
|
-
}, null)];
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export { colorRendererPlugin };
|
|
1
|
+
import{createVNode as e}from"vue";import"../../../../index.js";import{WIDGET_TYPE as r}from"../../../constants/index.js";import{getRowHeight as n}from"../../../utils/index.js";import{defineTablePlugin as o}from"../../../hooks/useTablePlugin.js";function l(){const l={blue:"blue",sky:"skyblue",azure:"azure",palegreen:"palegreen",yellow:"yellow",darkorange:"darkorange",magenta:"magenta",purple:"purple",maroon:"maroon",orange:"orange",green:"green",red:"red",grey:"grey"};return o({name:"checkRendererPlugin",vxe(o){o.renderer.add(r.COLOR,{renderCell(r,{row:o,column:a}){const t=o[a.field];if(!t)return[];const[u,i]=t.split("-");return[e("div",{style:{background:l[i]||u,height:n()-8+"px"}},null)]}})}})}export{l as colorRendererPlugin};
|
package/es/components/iho-table/src/plugins/rendererPlugins/widgets/defaultRendererPlugin.js
CHANGED
|
@@ -1,62 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { isString } from 'lodash-es';
|
|
3
|
-
import '../../../../index.js';
|
|
4
|
-
import { WIDGET_TYPE } from '../../../constants/index.js';
|
|
5
|
-
import { IhoTableWarn } from '../../../utils/index.js';
|
|
6
|
-
import { defineTablePlugin } from '../../../hooks/useTablePlugin.js';
|
|
7
|
-
|
|
8
|
-
function defaultRendererPlugin() {
|
|
9
|
-
const pluginName = "defaultRendererPlugin";
|
|
10
|
-
return defineTablePlugin({
|
|
11
|
-
name: pluginName,
|
|
12
|
-
vxe(instance) {
|
|
13
|
-
instance.renderer.add(WIDGET_TYPE.DEFAULT, {
|
|
14
|
-
renderCell(renderOpts, {
|
|
15
|
-
row,
|
|
16
|
-
column
|
|
17
|
-
}) {
|
|
18
|
-
const value = row[column.field];
|
|
19
|
-
return isRichContent(value) ? renderRichContent(value) : [value];
|
|
20
|
-
function renderRichContent(content) {
|
|
21
|
-
const parsedContent = parseRichContent(content);
|
|
22
|
-
return [createVNode("div", {
|
|
23
|
-
"style": {
|
|
24
|
-
color: parsedContent.background
|
|
25
|
-
}
|
|
26
|
-
}, [renderIcon(parsedContent.icon), parsedContent.change_text])];
|
|
27
|
-
function renderIcon(icon) {
|
|
28
|
-
if (!icon)
|
|
29
|
-
return null;
|
|
30
|
-
if (icon.match(/#[\da-f]{6}|[\da-f]{3}/i)) {
|
|
31
|
-
return createVNode("i", {
|
|
32
|
-
"class": "icon-dot",
|
|
33
|
-
"style": {
|
|
34
|
-
"--table-icon-color": icon,
|
|
35
|
-
"--table-icon-shadow": icon
|
|
36
|
-
}
|
|
37
|
-
}, null);
|
|
38
|
-
}
|
|
39
|
-
return createVNode("i", {
|
|
40
|
-
"class": parsedContent.icon
|
|
41
|
-
}, null);
|
|
42
|
-
}
|
|
43
|
-
function parseRichContent(richContent) {
|
|
44
|
-
try {
|
|
45
|
-
return JSON.parse(richContent.replace(/^###/, ""));
|
|
46
|
-
} catch (e) {
|
|
47
|
-
IhoTableWarn(`invalid json-content ${richContent}`);
|
|
48
|
-
return {};
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
function isRichContent(content) {
|
|
53
|
-
return isString(content) && !!content.match(/^###\{[^{}]+}$/);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
instance.renderer.add(WIDGET_TYPE.STATUS, instance.renderer.get(WIDGET_TYPE.DEFAULT));
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export { defaultRendererPlugin };
|
|
1
|
+
import{createVNode as r}from"vue";import{isString as e}from"lodash-es";import"../../../../index.js";import{WIDGET_TYPE as n}from"../../../constants/index.js";import{IhoTableWarn as t}from"../../../utils/index.js";import{defineTablePlugin as o}from"../../../hooks/useTablePlugin.js";function i(){return o({name:"defaultRendererPlugin",vxe(o){o.renderer.add(n.DEFAULT,{renderCell(n,{row:o,column:i}){const l=o[i.field];return e(c=l)&&c.match(/^###\{[^{}]+}$/)?function(e){const n=function(r){try{return JSON.parse(r.replace(/^###/,""))}catch(e){return t(`invalid json-content ${r}`),{}}}(e);return[r("div",{style:{color:n.background}},[function(e){if(!e)return null;if(e.match(/#[\da-f]{6}|[\da-f]{3}/i))return r("i",{class:"icon-dot",style:{"--table-icon-color":e,"--table-icon-shadow":e}},null);return r("i",{class:n.icon},null)}(n.icon),n.change_text])]}(l):[l];var c}}),o.renderer.add(n.STATUS,o.renderer.get(n.DEFAULT))}})}export{i as defaultRendererPlugin};
|
|
@@ -1,52 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { isArray, isString } from 'lodash-es';
|
|
3
|
-
import '../../../../index.js';
|
|
4
|
-
import { WIDGET_TYPE } from '../../../constants/index.js';
|
|
5
|
-
import { defineTablePlugin } from '../../../hooks/useTablePlugin.js';
|
|
6
|
-
|
|
7
|
-
function labelRendererPlugin() {
|
|
8
|
-
const pluginName = "labelRendererPlugin";
|
|
9
|
-
return defineTablePlugin({
|
|
10
|
-
name: pluginName,
|
|
11
|
-
vxe(instance) {
|
|
12
|
-
instance.renderer.add(WIDGET_TYPE.LABEL, {
|
|
13
|
-
renderCell(renderOpts, {
|
|
14
|
-
row,
|
|
15
|
-
column
|
|
16
|
-
}) {
|
|
17
|
-
try {
|
|
18
|
-
if (!row[column.field])
|
|
19
|
-
return [];
|
|
20
|
-
const value = JSON.parse(row[column.field]);
|
|
21
|
-
const labels = isArray(value.labels) ? value.labels : parseLabelString(value.labelStr);
|
|
22
|
-
return createVNode("section", {
|
|
23
|
-
"style": {
|
|
24
|
-
display: "flex"
|
|
25
|
-
}
|
|
26
|
-
}, [labels.map(renderLabelItem)]);
|
|
27
|
-
} catch (e) {
|
|
28
|
-
return [];
|
|
29
|
-
}
|
|
30
|
-
function parseLabelString(str) {
|
|
31
|
-
if (!isString(str))
|
|
32
|
-
return [];
|
|
33
|
-
return str.split(",").map((s) => ({
|
|
34
|
-
labelName: s
|
|
35
|
-
}));
|
|
36
|
-
}
|
|
37
|
-
function renderLabelItem(item) {
|
|
38
|
-
return createVNode("div", {
|
|
39
|
-
"style": {
|
|
40
|
-
backgroundColor: item.color || "#5585f5",
|
|
41
|
-
color: "white",
|
|
42
|
-
flex: "1"
|
|
43
|
-
}
|
|
44
|
-
}, [item.labelName]);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export { labelRendererPlugin };
|
|
1
|
+
import{createVNode as e}from"vue";import{isArray as r,isString as l}from"lodash-es";import"../../../../index.js";import{WIDGET_TYPE as o}from"../../../constants/index.js";import{defineTablePlugin as t}from"../../../hooks/useTablePlugin.js";function n(){return t({name:"labelRendererPlugin",vxe(t){t.renderer.add(o.LABEL,{renderCell(o,{row:t,column:n}){try{if(!t[n.field])return[];const o=JSON.parse(t[n.field]),i=r(o.labels)?o.labels:(a=o.labelStr,l(a)?a.split(",").map((e=>({labelName:e}))):[]);return e("section",{style:{display:"flex"}},[i.map((function(r){return e("div",{style:{backgroundColor:r.color||"#5585f5",color:"white",flex:"1"}},[r.labelName])}))])}catch(e){return[]}var a}})}})}export{n as labelRendererPlugin};
|