cnhis-design-vue 3.1.45-beta.0 → 3.1.45-beta.2
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/components/base-search/src/index.vue.js +1 -1
- package/es/components/base-search/src/index.vue2.js +1 -0
- package/es/components/big-table/src/BigTable.vue.js +1 -1
- package/es/components/big-table/src/components/NoData.vue.js +1 -1
- package/es/components/big-table/src/components/NoData.vue2.js +1 -0
- package/es/components/big-table/src/components/edit-form/edit-separate.vue.js +1 -1
- package/es/components/big-table/src/components/edit-form/edit-separate.vue2.js +1 -0
- package/es/components/big-table/src/components/input-button.vue.js +1 -1
- package/es/components/big-table/src/components/input-button.vue2.js +1 -0
- package/es/components/big-table/src/components/separate.vue.js +1 -1
- package/es/components/big-table/src/components/separate.vue2.js +1 -0
- package/es/components/bpmn-workflow/src/BpmnWorkflow.vue.js +1 -1
- package/es/components/bpmn-workflow/src/BpmnWorkflow.vue2.js +1 -0
- package/es/components/button-print/src/ButtonPrint.vue.js +1 -1
- package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
- package/es/components/button-print/src/components/EditFormat.vue.js +1 -1
- package/es/components/button-print/src/components/EditFormat.vue2.js +1 -0
- package/es/components/button-print/src/components/IdentityVerification.vue.js +1 -1
- package/es/components/button-print/src/components/IdentityVerification.vue2.js +1 -0
- package/es/components/button-print/src/components/Preview.vue.js +1 -1
- package/es/components/classification/src/components/search-filter/index.vue.js +1 -1
- package/es/components/classification/src/components/search-filter/index.vue2.js +1 -0
- package/es/components/classification/src/components/set-classification/index.vue.js +1 -1
- package/es/components/classification/src/components/set-classification/index.vue2.js +1 -0
- package/es/components/classification/src/components/table-modal/index.vue.js +1 -1
- package/es/components/classification/src/components/table-modal/index.vue2.js +1 -0
- package/es/components/classification/src/index.vue.js +1 -1
- package/es/components/classification/src/index.vue2.js +1 -0
- package/es/components/date-picker/src/DatePicker.vue.js +1 -1
- package/es/components/date-picker/src/DatePicker.vue2.js +1 -0
- package/es/components/fabric-chart/src/FabricChart.vue.js +1 -1
- package/es/components/fabric-chart/src/FabricChart.vue2.js +1 -0
- package/es/components/fabric-chart/src/components/PopupTip.vue.js +1 -1
- package/es/components/fabric-chart/src/components/PopupTip.vue2.js +1 -0
- package/es/components/field-set/src/FieldSet.vue.js +1 -1
- package/es/components/field-set/src/FieldSet.vue2.js +1 -0
- package/es/components/form-config/src/FormConfig.vue.js +1 -1
- package/es/components/form-config/src/FormConfig.vue2.js +1 -0
- package/es/components/form-config/src/components/FormConfigCreator.vue.js +1 -1
- package/es/components/form-config/src/components/FormConfigCreator.vue2.js +1 -0
- package/es/components/form-config/src/components/FormConfigDragDisplay.vue.js +1 -1
- package/es/components/form-config/src/components/FormConfigDragDisplay.vue2.js +1 -0
- package/es/components/form-config/src/components/FormConfigEdit.vue.js +1 -1
- package/es/components/form-config/src/components/FormConfigEdit.vue2.js +1 -0
- package/es/components/form-config/src/components/renderer/CloseButton.vue.js +1 -1
- package/es/components/form-config/src/components/renderer/CloseButton.vue2.js +1 -0
- package/es/components/form-config/src/components/renderer/ComplexNode.vue.js +1 -1
- package/es/components/form-config/src/components/renderer/ComplexNode.vue2.js +1 -0
- package/es/components/form-config/src/components/renderer/DefaultNode.vue.js +1 -1
- package/es/components/form-config/src/components/renderer/DefaultNode.vue2.js +1 -0
- package/es/components/form-render/src/FormRender.vue.js +1 -1
- package/es/components/form-render/src/FormRender.vue2.js +1 -0
- package/es/components/form-render/src/FormRenderWrapper.vue.js +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue2.js +1 -0
- package/es/components/form-render/src/components/renderer/combination.d.ts +5 -5
- package/es/components/form-render/src/components/renderer/combination.js +1 -1
- package/es/components/form-render/src/components/renderer/formItem.js +1 -1
- package/es/components/form-render/src/components/renderer/jsonCombination/index.d.ts +5 -5
- package/es/components/form-render/src/components/renderer/jsonCombination/index.js +1 -1
- package/es/components/form-render/src/components/renderer/levelSearchCascader.js +1 -1
- package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.js +1 -1
- package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue2.js +1 -0
- package/es/components/form-render/src/components/renderer/remoteSearch.js +1 -1
- package/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
- package/es/components/form-render/src/components/renderer/select.js +1 -1
- package/es/components/form-render/src/components/tooltipMessage.vue.js +1 -1
- package/es/components/form-render/src/components/tooltipMessage.vue2.js +1 -0
- package/es/components/form-render/src/hooks/useComplexOptions.js +1 -1
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
- package/es/components/guide/src/renderer.js +1 -1
- package/es/components/iho-select-label/src/LabelFormContent.vue.js +1 -1
- package/es/components/iho-select-label/src/LabelFormContent.vue2.js +1 -0
- package/es/components/iho-select-label/src/SelectLabel.vue.js +1 -1
- package/es/components/iho-select-label/src/SelectLabel.vue2.js +1 -0
- package/es/components/iho-select-label/src/components/label-classify.vue.js +1 -1
- package/es/components/iho-select-label/src/components/label-classify.vue2.js +1 -0
- package/es/components/iho-table/src/IhoTable.vue.js +1 -1
- package/es/components/iho-table/src/IhoTable.vue2.js +1 -0
- package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue.js +1 -1
- package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue2.js +1 -0
- package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.js +1 -1
- package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue2.js +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue2.js +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue2.js +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue2.js +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/pictureRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/varialbleHeightPlugin/index.js +1 -1
- package/es/components/iho-table/src/utils/index.js +1 -1
- package/es/components/index.css +1 -1
- package/es/components/info-header/src/InfoHeader.vue.js +1 -1
- package/es/components/info-header/src/InfoHeader.vue2.js +1 -0
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.js +1 -1
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue2.js +1 -0
- package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.js +1 -1
- package/es/components/info-header/src/components/infoDescription/DescriptionList.vue2.js +1 -0
- package/es/components/info-header/src/components/infoDescription/HiddenContent.vue.js +1 -1
- package/es/components/info-header/src/components/infoDescription/HiddenContent.vue2.js +1 -0
- package/es/components/info-header/src/components/infoDescription/InfoEllipsis.vue.js +1 -1
- package/es/components/info-header/src/components/infoDescription/InfoEllipsis.vue2.js +1 -0
- package/es/components/info-header/src/components/infoDescription/index.vue.js +1 -1
- package/es/components/info-header/src/components/infoDescription/index.vue2.js +1 -0
- package/es/components/info-header/src/components/patientInfo/index.vue.js +1 -1
- package/es/components/info-header/src/components/patientInfo/index.vue2.js +1 -0
- package/es/components/keyboard/src/Keyboard.vue.js +1 -1
- package/es/components/keyboard/src/Keyboard.vue2.js +1 -0
- package/es/components/keyboard/src/components/InputNumber.vue.js +1 -1
- package/es/components/keyboard/src/components/InputNumber.vue2.js +1 -0
- package/es/components/keyboard/src/components/NumberPanel.vue.js +1 -1
- package/es/components/keyboard/src/components/NumberPanel.vue2.js +1 -0
- package/es/components/map/src/Map.vue.js +1 -1
- package/es/components/map/src/Map.vue2.js +1 -0
- package/es/components/picture-clipper/src/PictureClipper.vue.js +1 -1
- package/es/components/picture-clipper/src/PictureClipper.vue2.js +1 -0
- package/es/components/quick-search/src/index.vue.js +1 -1
- package/es/components/quick-search/src/index.vue2.js +1 -0
- package/es/components/recommend-search/src/RecommendSearch.vue.js +1 -1
- package/es/components/recommend-search/src/RecommendSearch.vue2.js +1 -0
- package/es/components/recommend-search/src/components/RecommendInput.vue.js +1 -1
- package/es/components/recommend-search/src/components/RecommendInput.vue2.js +1 -0
- package/es/components/recommend-search/src/components/RecommendMenu.vue.js +1 -1
- package/es/components/recommend-search/src/components/RecommendMenu.vue2.js +1 -0
- package/es/components/recommend-search/src/components/RecommendSelect.vue.js +1 -1
- package/es/components/recommend-search/src/components/RecommendSelect.vue2.js +1 -0
- package/es/components/scale-view/src/ScaleView.vue.js +1 -1
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -0
- package/es/components/scale-view/src/components/AnswerParse.vue.js +1 -1
- package/es/components/scale-view/src/components/AnswerParse.vue2.js +1 -0
- package/es/components/scale-view/src/components/EvaluateCountdown.vue.js +1 -1
- package/es/components/scale-view/src/components/EvaluateCountdown.vue2.js +1 -0
- package/es/components/scale-view/src/components/EvaluatePage.vue.js +1 -1
- package/es/components/scale-view/src/components/EvaluatePage.vue2.js +1 -0
- package/es/components/scale-view/src/components/LoadingCom.vue.js +1 -1
- package/es/components/scale-view/src/components/NoData.vue.js +1 -1
- package/es/components/scale-view/src/components/NoData.vue2.js +1 -0
- package/es/components/search-cascader/src/SearchCascader.vue.js +1 -1
- package/es/components/search-cascader/src/SearchCascader.vue2.js +1 -0
- package/es/components/search-cascader/src/components/SearchMenu.js +1 -1
- package/es/components/select-label/src/LabelFormContent.vue.js +1 -1
- package/es/components/select-label/src/LabelFormContent.vue2.js +1 -0
- package/es/components/select-label/src/SelectLabel.vue.js +1 -1
- package/es/components/select-label/src/components/label-classify.vue.js +1 -1
- package/es/components/select-label/src/components/label-classify.vue2.js +1 -0
- package/es/components/select-person/src/SearchMultiple.vue.js +1 -1
- package/es/components/select-person/src/SelectPerson.vue.js +1 -1
- package/es/components/shortcut-provider/src/ShortcutProvider.vue.js +1 -1
- package/es/components/shortcut-provider/src/ShortcutProvider.vue2.js +1 -0
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.js +1 -1
- package/es/components/shortcut-setter/src/ShortcutSetter.vue2.js +1 -0
- package/es/components/shortcut-setter/src/ShortcutSetterItem.vue.js +1 -1
- package/es/components/shortcut-setter/src/ShortcutSetterItem.vue2.js +1 -0
- package/es/components/steps-wheel/src/StepsWheel.vue.js +1 -1
- package/es/components/steps-wheel/src/StepsWheel.vue2.js +1 -0
- package/es/components/steps-wheel/style/index.css +1 -1
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue2.js +1 -0
- package/es/components/table-filter/src/components/classify-filter/components/Date.vue.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/Date.vue2.js +1 -0
- package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue2.js +1 -0
- package/es/components/table-filter/src/components/classify-filter/components/InputFilter.vue.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/InputFilter.vue2.js +1 -0
- package/es/components/table-filter/src/components/classify-filter/components/InputNumber.vue.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/InputNumber.vue2.js +1 -0
- package/es/components/table-filter/src/components/classify-filter/components/InputNumberGroup.vue.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/InputNumberGroup.vue2.js +1 -0
- package/es/components/table-filter/src/components/classify-filter/components/SelectDynamic.vue.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/SelectDynamic.vue2.js +1 -0
- package/es/components/table-filter/src/components/classify-filter/components/SelectFilter.vue.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/SelectFilter.vue2.js +1 -0
- package/es/components/table-filter/src/components/classify-filter/components/SelectLabel.vue.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/SelectLabel.vue2.js +1 -0
- package/es/components/table-filter/src/components/classify-filter/index.vue.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/index.vue2.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/CheckboxGroup.vue.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/CheckboxGroup.vue2.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/Date.vue.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/Date.vue2.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue2.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue2.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/InputNumberGroup.vue.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/InputNumberGroup.vue2.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/LabelInner.vue.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/LabelInner.vue2.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/LabelOut.vue.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/LabelOut.vue2.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/Select.vue.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/Select.vue2.js +1 -0
- package/es/components/table-filter/src/components/render-widget/index.vue.js +1 -1
- package/es/components/table-filter/src/directive/resize.js +1 -1
- package/es/components/time-line/src/TimeLine.vue.js +1 -1
- package/es/components/time-line/src/TimeLine.vue2.js +1 -0
- package/es/components/time-picker/src/TimePicker.vue.js +1 -1
- package/es/components/time-picker/src/TimePicker.vue2.js +1 -0
- package/es/components/vod-chunk-upload/src/chunk-upload-new.vue.js +1 -1
- package/es/components/vod-chunk-upload/src/chunk-upload-new.vue2.js +1 -0
- package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue.js +1 -1
- package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue2.js +1 -0
- package/es/shared/assets/img/failure.png.js +1 -1
- package/es/shared/assets/img/no-permission.png.js +1 -1
- package/es/shared/assets/img/nodata.png.js +1 -1
- package/es/shared/assets/img/notfound.png.js +1 -1
- package/es/shared/assets/img/qr.png.js +1 -1
- package/es/shared/assets/img/success.png.js +1 -1
- package/es/shared/assets/img/video.png.js +1 -1
- package/es/shared/assets/img/video_default_cover.png.js +1 -1
- package/es/shared/assets/img/xb_big.png.js +1 -1
- package/es/shared/assets/img/xb_small.png.js +1 -1
- package/es/shared/components/SelectPage/SelectPage.vue.js +1 -1
- package/es/shared/components/SelectPage/SelectPage.vue2.js +1 -0
- package/es/shared/components/SvgIcon/SvgIcon.vue.js +1 -1
- package/es/shared/components/SvgIcon/SvgIcon.vue2.js +1 -0
- package/es/shared/components/TextOverTooltip/TextOverTooltip.vue.js +1 -1
- package/es/shared/components/TextOverTooltip/TextOverTooltip.vue2.js +1 -0
- package/es/shared/components/no-data/NoData.vue.js +1 -1
- package/es/shared/components/no-data/NoData.vue2.js +1 -0
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
- package/es/components/form-render/src/components/renderer/dist/levelSearchCascader.d.ts +0 -77
- package/es/components/form-render/src/components/renderer/dist/searchCascade.d.ts +0 -93
- package/es/components/iho-table/src/plugins/dist/highLightSetPlugin.d.ts +0 -3
- package/es/components/iho-table/src/plugins/filterRenderPlugin/dist/index.d.ts +0 -3
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/dist/index.d.ts +0 -3
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/dist/defaultRendererPlugin.d.ts +0 -3
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/dist/seqRendererPlugin.d.ts +0 -3
- package/es/components/iho-table/src/plugins/varialbleHeightPlugin/dist/index.d.ts +0 -3
- package/es/components/iho-table/src/utils/dist/index.d.ts +0 -44
- package/es/components/scale-view/src/components/formitem/dist/r-address.d.ts +0 -36
- package/es/components/scale-view/src/components/formitem/dist/r-sign.d.ts +0 -36
- package/es/components/scale-view/src/components/formitem/dist/standard-modal.d.ts +0 -82
- package/es/components/search-cascader/src/components/dist/SearchMenu.d.ts +0 -57
- package/es/components/search-cascader/src/components/dist/SearchMenu1.d.ts +0 -57
- package/es/shared/assets/img/failure.d.ts +0 -2
- package/es/shared/assets/img/failure.js +0 -1
- package/es/shared/assets/img/icon-asc.d.ts +0 -2
- package/es/shared/assets/img/icon-asc.js +0 -1
- package/es/shared/assets/img/icon-desc.d.ts +0 -2
- package/es/shared/assets/img/icon-desc.js +0 -1
- package/es/shared/assets/img/no-permission.d.ts +0 -2
- package/es/shared/assets/img/no-permission.js +0 -1
- package/es/shared/assets/img/nodata.d.ts +0 -2
- package/es/shared/assets/img/nodata.js +0 -1
- package/es/shared/assets/img/notfound.d.ts +0 -2
- package/es/shared/assets/img/notfound.js +0 -1
- package/es/shared/assets/img/qr.d.ts +0 -2
- package/es/shared/assets/img/qr.js +0 -1
- package/es/shared/assets/img/success.d.ts +0 -2
- package/es/shared/assets/img/success.js +0 -1
- package/es/shared/assets/img/video.d.ts +0 -2
- package/es/shared/assets/img/video.js +0 -1
- package/es/shared/assets/img/video_default_cover.d.ts +0 -2
- package/es/shared/assets/img/video_default_cover.js +0 -1
- package/es/shared/assets/img/video_hover.d.ts +0 -2
- package/es/shared/assets/img/video_hover.js +0 -1
- package/es/shared/assets/img/video_play_hover.d.ts +0 -2
- package/es/shared/assets/img/video_play_hover.js +0 -1
- package/es/shared/assets/img/xb_big.d.ts +0 -2
- package/es/shared/assets/img/xb_big.js +0 -1
- package/es/shared/assets/img/xb_small.d.ts +0 -2
- package/es/shared/assets/img/xb_small.js +0 -1
- /package/es/_virtual/{plugin-vue_export-helper.js → _plugin-vue_export-helper.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"./filter.vue2.js";import r from"../../../../../_virtual/_plugin-vue_export-helper.js";var t=r(e,[["__file","filter.vue"]]);export{t as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as e,reactive as a,openBlock as t,createBlock as l,unref as o}from"vue";import n from"../../../../date-picker/index.js";import{subDays as r,subMonths as i}from"date-fns";var d=e({__name:"filter",props:{payload:{type:Object,required:!0}},setup(e){var d,p,u;const m=e,f=a((null==(u=null==(p=null==(d=m.payload)?void 0:d.column)?void 0:p.filters)?void 0:u[0])||{data:void 0}),v=a({"近一周":()=>[r(new Date,7).getTime(),(new Date).getTime()],"近一个月":()=>[i(new Date,1).getTime(),(new Date).getTime()]});function c(e,a){var t;f.value=a,(null==(t=m.payload)?void 0:t.$panel)&&(m.payload.$panel.changeOption(null,!!a,f),m.payload.$panel.confirmFilter(new CustomEvent("click")))}return(e,a)=>(t(),l(o(n),{type:"datetimerange",panel:"",clearable:"","default-time":["00:00:00","23:59:59"],"formatted-value":f.data,"onUpdate:formatted-value":a[0]||(a[0]=e=>f.data=e),shortcuts:v,onConfirm:c},null,8,["formatted-value","shortcuts"]))}});export{d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"./filter.vue2.js";import r from"../../../../../_virtual/_plugin-vue_export-helper.js";var t=r(e,[["__file","filter.vue"]]);export{t as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as e,computed as l,inject as a,ref as t,onDeactivated as u,openBlock as n,createElementBlock as o,unref as r,createBlock as i,createCommentVNode as v,createElementVNode as s,createVNode as c,isRef as d,withCtx as p,normalizeStyle as f,Fragment as h,renderList as m,toDisplayString as y,createTextVNode as _}from"vue";import{widthAppend as b}from"../../../../../shared/utils/index.js";import{useVirtualList as g}from"@vueuse/core";import{isNumber as k}from"lodash-es";import{NInput as C,NCheckbox as $,NCheckboxGroup as S,NButtonGroup as x,NButton as L}from"naive-ui";const U={class:"iho-table__filterWrapper"},j={class:"iho-table__filterListItem"},w={class:"iho-table__filterFooter"};var E=e({__name:"filter",props:{payload:{type:Object,required:!0}},setup(e){const E=e,F=l((()=>{var e,l,a;return null!=(a=null==(l=null==(e=E.payload)?void 0:e.column)?void 0:l.filters)?a:[]})),I=l({get:()=>F.value.reduce(((e,l)=>(l.checked&&e.push(l.value),e)),[]),set(e){if(E.payload)return F.value.forEach((l=>{E.payload.$panel.changeOption(null,e.includes(l.value),l)})),E.payload.$panel.confirmFilter(new CustomEvent("click"))}}),O=a("$xetable"),P=t([...I.value]),W=t("");function q(){O&&(O.reactData.filterStore.visible=!1)}u(q);const z=l((()=>{var e,l;if(!E.payload||!E.payload.column)return 10;const{filterCapacity:a}=null!=(l=null==(e=E.payload.column.editRender)?void 0:e.props)?l:{};return k(a)&&a>0?a:10})),{list:D,containerProps:H,wrapperProps:R}=g(l((()=>W.value?F.value.filter((e=>`${e.label}`.includes(W.value))):F.value)),{itemHeight:32,overscan:3}),A=l((()=>!!P.value.length&&P.value.length!==F.value.length)),B=l({get:()=>P.value.length===F.value.length&&0!==F.value.length,set:e=>{P.value=e?F.value.map((e=>e.value)):[]}}),G=l((()=>({...H.style,height:b(32*z.value)})));function J(){I.value=P.value,q()}function K(){P.value=[]}return(e,l)=>(n(),o("section",U,[r(F).length>5?(n(),i(r(C),{key:0,value:W.value,"onUpdate:value":l[0]||(l[0]=e=>W.value=e)},null,8,["value"])):v("v-if",!0),s("div",j,[c(r($),{label:"全选",checked:r(B),"onUpdate:checked":l[1]||(l[1]=e=>d(B)?B.value=e:null),indeterminate:r(A)},null,8,["checked","indeterminate"])]),c(r(S),{value:P.value,"onUpdate:value":l[3]||(l[3]=e=>P.value=e)},{default:p((()=>[s("section",{ref:r(H).ref,style:f(r(G)),onScroll:l[2]||(l[2]=(...e)=>r(H).onScroll&&r(H).onScroll(...e)),class:"iho-table__filterListWrapper"},[s("section",{style:f(r(R).style)},[(n(!0),o(h,null,m(r(D),(e=>(n(),o("div",{class:"iho-table__filterListItem",key:e.data.value},[c(r($),{value:e.data.value,label:e.data.label},null,8,["value","label"])])))),128))],4)],36)])),_:1},8,["value"]),s("footer",w,[s("section",null,y(`已选择${P.value.length}项`),1),c(r(x),{size:"small"},{default:p((()=>[c(r(L),{onClick:K},{default:p((()=>[_("清空")])),_:1}),c(r(L),{onClick:q},{default:p((()=>[_("取消")])),_:1}),c(r(L),{type:"primary",onClick:J},{default:p((()=>[_("确定")])),_:1})])),_:1})])]))}});export{E as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"./editDate.vue2.js";import t from"../../../../../../../_virtual/_plugin-vue_export-helper.js";var r=t(e,[["__file","editDate.vue"]]);export{r as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as e,useAttrs as t,ref as r,computed as i,openBlock as a,createBlock as o,unref as s,mergeProps as n,isRef as u}from"vue";import{generateTimeFormat as l}from"../../../../../../../shared/utils/index.js";import{isFunction as m}from"lodash-es";import{useIhoTableFormEvent as d}from"../../../../utils/index.js";import p from"../../../../../../date-picker/index.js";var c=e({__name:"editDate",props:{value:{type:String,default:void 0},column:{type:Object,required:!0},row:{type:Object,required:!0},rowIndex:{type:Number,required:!0}},emits:["update:value"],setup(e,{emit:c}){const f=e,w=t(),{emitFormChangeWithParams:D}=d(f),v=r(),y=i({get:()=>f.value,set(e){const t=f.value;t!==e&&(c("update:value",e),D({oldValue:t}))}}),b=i((()=>{const e=w.valueFormat||"yyyy-MM-dd HH:mm:ss";return{valueFormat:e,format:e,timePickerProps:{format:l(e)}}})),{isStartDate:g=!1,isEndDate:h=!1}=w,T=w.connectField||"",$=(e,t)=>g&&T?e>t:!(!h||!T)&&e<t,j=e=>{const t=new Date(f.row[T]),r=new Date(e),{h:i,m:a,s:o}=H(t),s=(e,t,r,i)=>!(h&&r>i)&&(!(g&&r<i)&&$(e,t));return{isHourDisabled:t=>{if(!f.row[T])return!1;const a=new Date(`${f.row[T].split(" ")[0]} 00:00:00`).getTime(),{m:o,s:n}=H(r);return s(t,i,e-60*t*60*1e3-60*o*1e3-1e3*n,a)},isMinuteDisabled:t=>{if(!f.row[T])return!1;const o=new Date(`${f.row[T].split(" ")[0]} ${i}:00:00`).getTime(),{s:n}=H(r);return s(t,a,e-60*t*1e3-1e3*n,o)},isSecondDisabled:t=>{if(!f.row[T])return!1;const r=new Date(`${f.row[T].split(" ")[0]} ${i}:${a}:00`).getTime();return s(t,o,e-1e3*t,r)}}},x={type:w.type||"datetime",clearable:!0,placeholder:w.placeholder||"请选择",...w,...b.value,isDateDisabled:F(w.isDateDisabled)||(e=>!!f.row[T]&&$(e,h?new Date(`${f.row[T].split(" ")[0]} 00:00:00`).getTime():new Date(f.row[T]).getTime()))};function F(e){return m(e)?t=>e(t,f.row):null}function H(e){return{h:e.getHours(),m:e.getMinutes(),s:e.getSeconds()}}return x.type.includes("time")&&(x.isTimeDisabled=F(w.isTimeDisabled)||j),(e,t)=>(a(),o(s(p),n({ref_key:"formRef",ref:v},s(x),{"formatted-value":s(y),"onUpdate:formatted-value":t[0]||(t[0]=e=>u(y)?y.value=e:null)}),null,16,["formatted-value"]))}});export{c as default};
|
package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{createVNode as e,mergeProps as l,defineComponent as r,computed as o}from"vue";import{isNumber as t}from"lodash-es";import{NInputNumber as n}from"naive-ui";import"../../../../index.js";import{EDITABLE_WIDGET_TYPE as u}from"../../../constants/index.js";import{IhoTableRenderHelper as a}from"../../../utils/index.js";import{defineTablePlugin as i}from"../../../hooks/useTablePlugin.js";const d=r({name:"IhoTableInputNumber",props:{value:[String,Number]},emits:["update:value"],setup(l,{emit:r}){const u=o({get:()=>t(l.value)?l.value:l.value&&t(+l.value)?+l.value:null,set(e){r("update:value",e)}});return()=>e(n,{value:u.value,"onUpdate:value":e=>u.value=e},null)}});function m(){return i({name:"numberRendererPlugin",vxe(r){r.renderer.add(u.NUMBER,{renderCell:a.createDefaultRenderCell(),renderEdit:a.createRenderEdit((({row:r,column:o,fieldItem:t,emitFormClick:n,emitFormChangeWithParams:u})=>{const{placeholder:a="请输入"}=t.componentProps||{},i={clearable:!0,placeholder:a,onBlur:()=>u({type:"blur",oldValue:r[o.field]}),onUpdateValue:e=>{const l=r[o.field];r[o.field]=e,u({oldValue:l})},onClick:n};return[e(d,l({value:r[o.field],"onUpdate:value":e=>r[o.field]=e},i,t.componentProps),null)]}))})}})}export{m as numberRendererPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"./editSeparate.vue2.js";import r from"../../../../../../../_virtual/_plugin-vue_export-helper.js";var t=r(e,[["__file","editSeparate.vue"]]);export{t as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as e,inject as a,ref as t,watch as o,computed as u,onDeactivated as l,openBlock as r,createBlock as n,unref as i,withCtx as s,createElementVNode as p,withModifiers as d,normalizeStyle as v,toDisplayString as c,renderSlot as m,createVNode as f}from"vue";import{cloneDeep as h,isObject as w,isArray as y}from"lodash-es";import{NPopover as g,NInput as b}from"naive-ui";import{InjectionIhoTableHandler as x}from"../../../../constants/index.js";import{useIhoTableFormEvent as k}from"../../../../utils/index.js";const _=["onClick"];var C=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:C}){const j=e,U=a(x),q=t(),P=t();function S(e){P.value=e}const T=t(!1);function I(e){T.value=e}function N(e){T.value=!T.value,C("click",e)}o(T,(function(e){e?async function(){var e;P.value=h(j.value),await new Promise((e=>setTimeout(e))),null==(e=q.value)||e.syncPosition()}():R()}));const{emitFormChangeWithParams:O}=k(j);async function R(){if(!w(P.value)&&!y(P.value)&&j.value===P.value)return;const e=j.value;C("update:value",P.value),O({oldValue:e}),U.updateTableDataRef()}const z=u((()=>({border:"1px solid #f5f5f5",height:j.height-16+"px",display:"flex",alignItems:"center",padding:"0",background:"white",wordBreak:"keep-all",boxSizing:"border-box","border-radius":"4px"})));return l(R),(a,t)=>(r(),n(i(g),{ref_key:"popoverRef",ref:q,trigger:"manual",show:T.value,"onUpdate:show":t[1]||(t[1]=e=>T.value=e),"show-arrow":!1},{trigger:s((()=>[p("div",{onClick:d(N,["stop"]),style:v(i(z)),class:"iho-table__separateText"},c(e.displayContent||" "),13,_)])),default:s((()=>[m(a.$slots,"menu",{value:P.value,"onUpdate:value":S,"onUpdate:show":I,col:e.column,row:e.row},(()=>[f(i(b),{value:P.value,"onUpdate:value":t[0]||(t[0]=e=>P.value=e),type:"textarea"},null,8,["value"])]))])),_:3},8,["show"]))}});export{C as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"./editTime.vue2.js";import i from"../../../../../../../_virtual/_plugin-vue_export-helper.js";var r=i(e,[["__file","editTime.vue"]]);export{r as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as e,useAttrs as l,ref as t,watch as a,nextTick as r,openBlock as o,createBlock as u,unref as i,mergeProps as n,withCtx as m,createVNode as c,createElementBlock as d,Fragment as v,renderList as f,createTextVNode as s,toDisplayString as p,createCommentVNode as k}from"vue";import{NPopover as y,NInput as _,NSpace as h,NScrollbar as w,NButton as b}from"naive-ui";import{useIhoTableFormEvent as g}from"../../../../utils/index.js";import V from"../../../../../../time-picker/index.js";import{parse as C,isValid as F,format as q}from"date-fns";var j=e({__name:"editTime",props:{formattedValue:{type:String,default:void 0},column:{type:Object,required:!0},row:{type:Object,required:!0},rowIndex:{type:Number,required:!0}},emits:["update:formattedValue","click"],setup(e,{emit:j}){const x=e,I=l(),{emitFormChangeWithParams:O}=g(x),P=t(null),R=t(!1),S=t(),$=t(),A=t();let E=x.formattedValue;const{placeholder:H="请选择",valueFormat:U="HH:mm",shortcutOptions:z=[]}=I,D={placeholder:H,valueFormat:U,format:U};function K(e){A.value=e,E!==e&&(j("update:formattedValue",e),O({oldValue:E}),E=e)}function N(){[D.valueFormat.replace(/:/,""),D.valueFormat].some((e=>{const l=C(($.value||"").trim(),e,new Date);if(F(l)){return K(q(l,D.valueFormat)),!0}}))}function T(e){var l;const{key:t}=e;"Enter"===t&&(null==(l=P.value)||l.blur(),R.value=!1)}return a((()=>x.formattedValue),(e=>{$.value=e,A.value=e}),{immediate:!0}),a((()=>R.value),(async e=>{var l,t,a,o,u;e&&(await r(),null==(u=null==(o=null==(a=null==(t=null==(l=S.value)?void 0:l.$timePicker)?void 0:t.panelInstRef)?void 0:a.$el)?void 0:o.querySelectorAll(".n-time-picker-col"))||u.forEach((e=>{var l,t;return null==(t=null==(l=null==e?void 0:e.querySelector)?void 0:l.call(e,".n-time-picker-col__item--active"))?void 0:t.scrollIntoView()})))})),(e,l)=>(o(),u(i(y),n({show:R.value,trigger:"click",showArrow:!1,placement:"bottom-start",style:{padding:"0"}},e.$attrs,{onClickoutside:l[3]||(l[3]=()=>R.value=!1)}),{trigger:m((()=>[c(i(_),{ref_key:"formRef",ref:P,clearable:"",value:$.value,"onUpdate:value":l[0]||(l[0]=e=>$.value=e),onClick:l[1]||(l[1]=()=>R.value=!0),onChange:N,onKeydown:T},null,8,["value"])])),default:m((()=>[c(i(h),null,{default:m((()=>[c(i(V),n({ref_key:"timePickerRef",ref:S,show:"","formatted-value":A.value},i(D),{class:"iho-table__time-picker",to:!1,"onUpdate:formattedValue":K,onConfirm:l[2]||(l[2]=()=>R.value=!1)}),null,16,["formatted-value"]),c(i(w),{class:"iho-table__scrollbar"},{default:m((()=>[i(z).length?(o(),u(i(h),{key:0,vertical:"",wrap:!1},{default:m((()=>[(o(!0),d(v,null,f(i(z),(e=>(o(),u(i(b),{size:"tiny",key:e,onClick:l=>function(e){K(e),R.value=!1}(e)},{default:m((()=>[s(p(e),1)])),_:2},1032,["onClick"])))),128))])),_:1})):k("v-if",!0)])),_:1})])),_:1})])),_:1},16,["show"]))}});export{j as default};
|
package/es/components/iho-table/src/plugins/rendererPlugins/widgets/pictureRendererPlugin.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{createVNode as e,defineComponent as r,watch as t,onBeforeUnmount as n}from"vue";import{jsonParse as i,arrayed as o}from"../../../../../../shared/utils/index.js";import"../../../../index.js";import{WIDGET_TYPE as s}from"../../../constants/index.js";import{getRowHeight as l,IhoTableWarn as u}from"../../../utils/index.js";import d from"viewerjs";import"viewerjs/dist/viewer.css";import{defineTablePlugin as m}from"../../../hooks/useTablePlugin.js";function a(){return m({name:"pictureRendererPlugin",vxe(r){function t(r){return{renderCell(t,{row:n,column:s}){try{if(!n[s.field])return[];const t=i(n[s.field]),u=l()-16;return[e("section",{style:"display:flex;justify-content:center"},[e(p,{style:{width:u+"px",height:u+"px",...r},images:o(t).map((e=>e.url))},null)])]}catch(e){return u(`invalid ${t.name} value of field(${s.field}): ${n[s.field]}`),[]}}}}r.renderer.add(s.PICTURE,t({})),r.renderer.add(s.HEADPORTRAIT,t({"border-radius":"50%"}))}})}const p=r({name:"ViewerImage",props:{images:{type:Array,default:()=>[]},options:{type:Object,default:()=>({})}},setup(r){let i=null;function o(){if(i)return i.show();const e=document.createElement("section");r.images.map((r=>e.appendChild(function(e){const r=new Image;return r.src=e,r}(r)))),i=new d(e,r.options).show()}return t([()=>r.images,()=>r.options],(()=>{null==i||i.destroy(),i=null}),{deep:!0}),n((()=>null==i?void 0:i.destroy())),()=>e("img",{style:"cursor:pointer",alt:"",src:r.images[0],onClick:o},null)}});export{a as pictureRendererPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{unref as e,createVNode as t,onBeforeUnmount as o,shallowReactive as l,defineComponent as n,inject as r,ref as a,computed as s,provide as i,watch as u,onMounted as d,h as c}from"vue";import{traverse as p,widthAppend as f}from"../../../../../shared/utils/index.js";import{doAnimation as m}from"../../../../../shared/utils/anime.js";import{useThrottleFn as h}from"@vueuse/core";import{promiseTimeout as g}from"@vueuse/shared";import{last as v,isFunction as x,omit as I,isNumber as b}from"lodash-es";import"../../../index.js";import{WIDGET_TYPE as w,InjectionIhoTableUUID as y}from"../../constants/index.js";import{useUUIDMap as T}from"../../utils/index.js";import{defineTablePlugin as H}from"../../hooks/useTablePlugin.js";class R{constructor(){this.records={},this.maxRecords=l(new Map)}set(e,t,o){if(this.records[e]||(this.records[e]={}),this.records[e][t]===o)return;this.records[e][t]=o;const l=Math.max(...Object.values(this.records[e]),0);this.maxRecords.get(e)!==l&&this.maxRecords.set(e,l)}getMax(e){return this.maxRecords.get(e)||0}}const{getItemFromUUID:D,removeItemFromUUID:M}=T((()=>new R),!0),{getItemFromUUID:S,removeItemFromUUID:U,setItemFromUUID:C}=T((()=>null)),{getItemFromUUID:$,removeItemFromUUID:E,setItemFromUUID:k}=T((()=>{})),F=n({props:{payload:{type:Object,required:!0}},setup(e){const o=r(y),l=r("$xetable"),n=a(),p=D(o),m=s((()=>e.payload.row[e.payload.column.field]));function h(){const{row:t,column:o}=e.payload,r=l.getRowSeq(t);if(!p||null==r||!n.value)return;const a=n.value.clientHeight;p.set(r,o.field,a)}i("updateCellHeight",h),u([()=>e.payload.rowIndex,()=>e.payload.column.field,m,()=>e.payload.column.renderWidth],(async()=>{await g(0),h()})),d((()=>{l&&!S(o)&&C(o,l),h()}));const v=s((()=>{var t,o,l,n;const r=null!=(o=null==(t=e.payload.column.editRender)?void 0:t.props)?o:{},a=null!=(n=null==(l=r.slots)?void 0:l.default)?n:r.slotFn;return x(a)?a:()=>m.value})),I=s((()=>{if(e.payload.column.treeNode)return"";const t=e.payload.column.renderWidth;return b(t)&&t>0?f(t-20-2):""}));return()=>t("div",{ref:n,style:{padding:"7px 0",width:I.value,overflow:"hidden"}},[c(v.value,e.payload)])}});function j(t,o,{scrollTop:l=0}){var n,r;const{uuid:a,rowConfig:s={}}=o;if(!a)return;const i=D(a),{oSize:u=0,gt:d=100}=null!=(n=$(a))?n:{},{internalData:c,reactData:p}=t,{scrollYStore:f,elemStore:m,afterFullData:h,fullDataRowIdData:g}=c;if(d>h.length)return;const I=null!=(r=s.height)?r:36,b=m["main-body-wrapper"],w=b?e(b):null;let y=w?Math.max(8,Math.ceil(w.clientHeight/I)+2+u):8;const T=[0];let H=0;if(l&&h.find(((e,o)=>{const n=t.getRowSeq(e),r=(v(T)||0)+Math.max(I,i.getMax(n));if(T.push(r),r>l)return H=Math.max(0,o-u),y+=Math.min(H,u),!0})),H>0&&x(o.spanMethod)){const{spanMethod:e}=o,l={rowspan:1,colspan:1};for(;H>0;){if(!t.getColumns().some(((t,o)=>{const{rowspan:n,colspan:r}=e({column:t,columnIndex:o,$columnIndex:o,row:h[H],rowIndex:H,$rowIndex:H,_rowIndex:H,isHidden:!t.visible,fixed:t.fixed,type:t.type,visibleData:h})||l;if(0===n&&0===r)return H--,!0})))break}}const R=`${T[H]}px`,M=`${h.reduce(((e,o)=>{const l=t.getRowSeq(o);return e+Math.max(I,i.getMax(l))}),0)}px`;["main","left","right"].forEach((t=>{const o=m[`${t}-body-table`],n=o?e(o):null;n&&(n.style.marginTop=R,n.scrollTop=l),["header","body","footer"].forEach((o=>{const l=m[`${t}-${o}-ySpace`],n=l?e(l):null;n&&(n.style.height=M)}))}));const S=Math.min(h.length,H+y);if(f.startIndex===H&&f.endIndex===S)return;f.startIndex=H,f.endIndex=S;const U=h.slice(f.startIndex,f.endIndex);U.forEach(((e,o)=>{const l=t.getRowid(e),n=g[l];n&&(n.$index=o)})),p.tableData.length=0,p.tableData.push(...U)}const L=h(j,300);function Y(){const l="variableHeightRendererPlugin";return H({name:l,vxe(e){e.renderer.add(w.VARIABLE_HEIGHT,{renderCell:(e,o)=>t(F,{payload:o},null)})},apply(t){function n(t){const o=S(t.uuid);if(!o)return;t.scrollY={enabled:!1},o.reactData.scrollYLoad=!1;const l=function(t){const o=t.internalData.elemStore["main-body-wrapper"];return o?e(o):null}(o);l&&j(o,t,{scrollTop:l.scrollTop})}function r(e){if(!e.uuid)return;const t=$(e.uuid);t&&(e.scrollY=t),setTimeout((()=>n(e)),300)}t.dataHooks.dataStart.tap(l,r),t.eventHooks.onFilterChange.tap(l,((e,t)=>r(t))),t.eventHooks.onSortChange.tap(l,((e,t)=>r(t))),t.eventHooks.onToggleTreeExpand.tap(l,((e,t)=>r(t))),t.eventHooks.onResizableChange.tap(l,(async({column:e},t)=>{if(!e.editRender||!e.editRender.props)return;e.editRender.props.variableHeight&&r(t)})),t.eventHooks.onScroll.tap(l,h(((e,t)=>{if(e.isX)return;const{uuid:o}=t;if(!o)return;const l=S(o);l&&j(l,t,e)}),100,!0,!0)),t.fieldHooks.field.tap(l,(e=>{if(Reflect.get(e,"variableHeight")){const t=e.slots;e.slots=I(t,["default"]),e.editRender={...e.editRender,name:w.VARIABLE_HEIGHT};const o=e.className,l="variable-height";e.className=o?function(e){return x(o)?[o(e),l]:[o,l]}:l}return e})),t.fieldHooks.fieldList.tap(l,((t,o,{$table:l})=>(o.uuid&&p(t,((r,a)=>{var s,i,u;if((null==(s=r.editRender)?void 0:s.name)===w.VARIABLE_HEIGHT){const r=null!=(u=null==(i=o.rowConfig)?void 0:i.height)?u:36,s=D(o.uuid),d=o.cellStyle;if(o.cellStyle=function(e){const t={};if(l.value){const o=Math.max(r,s.getMax(l.value.getRowSeq(e.row)));t.height=`${o}px`}return Object.assign(t,d?x(d)?d(e):d:null)},o.sortableConfig&&o.sortableConfig.enable){const t=o.sortableConfig.onEnd;o.sortableConfig.onEnd=function(l){const n=S(o.uuid);if(n){const{internalData:{elemStore:t}}=n,l=t["main-table-body"];l&&e(l)&&j(n,o,{scrollTop:e(l).scrollTop})}x(t)&&t(l)}}o.showOverflow="tooltip",p(t,(e=>{e.showOverflow="tooltip"})),o.scrollY={...o.scrollY,mode:"default"},o.onWheel=function(t){let o=null,l=0,n=!0;return function(r){if(!t.uuid)return;const a=S(t.uuid);if(!a)return;const{internalData:s}=a,{isHover:i}=t.rowConfig||{},{deltaX:u,deltaY:d}=r,{refTableLeftBody:c,refTableRightBody:p,refTableBody:f}=a.getRefMaps(),h=d,g=u,v=h<0,x=e(f),I=x?x.$el:null;if(!I)return;if(v?I.scrollTop<=0:I.scrollTop>=I.scrollHeight-I.clientHeight)return;const b=I.scrollTop+h,w=I.scrollLeft+g;if(b===s.lastScrollTop)return;r.preventDefault(),s.lastScrollTop=b,s.lastScrollLeft=w,s.lastScrollTime=Date.now(),i&&a.clearHoverRow();const y=c.value,T=p.value,H=y?y.$el:null,R=T?T.$el:null,D=Math.min(100,Math.abs(Math.floor(h/2)));n&&(l=I.scrollTop,n=!1),l+=D*(v?-1:1),o&&o(),o=m(I.scrollTop,l,400,(e=>{I.scrollTop=e,H&&(H.scrollTop=e),R&&(R.scrollTop=e)}),"easeOutCubic",(()=>{l=I.scrollTop,n=!0})),L(a,t,I)}}(o),setTimeout((()=>{k(o.uuid,o.scrollY),n(o)}),300),a()}})),t))),t.setupHooks.setup.tap(l,(e=>{o((()=>{e.value.uuid&&(M(e.value.uuid),U(e.value.uuid),E(e.value.uuid))}))}))}})}export{Y as variableHeightRendererPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{reactive as e,inject as n,unref as t,toRaw as r,createVNode as i}from"vue";import{jsonParse as o,arrayed as u,findAncestor as l}from"../../../../shared/utils/index.js";import{promiseTimeout as c}from"@vueuse/shared";import{isNumber as a,
|
|
1
|
+
import{reactive as e,inject as n,unref as t,toRaw as r,createVNode as i}from"vue";import{jsonParse as o,arrayed as u,findAncestor as l}from"../../../../shared/utils/index.js";import{promiseTimeout as c}from"@vueuse/shared";import{isNumber as a,isString as d,isObject as s,isArray as f,cloneDeep as m}from"lodash-es";import{InjectionIhoTableConfig as p,InjectionIhoTableEmits as v,IHO_TABLE_STRING_STATUS as g,IHO_TABLE_NUMBER_STATUS as E,IHO_TABLE_TREE_TYPE as I}from"../constants/index.js";function h(e){return console.warn(`[IhoTable]: ${e}`)}const T=Object.freeze({getCellType(e){var n;return((null==(n=e.settingObj)?void 0:n.attr)||e.formType||"DEFAULT").toUpperCase()}});function C(){var e,t,r;const i=n(p);return i||h("this function(getRowHeight) only can be used in setup environment"),null!=(r=null==(t=null==(e=null==i?void 0:i.value)?void 0:e.rowConfig)?void 0:t.height)?r:32}function R(e){const n=e.slice(2);return`${n[0].toLowerCase()}${n.slice(1)}`}function S(e){return`on${e[0].toUpperCase()}${e.slice(1)}`}function w(n,t=!0){const r=t?e(new Map):new Map;return{getItemFromUUID:function(e){return r.set(e,r.get(e)||n()).get(e)},setItemFromUUID:function(e,n){r.set(e,n)},removeItemFromUUID:function(e){r.delete(e)}}}async function O(e,n){return r()||await c(0),r()||function(){const n=+e.colWidth;return a(n)?n:64}();function r(){var r,i;return null==(i=null==(r=t(n))?void 0:r.getColumnByField(e.field))?void 0:i.renderWidth}}function F(e){const t=n(v);function i(){var n;return{value:e.row[e.column.field],row:e.row,column:{...e.column,...null==(n=e.column.editRender)?void 0:n.props},index:e.rowIndex>-1?e.rowIndex:e.$rowIndex}}function o(e={}){t("formChange",{...i(),...m(r(e))})}function u(e={}){t("formClick",{...i(),...m(r(e))})}return{emitFormChange:function(){o()},emitFormClick:function(){u()},emitFormChangeWithParams:o,emitFormClickWithParams:u}}const P=Object.freeze({createDefaultRenderCell:function(){return function(e,{row:n,column:t}){return[i("span",null,[n[t.field]])]}},createRenderEdit:function(e){return function({props:n},t){return e({...t,fieldItem:n||{},...F(t)})}},isEditableColumn(e,n){var t;return!1!==(null==(t=e.editConfig)?void 0:t.showIcon)&&n.editRender&&!1!==n.editRender.enabled},hasFilter(e){if(y(e))return!0;let n=e.fieldSetting;return d(n)&&(n=o(n||"")),s(n)&&((t=n).notParticipatingSearch!==g.POSITIVE&&"manual"===(null==(r=t.mapping)?void 0:r.type));var t,r},hasDateFiler(e){var n;return null==(n=null==e?void 0:e.filterSetting)?void 0:n.daterange}}),A=Object.freeze({isPositive:e=>e===E.POSITIVE||e===g.POSITIVE,isNegative:e=>e===E.NEGATIVE||e===g.NEGATIVE,notPositive:e=>e!==E.POSITIVE&&e!==g.POSITIVE,notNegative:e=>e!==E.NEGATIVE&&e!==g.NEGATIVE}),N=(e,n)=>({$event:t,column:r})=>{var i;if(!u(e).includes(null==(i=r.editRender)?void 0:i.name))return!0;const o=null==t?void 0:t.target;return!s(o)||!l(o,n)};function V(e){return[I.TRANSFORM_WITH_SPAN_METHOD,I.TRANSFORM_TREE_TYPE].includes(`${e.isTree}`)}function $(e){return d(e)&&!!e.match(/^###\{[^{}]+}$/)}function x(e){try{return JSON.parse(e.replace(/^###/,""))}catch(e){return{}}}function U(e,n){if(e.$__SEPARATE||!n.editRender||!n.editRender.props)return e[n.field];const{fieldSetting:t}=n.editRender.props;if(!d(t))return e[n.field];const{mergedFeildExpression:r}=o(t);return r&&d(r)?r.replace(/#{(.+?)}/g,(function(n,t){let r=t?e[t.trim()]:null;$(r)&&(r=x(r).change_text);return r||(null==r?"--":r)})):e[n.field]}const b=["SEARCH","SELECT","RADIO","CHECKBOX"];function y(e){return e.notParticipatingSearch===E.NEGATIVE&&b.includes(T.getCellType(e))&&f(e.options)&&e.options.length}export{P as IhoTableRenderHelper,A as IhoTableStatusHelper,T as IhoTableUtils,h as IhoTableWarn,N as createIhoTableClearActivedInterceptor,R as eventListener2EventName,S as eventName2EventListener,O as getColumnRenderWidth,C as getRowHeight,y as isCompatibleColumn,$ as isRichContent,V as isTransformTreeType,U as parseMergeField,x as parseRichContent,F as useIhoTableFormEvent,w as useUUIDMap};
|