cnhis-design-vue 3.1.41-release.6 → 3.1.42-beta.0
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/annotation-edit/src/AnnotationEdit.js +1 -1
- package/es/components/annotation-edit/style/index.css +1 -1
- package/es/components/base-search/index.d.ts +293 -0
- package/es/components/base-search/index.js +1 -0
- package/es/components/{table-filter/src/base-search-com/BaseSearch.vue.d.ts → base-search/src/index.vue.d.ts} +26 -91
- package/es/components/base-search/src/index.vue.js +1 -0
- package/es/components/base-search/style/iconfont.ttf +0 -0
- package/es/components/base-search/style/index.css +1 -0
- package/es/components/big-table/index.d.ts +4 -3
- package/es/components/big-table/src/BigTable.vue.d.ts +4 -3
- package/es/components/big-table/src/BigTable.vue2.js +1 -1
- package/es/components/big-table/style/index.css +1 -1
- package/es/components/button-print/index.d.ts +7 -6
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +7 -6
- package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
- package/es/components/button-print/src/api.d.ts +3 -0
- package/es/components/button-print/src/api.js +1 -0
- package/es/components/button-print/src/components/EditFormat.vue.d.ts +4 -4
- package/es/components/button-print/src/components/IdentityVerification.vue.d.ts +4 -4
- package/es/components/button-print/src/utils/print.js +1 -1
- package/es/components/classification/index.d.ts +995 -0
- package/es/components/classification/index.js +1 -0
- package/es/components/{table-filter → classification}/src/components/search-filter/index.vue.d.ts +10 -93
- package/es/components/classification/src/components/search-filter/index.vue.js +1 -0
- package/es/components/{table-filter → classification}/src/components/set-classification/index.vue.d.ts +5 -130
- package/es/components/classification/src/components/set-classification/index.vue.js +1 -0
- package/es/components/{table-filter → classification}/src/components/table-modal/index.vue.d.ts +0 -42
- package/es/components/classification/src/components/table-modal/index.vue.js +1 -0
- package/es/components/classification/src/const/index.d.ts +2 -0
- package/es/components/classification/src/const/index.js +1 -0
- package/es/components/{table-filter/src/classification/Classification-com.vue.d.ts → classification/src/index.vue.d.ts} +57 -291
- package/es/components/classification/src/index.vue.js +1 -0
- package/es/components/classification/style/iconfont.ttf +0 -0
- package/es/components/classification/style/index.css +1 -0
- package/es/components/config-provider/index.d.ts +14 -0
- package/es/components/config-provider/index.js +1 -0
- package/es/components/config-provider/src/ConfigProvider.d.ts +14 -0
- package/es/components/config-provider/src/ConfigProvider.js +1 -0
- package/es/components/config-provider/src/interface.d.ts +19 -0
- package/es/components/config-provider/src/interface.js +1 -0
- package/es/components/config-provider/src/utils/index.d.ts +2 -0
- package/es/components/config-provider/src/utils/index.js +1 -0
- package/es/components/date-picker/index.d.ts +20 -0
- package/es/components/date-picker/index.js +1 -0
- package/es/components/date-picker/src/DatePicker.vue.d.ts +20 -0
- package/es/components/date-picker/src/DatePicker.vue.js +1 -0
- package/es/components/fabric-chart/index.d.ts +2 -2
- package/es/components/fabric-chart/src/FabricChart.vue.d.ts +2 -2
- package/es/components/fabric-chart/src/hooks/useBirthProcess.js +1 -1
- package/es/components/fabric-chart/src/hooks/useBirthProcessChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/useLeft.js +1 -1
- package/es/components/field-set/index.d.ts +2 -2
- package/es/components/field-set/src/FieldSet.vue.d.ts +2 -2
- package/es/components/form-config/index.d.ts +46 -37
- package/es/components/form-config/src/FormConfig.vue.d.ts +46 -37
- package/es/components/form-config/src/FormConfig.vue.js +1 -1
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +16 -16
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +19 -19
- package/es/components/form-config/src/components/FormConfigMaterialItem.d.ts +9 -1
- package/es/components/form-config/src/components/FormConfigMaterialItem.js +1 -1
- package/es/components/form-config/src/components/renderer/DefaultNode.vue.d.ts +33 -6
- package/es/components/form-config/src/components/renderer/DefaultNode.vue.js +1 -1
- package/es/components/form-config/style/index.css +1 -1
- package/es/components/form-render/index.d.ts +16 -16
- package/es/components/form-render/src/FormRender.vue.d.ts +16 -16
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +16 -16
- package/es/components/form-render/src/FormRenderWrapper.vue.js +1 -1
- package/es/components/form-render/src/components/renderer/complex.d.ts +1 -1
- package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.d.ts +1 -1
- package/es/components/form-render/src/components/renderer/lineBar/index.d.ts +1 -1
- package/es/components/form-render/src/components/renderer/radio&checkbox.d.ts +2 -2
- package/es/components/form-render/src/components/renderer/radio_checkbox.js +1 -1
- package/es/components/form-render/src/components/renderer/select.js +1 -1
- package/es/components/form-render/src/hooks/useFieldListAdaptor.d.ts +1 -1
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
- package/es/components/form-render/src/hooks/useFormRenderOptions.d.ts +4 -2
- package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
- package/es/components/form-render/style/index.css +1 -1
- package/es/components/iho-table/index.d.ts +3 -0
- package/es/components/iho-table/src/IhoTable.vue.d.ts +3 -0
- package/es/components/iho-table/src/IhoTable.vue.js +1 -1
- package/es/components/iho-table/src/constants/index.d.ts +4 -4
- package/es/components/iho-table/src/constants/index.js +1 -1
- package/es/components/iho-table/src/plugins/defaultConfigPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +20 -7
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.d.ts +18 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/labelRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/pictureRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/seqRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/virtualTreePlugin/index.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +1 -0
- package/es/components/iho-table/src/utils/index.d.ts +1 -0
- package/es/components/iho-table/src/utils/index.js +1 -1
- package/es/components/iho-table/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/index.d.ts +8 -2
- package/es/components/index.js +1 -1
- package/es/components/info-header/index.d.ts +3799 -156
- package/es/components/info-header/src/InfoHeader.vue.d.ts +3800 -156
- package/es/components/info-header/src/InfoHeader.vue.js +1 -1
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +1842 -0
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.js +1 -0
- package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +1972 -0
- package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.js +1 -0
- package/es/components/info-header/src/components/infoDescription/HiddenContent.vue.d.ts +2 -2
- package/es/components/info-header/src/components/infoDescription/InfoEllipsis.vue.d.ts +1 -1
- package/es/components/info-header/src/components/infoDescription/InfoEllipsis.vue.js +1 -1
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +2669 -139
- package/es/components/info-header/src/components/infoDescription/index.vue.js +1 -1
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +745 -0
- package/es/components/info-header/src/components/patientInfo/index.vue.js +1 -1
- package/es/components/info-header/src/constants/index.d.ts +4 -0
- package/es/components/info-header/src/constants/index.js +1 -0
- package/es/components/info-header/src/hooks/useThemeOverrides.d.ts +4 -0
- package/es/components/info-header/src/hooks/useThemeOverrides.js +1 -0
- package/es/components/info-header/src/types/index.d.ts +17 -3
- package/es/components/info-header/style/index.css +1 -1
- package/es/components/keyboard/index.d.ts +4 -2
- package/es/components/keyboard/src/Keyboard.vue.d.ts +4 -2
- package/es/components/keyboard/src/Keyboard.vue.js +1 -1
- package/es/components/keyboard/src/constants/index.d.ts +2 -0
- package/es/components/keyboard/src/constants/index.js +1 -0
- package/es/components/keyboard/style/index.css +1 -1
- package/es/components/quick-search/index.d.ts +713 -0
- package/es/components/quick-search/index.js +1 -0
- package/es/components/{table-filter/src/quick-search/QuickSearch.vue.d.ts → quick-search/src/index.vue.d.ts} +31 -120
- package/es/components/quick-search/src/index.vue.js +1 -0
- package/es/components/quick-search/style/index.css +1 -0
- package/es/components/recommend-search/index.d.ts +2 -2
- package/es/components/recommend-search/src/RecommendSearch.vue.d.ts +2 -2
- package/es/components/recommend-search/src/components/RecommendSelect.vue.d.ts +1 -1
- package/es/components/scale-view/src/components/formitem/sign-com.d.ts +1 -1
- package/es/components/scale-view/src/components/formitem/standard-modal.d.ts +1 -1
- package/es/components/scale-view/src/hooks/use-component.d.ts +69 -116
- package/es/components/search-cascader/index.d.ts +2 -2
- package/es/components/search-cascader/src/SearchCascader.vue.d.ts +2 -2
- package/es/components/search-cascader/src/components/SearchMenu.d.ts +1 -1
- package/es/components/select-label/index.d.ts +70 -169
- package/es/components/select-label/src/LabelFormContent.vue.d.ts +1 -53
- package/es/components/select-label/src/LabelFormContent.vue.js +1 -1
- package/es/components/select-label/src/SelectLabel.vue.d.ts +70 -116
- package/es/components/select-label/src/SelectLabel.vue2.js +1 -1
- package/es/components/select-label/src/components/label-classify.vue.js +1 -1
- package/es/components/select-label/style/iconfont.ttf +0 -0
- package/es/components/select-label/style/index.css +1 -1
- package/es/components/select-person/index.d.ts +1 -1
- package/es/components/select-person/src/SelectPerson.vue.d.ts +1 -1
- package/es/components/shortcut-setter/index.d.ts +17 -17
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +17 -17
- package/es/components/steps-wheel/index.d.ts +1 -0
- package/es/components/steps-wheel/src/StepsWheel.vue.d.ts +1 -0
- package/es/components/steps-wheel/src/StepsWheel.vue.js +1 -1
- package/es/components/steps-wheel/src/constants/index.d.ts +2 -0
- package/es/components/steps-wheel/src/constants/index.js +1 -0
- package/es/components/steps-wheel/style/index.css +1 -1
- package/es/components/table-filter/index.d.ts +0 -2385
- package/es/components/table-filter/index.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +1 -0
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +1 -42
- package/es/components/table-filter/src/components/classify-filter/index.vue.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/CheckboxGroup.vue.d.ts +1 -1
- package/es/components/table-filter/src/components/render-widget/enums.d.ts +0 -8
- package/es/components/table-filter/src/components/render-widget/enums.js +1 -1
- package/es/components/table-filter/src/components/render-widget/index.vue.d.ts +2 -1
- package/es/components/table-filter/src/components/render-widget/index.vue.js +1 -1
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +1 -1
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -1
- package/es/components/table-filter/src/hooks/useAdvanced.d.ts +4 -1
- package/es/components/table-filter/src/hooks/useAdvanced.js +1 -1
- package/es/components/table-filter/src/hooks/useMixins.d.ts +1 -54
- package/es/components/table-filter/src/hooks/useMixins.js +1 -1
- package/es/components/table-filter/src/hooks/useRenderWidget.js +1 -1
- package/es/components/table-filter/src/tool/generateDefOptions.js +1 -1
- package/es/components/table-filter/src/tool/transformData.d.ts +1 -37
- package/es/components/table-filter/src/tool/transformData.js +1 -1
- package/es/components/table-filter/src/types/enums.d.ts +1 -0
- package/es/components/table-filter/src/types/enums.js +1 -1
- package/es/components/table-filter/src/types/index.d.ts +13 -169
- package/es/components/time-picker/index.d.ts +18 -0
- package/es/components/time-picker/index.js +1 -0
- package/es/components/time-picker/src/TimePicker.vue.d.ts +18 -0
- package/es/components/time-picker/src/TimePicker.vue.js +1 -0
- package/es/shared/mixins/index.d.ts +1 -0
- package/es/shared/mixins/index.js +1 -0
- package/es/shared/mixins/useTheme.d.ts +3 -0
- package/es/shared/mixins/useTheme.js +1 -0
- package/es/shared/utils/index.d.ts +1 -0
- package/es/shared/utils/index.js +1 -1
- package/package.json +64 -64
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/timeUtils.d.ts +0 -2
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/timeUtils.js +0 -1
- package/es/components/table-filter/src/base-search-com/BaseSearch.vue.js +0 -1
- package/es/components/table-filter/src/classification/Classification-com.vue.js +0 -1
- package/es/components/table-filter/src/components/search-filter/index.vue.js +0 -1
- package/es/components/table-filter/src/components/set-classification/index.vue.js +0 -1
- package/es/components/table-filter/src/components/table-modal/index.vue.js +0 -1
- package/es/components/table-filter/src/const/index.d.ts +0 -5
- package/es/components/table-filter/src/const/index.js +0 -1
- package/es/components/table-filter/src/hooks/useTableSearchCon.d.ts +0 -8
- package/es/components/table-filter/src/hooks/useTableSearchCon.js +0 -1
- package/es/components/table-filter/src/hooks/useWordBookutils.d.ts +0 -12
- package/es/components/table-filter/src/hooks/useWordBookutils.js +0 -1
- package/es/components/table-filter/src/quick-search/QuickSearch.vue.js +0 -1
- package/es/components/table-filter/src/tool/time-domain.d.ts +0 -39
- package/es/components/table-filter/src/tool/time-domain.js +0 -1
- package/es/components/table-filter/src/tool/utils.d.ts +0 -4
- package/es/components/table-filter/src/tool/utils.js +0 -1
- package/es/components/table-filter/style/index.css +0 -1
- /package/es/components/{table-filter → base-search}/src/directive/resize.d.ts +0 -0
- /package/es/components/{table-filter → base-search}/src/directive/resize.js +0 -0
- /package/es/components/{table-filter → base-search}/src/tool/resizeSensor.d.ts +0 -0
- /package/es/components/{table-filter → base-search}/src/tool/resizeSensor.js +0 -0
- /package/es/components/{table-filter → classification}/src/directive/flexibleResize.d.ts +0 -0
- /package/es/components/{table-filter → classification}/src/directive/flexibleResize.js +0 -0
- /package/es/components/table-filter/src/tool/{options.d.ts → baseOptions.d.ts} +0 -0
- /package/es/components/table-filter/src/tool/{options.js → baseOptions.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as r,computed as l,openBlock as
|
|
1
|
+
import{defineComponent as e,ref as r,computed as l,openBlock as t,createBlock as a,withCtx as o,renderSlot as u,nextTick as d}from"vue";import i from"./FormRender.vue.js";import s from"../../../_virtual/plugin-vue_export-helper.js";var m=s(e({__name:"FormRenderWrapper",setup(e,{expose:s}){const m=r(),n=r(0);return s({...["validate","getFormValues","setFormValues","setFieldState","resetFields","queryWidget","getFieldList"].reduce(((e,r)=>(e[r]=(...e)=>{var l;return(null==(l=m.value)?void 0:l[r]).call(l,...e)},e)),{}),formModel:l((()=>{var e;return null==(e=m.value)?void 0:e.formModel})),reload:async function(){n.value++,await d()}}),(e,r)=>(t(),a(i,{key:n.value,ref_key:"formRenderRef",ref:m},{default:o((()=>[u(e.$slots,"default")])),_:3}))}}),[["__file","FormRenderWrapper.vue"]]);export{m as default};
|
|
@@ -87,8 +87,8 @@ export declare const RADIO: import("vue").DefineComponent<{
|
|
|
87
87
|
}>> & {
|
|
88
88
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
89
89
|
}, {
|
|
90
|
-
options: AnyObject[];
|
|
91
90
|
vertical: boolean;
|
|
91
|
+
options: AnyObject[];
|
|
92
92
|
lazyRequest: boolean;
|
|
93
93
|
requestCache: boolean;
|
|
94
94
|
}>;
|
|
@@ -179,8 +179,8 @@ export declare const CHECKBOX: import("vue").DefineComponent<{
|
|
|
179
179
|
}>> & {
|
|
180
180
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
181
181
|
}, {
|
|
182
|
-
options: AnyObject[];
|
|
183
182
|
vertical: boolean;
|
|
183
|
+
options: AnyObject[];
|
|
184
184
|
lazyRequest: boolean;
|
|
185
185
|
requestCache: boolean;
|
|
186
186
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,createVNode as o,isVNode as t}from"vue";import{connect as a,mapProps as
|
|
1
|
+
import{defineComponent as e,createVNode as o,isVNode as t}from"vue";import{connect as a,mapProps as l}from"@formily/vue";import{NSpace as r,NRadio as u,NRadioGroup as i,NCheckbox as n,NCheckboxGroup as p}from"naive-ui";import"../../../index.js";import{useComplexOptions as s}from"../../hooks/useComplexOptions.js";import"../../utils/index.js";import{useAutographOptions as m}from"../../hooks/useFormRenderOptions.js";import{useCommonInjection as v}from"../../hooks/useCommonInjection.js";import{assignUpdateValue as c,createVisitedSetter as d}from"../../utils/schema.js";import{useFormField as f}from"../../hooks/useFormField.js";function y(a,l,u){return e({name:a,props:{value:{type:[String,Number,Object,Array]},options:{type:Array,default:()=>[]},autograph:{type:String},lazyRequest:{type:Boolean,default:!1},requestCache:{type:Boolean,default:!0},wordbook:{type:Object},vertical:{type:Boolean,default:!1},onChange:{}},emits:["update:value"],setup(e,{emit:a}){const{field:i}=f(),{renderComplexOption:n,valueRef:p}=s(e,a),{labelKey:c,valueKey:y,fullOptions:j}=m(e,p),{injectValueBindKey:b,injectValueValidate:h}=v();h(p);const k=b(p);return()=>o(l,{key:k.value,value:p.value,"onUpdate:value":e=>p.value=e,onClick:d(i)},{default:()=>[o(r,{vertical:e.vertical,"vertical-space":e.vertical},{default:()=>{var e;return[null==(e=j.value)?void 0:e.map((e=>{let a;return o(u,{key:e[y.value],value:e[y.value],disabled:e.disabled},"function"==typeof(l=a=n({value:p.value,option:e,valueKey:y.value,labelKey:c.value}))||"[object Object]"===Object.prototype.toString.call(l)&&!t(l)?a:{default:()=>[a]});var l}))]}})]})}})}const j=a(y("FormRadio",i,u),l({dataSource:"options"},c)),b=a(y("FormCheckbox",p,n),l({dataSource:"options"},c));export{b as CHECKBOX,j as RADIO};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,computed as o,inject as t,ref as a,createVNode as r}from"vue";import{useDebounceFn as l}from"@vueuse/core";import{cloneDeep as s,isString as i}from"lodash-es";import{useCommonInjection as n,useSelectOptionProps as u}from"../../hooks/useCommonInjection.js";import{InjectionChangeContextCollector as p}from"../../constants/index.js";import"../../../../../shared/utils/index.js";import"../../../index.js";import"../../utils/index.js";import{useFormField as m}from"../../hooks/useFormField.js";import"../../../../../shared/utils/tapable/SyncHook.js";import"../../../../../shared/utils/tapable/SyncBailHook.js";import"../../../../../shared/utils/tapable/SyncWaterfallHook.js";import"../../../../../shared/utils/tapable/SyncLoopHook.js";import"../../../../../shared/utils/tapable/AsyncParallelHook.js";import"../../../../../shared/utils/tapable/AsyncParallelBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesLoopHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js";import"../../hooks/useFormValidator.js";import"@formily/core";import"date-fns";import"@formily/reactive";import{connect as c,mapProps as d}from"@formily/vue";import"@vue/shared";import"./index.js";import{useUrlConfigOptions as y,useAutographOptions as v,useRecommendOptions as f,searchContentMatcher as h}from"../../hooks/useFormRenderOptions.js";import{NSelect as j}from"naive-ui";import{createVisitedSetter as b,assignUpdateValue as k,assignClearBindVisited as S}from"../../utils/schema.js";const g=c(e({name:"FormSelect",props:{value:{type:[String,Array]},lazyRequest:{type:Boolean,default:!0},requestCache:{type:Boolean,default:!0},options:{type:Array,default:()=>[]},onChange:{},allowCreate:Boolean,urlConfig:{type:Object},autograph:{type:String},wordbook:{type:Object},recommend:{type:Boolean,default:!1},commonList:{type:Array},recentList:{type:Array},getRecommendInfo:{type:Function},recommendNum:{type:Number,default:10},recommendCache:{type:Boolean,default:!1}},emits:["update:value","postRecommend"],setup(e,{slots:c,emit:d}){const k=o({get:()=>e.value,async set(e){d("update:value",e),
|
|
1
|
+
import{defineComponent as e,computed as o,inject as t,ref as a,createVNode as r}from"vue";import{useDebounceFn as l}from"@vueuse/core";import{cloneDeep as s,isString as i}from"lodash-es";import{useCommonInjection as n,useSelectOptionProps as u}from"../../hooks/useCommonInjection.js";import{InjectionChangeContextCollector as p}from"../../constants/index.js";import"../../../../../shared/utils/index.js";import"../../../index.js";import"../../utils/index.js";import{useFormField as m}from"../../hooks/useFormField.js";import"../../../../../shared/utils/tapable/SyncHook.js";import"../../../../../shared/utils/tapable/SyncBailHook.js";import"../../../../../shared/utils/tapable/SyncWaterfallHook.js";import"../../../../../shared/utils/tapable/SyncLoopHook.js";import"../../../../../shared/utils/tapable/AsyncParallelHook.js";import"../../../../../shared/utils/tapable/AsyncParallelBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesLoopHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js";import"../../hooks/useFormValidator.js";import"@formily/core";import"date-fns";import"@formily/reactive";import{connect as c,mapProps as d}from"@formily/vue";import"@vue/shared";import"./index.js";import{useUrlConfigOptions as y,useAutographOptions as v,useRecommendOptions as f,searchContentMatcher as h}from"../../hooks/useFormRenderOptions.js";import{NSelect as j}from"naive-ui";import{createVisitedSetter as b,assignUpdateValue as k,assignClearBindVisited as S}from"../../utils/schema.js";const g=c(e({name:"FormSelect",props:{value:{type:[String,Array]},lazyRequest:{type:Boolean,default:!0},requestCache:{type:Boolean,default:!0},options:{type:Array,default:()=>[]},onChange:{},allowCreate:Boolean,urlConfig:{type:Object},autograph:{type:String},wordbook:{type:Object},recommend:{type:Boolean,default:!1},commonList:{type:Array},recentList:{type:Array},getRecommendInfo:{type:Function},recommendNum:{type:Number,default:10},recommendCache:{type:Boolean,default:!1}},emits:["update:value","postRecommend"],setup(e,{slots:c,emit:d}){const k=o({get:()=>e.value,async set(e){d("update:value",e),C(e)}}),{labelKey:S,valueKey:g,fetchData:A,fullOptions:F,filterOptions:H}=e.urlConfig?y(e,k):v(e,k),{getRecommend:B,postRecommend:C,sortedOptions:x}=f(e,H,d,S,g),{field:O,fieldKey:R}=m();t(p).setContext(R.value,(e=>{return{currentOption:s((o=e,F.value.find((e=>e[g.value]===o))))};var o}));const L=a(""),V=l((async(e="")=>{L.value=e,A(e),B(e)}),300),{injectValueValidate:w,injectValueWatchFromEmpty:K,injectValueBindKey:P}=n();K(k,V),w(k);const W=P(k),{menuProps:q,nodeProps:I}=u();function N(e){const o=e[S.value];if(!o||!i(o))return"";const t=h(L.value,o);return t?r("section",null,[t.map(((e,o)=>0!==o&&e?r("span",{style:{color:o%2==0?"var(--n-option-text-color-active)":""}},[e]):null))]):o}const U=o((()=>x.value.length||!e.allowCreate?x.value:L.value?[{[S.value]:L.value,[g.value]:L.value},...x.value]:x.value));return()=>r(j,{key:W.value,remote:!0,filterable:!0,value:k.value,"onUpdate:value":e=>k.value=e,"menu-props":q,"node-props":I,labelField:S.value,valueField:g.value,options:U.value,onSearch:V,"onUpdate:show":e=>e&&V(),onFocus:b(O),renderLabel:N},c)}}),d({dataSource:"options"},k,S));export{g as SELECT};
|
|
@@ -3,7 +3,7 @@ import { FieldItem } from '../types';
|
|
|
3
3
|
/**
|
|
4
4
|
* @description 胶水层, 将低代码平台中的fieldList转换为JSONSchema
|
|
5
5
|
*/
|
|
6
|
-
export declare function useFieldListAdaptor(collector
|
|
6
|
+
export declare function useFieldListAdaptor(collector?: BusinessCollector): {
|
|
7
7
|
schemaAdaptor: (fieldList: FieldItem[]) => Record<string, import("@formily/json-schema/esm/types").Stringify<{
|
|
8
8
|
[key: symbol]: any;
|
|
9
9
|
[key: `x-${string}`]: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{arrayed as e,deepOmit as o}from"../../../../shared/utils/index.js";import{cloneDeep as t,pick as n}from"lodash-es";import"../../index.js";import{parseNumberFromMaybeString as r,formRenderLog as i}from"../utils/index.js";import{useFieldNormalize as s}from"./useFieldNormalize.js";import{fieldKeyEscape as a,createLinebarId as p}from"../utils/schema.js";import{useFormValidator as l}from"./useFormValidator.js";import{transformDateFormat as c}from"../utils/business.js";function m(e,o){Object.assign(e["x-component-props"],{...n(o,["wordbook","autograph"])})}function d(d){const{createValidatorSchema:u}=l(),x=e=>{var t;const n={name:e.val_key,type:null!=(t=e.fieldType)?t:"string",title:e.alias||e.name,"x-component":e.html_type,default:e.default_val,"x-component-props":{placeholder:e.placeholder,clearable:"0"===e.is_empty,...e.componentProps||{}},"x-content":e.slots,"x-display":"0"===e.is_show?"hidden":"visible","x-pattern":"0"===e.is_edit?"disabled":"editable"};e.reactions&&(n["x-reactions"]=e.reactions),e.noDecorator||Object.assign(n,{"x-decorator":"FORM_ITEM","x-decorator-props":{fieldItem:o(e,["reactions"]),span:2*(e.elem_width||3),showLabel:"1"!==e.hide_title,remark:e.remark,propertyKey:e.val_key,annotation:e.annotation,...e.decoratorProps||{}}});const r=u(e);return r&&(n["x-validator"]=r),"0"===e.is_null&&(n.required=!0),n},f=e=>{const
|
|
1
|
+
import{arrayed as e,deepOmit as o}from"../../../../shared/utils/index.js";import{cloneDeep as t,pick as n}from"lodash-es";import"../../index.js";import{parseNumberFromMaybeString as r,formRenderLog as i}from"../utils/index.js";import{useFieldNormalize as s}from"./useFieldNormalize.js";import{fieldKeyEscape as a,createLinebarId as p}from"../utils/schema.js";import{useFormValidator as l}from"./useFormValidator.js";import{transformDateFormat as c}from"../utils/business.js";function m(e,o){Object.assign(e["x-component-props"],{...n(o,["wordbook","autograph"])})}function d(d){const{createValidatorSchema:u}=l(),x=e=>{var t;const n={name:e.val_key,type:null!=(t=e.fieldType)?t:"string",title:e.alias||e.name,"x-component":e.html_type,default:e.default_val,"x-component-props":{placeholder:e.placeholder,clearable:"0"===e.is_empty,...e.componentProps||{}},"x-content":e.slots,"x-display":"0"===e.is_show?"hidden":"visible","x-pattern":"0"===e.is_edit?"disabled":"editable"};e.reactions&&(n["x-reactions"]=e.reactions),e.noDecorator||Object.assign(n,{"x-decorator":"FORM_ITEM","x-decorator-props":{fieldItem:o(e,["reactions"]),span:2*(e.elem_width||3),showLabel:"1"!==e.hide_title,remark:e.remark,propertyKey:e.val_key,annotation:e.annotation,...e.decoratorProps||{}}});const r=u(e);return r&&(n["x-validator"]=r),"0"===e.is_null&&(n.required=!0),n},f=e=>{var o;const t=x(e);e.urlConfig?function(e,o){Object.assign(e["x-component-props"],{...n(o,["urlConfig"])})}(t,e):e.autograph&&m(t,e);const i="0"===e.multi_select;return Object.assign(t["x-component-props"],{multiple:i,options:e.option||(null==(o=e.componentProps)?void 0:o.options),allowCreate:"1"===e.free_entry||!!t["x-component-props"].allowCreate,maxTagCount:r(e.multi_select_value),...n(e,["lazyRequest","requestCache"])}),i&&(t.type="array"),t},_=e=>{const o=x(e);return Object.assign(o["x-component-props"],{options:e.option,vertical:e.__vertical}),m(o,e),o},h=e=>{const t=x(e);return Object.assign(t["x-component-props"],{fieldItem:o(e,["reactions"])}),t},g=e=>({name:e.val_key,type:"void",title:e.alias||e.name,"x-component":"LINEBAR","x-display":"visible","x-component-props":{disabled:"1"===e.is_not_fold,id:p(e.val_key),show:"0"!==e.is_show,remark:e.remark}}),y=new Map([["LINEBAR",g],["LINE_BREAKS",e=>({name:e.val_key,type:"void",title:e.alias||e.name,"x-component":"LINE_BREAKS","x-display":"0"===e.is_show?"hidden":"visible"})],["INPUT",e=>{const o=x(e);return Object.assign(o["x-component-props"],{...n(e,["prefix","suffix"])}),o}],["INPUT_NUMBER",e=>{const o=x(e),{decimal_length:t,validate:n}=e;return Object.assign(o["x-component-props"],{precision:null!=t?t:null==n?void 0:n.decimal_length,prefix:e.prefix,suffix:e.suffix}),o}],["SELECT",f],["REMOTE_SEARCH",f],["DATE",e=>{const o=x(e);return Object.assign(o["x-component-props"],{valueFormat:e.date_format,type:c(e.date_format),validate:e.validate}),o}],["LEVEL_SEARCH_CASCADER",e=>{const o=x(e);return Object.assign(o["x-component-props"],{...n(e,["wordbook","lazyRequest","autograph"])}),o}],["SEARCH_CASCADER",e=>{var o;const t=x(e);return Object.assign(t["x-component-props"],{urlConfig:e.urlConfig,depth:null==(o=e.wordbook)?void 0:o.level_num,options:e.option}),t}],["COMBINATION",e=>{const o=x(e);return o.type="array",!1!==e.jsonCombination&&(o["x-component"]="JSON_COMBINATION"),Object.assign(o["x-decorator-props"],{showLabel:!1,showFeedback:!1}),Object.assign(o["x-component-props"],{title:e.alias||e.name,maxGroupNum:e.maxGroupNum,getProperties:()=>e.children||[]}),o}],["RADIO",_],["CHECKBOX",_],["SWITCH",e=>{const o=x(e);return Object.assign(o["x-component-props"],{openDescription:e.open,closeDescription:e.close}),o}],["SLIDER",e=>{const o=x(e);return Object.assign(o["x-component-props"],{step:r(e.step_length),max:r(e.max_length),min:r(e.min_length),option:e.option}),o}],["COMPLEX",e=>{const o=x(e);Array.isArray(e.properties)&&i("COMPLEX控件的properties属性已经废弃, 请使用children作为替代, 在之后的版本中properties属性将不再支持");const t=Array.isArray(e.properties||e.children)?O(e.properties||e.children):{};return o.type=e.fieldType||"void",o.properties=t,Object.assign(o["x-decorator-props"],{showFeedback:!1}),Object.assign(o["x-component-props"],n(e,["wrapperStyle","display"])),o}]]),b=e=>{if(e.suffixConfig)return v(e);return(y.get(e.html_type)||h)(e)},v=o=>{if(!o.suffixConfig)return b(o);const t=e(o.suffixConfig),n=[{...o,is_show:"1",hide_title:"1",suffixConfig:void 0}].concat(t.map((e=>({...e,hide_title:"1",is_show:"1"})))),r=x(o);return Object.assign(r,{type:"void",name:a(n),title:o.alias||o.name,"x-component":"INPUT_GROUP","x-component-props":{span:2*(o.elem_width||3)},"x-decorator-props":{...r["x-decorator-props"],showFeedback:!1,suffixFields:n.map((e=>e.val_key))},properties:O(n)}),r},{FieldNormalizeWaterfallHook:C}=s();function O(o){let n=null;return o.reduce(((e,o,s)=>{var a;const p=null==(a=(o=C.call(t(o))).validate)?void 0:a.obj_type;return p&&d&&d.collect(p,t(o)),"LINEBAR"===o.html_type?(e[i(o)]=r(g(o),s),n=e[i(o)].properties={}):n?n[i(o)]=r(b(o),s):(n=null,e[i(o)]=r(b(o),s)),e}),{});function r(e,o){return e["x-index"]=o,e}function i(o){return o.suffixConfig?a([o,...e(o.suffixConfig)]):o.val_key}}return{schemaAdaptor:O}}export{d as useFieldListAdaptor};
|
|
@@ -23,7 +23,8 @@ export declare function useUrlConfigOptions(props: {
|
|
|
23
23
|
}, valueRef: Ref): {
|
|
24
24
|
labelKey: import("vue").ComputedRef<string>;
|
|
25
25
|
valueKey: import("vue").ComputedRef<string>;
|
|
26
|
-
|
|
26
|
+
filterOptions: import("vue").ComputedRef<AnyObject[]>;
|
|
27
|
+
fullOptions: import("vue").ComputedRef<AnyObject[]>;
|
|
27
28
|
fetchData: (content?: string) => Promise<null | undefined>;
|
|
28
29
|
};
|
|
29
30
|
export declare function useAutographOptions(props: {
|
|
@@ -35,6 +36,7 @@ export declare function useAutographOptions(props: {
|
|
|
35
36
|
}, valueRef: Ref): {
|
|
36
37
|
labelKey: import("vue").ComputedRef<string>;
|
|
37
38
|
valueKey: import("vue").ComputedRef<string>;
|
|
38
|
-
|
|
39
|
+
filterOptions: import("vue").ComputedRef<AnyObject[]>;
|
|
40
|
+
fullOptions: import("vue").ComputedRef<AnyObject[]>;
|
|
39
41
|
fetchData: (content?: string) => Promise<null | undefined>;
|
|
40
42
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{checkInSetupEnv as e,jsonParse as n}from"../../../../shared/utils/index.js";import{useMemoize as t,useDebounceFn as
|
|
1
|
+
import{checkInSetupEnv as e,jsonParse as n}from"../../../../shared/utils/index.js";import{useMemoize as t,useDebounceFn as o}from"@vueuse/core";import{identity as r,isString as u,isEqual as l,omit as a,isFunction as i}from"lodash-es";import{computed as c,inject as s,ref as v,watch as m}from"vue";import"../../index.js";import{InjectionAsyncQueue as d,InjectionFormItemDepsCollector as f}from"../constants/index.js";import{createUrlConfigParams as y,formRenderLog as p,keywordMatcher as h}from"../utils/index.js";import{useFormField as g}from"./useFormField.js";import{useFormRequest as w}from"./useFormRequest.js";function k(e,n){const t=v();return c({get:()=>t.value?t.value:e[n],set(e){t.value=e}})}const R=(()=>{const e=new Map,n=t((e=>new RegExp(`(.*)${e.split("").map((e=>`(${e})`)).join("(.*)")}(.*)`)),{getKey:r});return(t,o)=>{const r=e.get(t)||{};return e.set(t,r),Reflect.has(r,o)?r[o]:r[o]=o.match(n(t))}})();function C(){const e=v();return{searchContent:e,optionSearchFilter:function(n,t){return e.value?n.filter((n=>function(n,t){if(!e.value)return!0;const o=n?n[t]:"";return!!u(o)&&(!!R(e.value,o)||h(e.value,n.keyword))}(n,t))):n}}}function b(e,t,o,r,u){const l=k(e,"commonList"),v=k(e,"recentList"),{searchContent:m,optionSearchFilter:f}=C();function y(e){return n(e.itemObj)}const p=c((()=>{var e,n;return null!=(n=null==(e=l.value)?void 0:e.map(y))?n:[]})),h=c((()=>{var e,n;return null!=(n=null==(e=v.value)?void 0:e.map(y))?n:[]})),R=c((()=>{if(!e.recommend||!p.value.length&&!h.value.length)return t.value;const n=t.value.filter((e=>{return p.value.every(n)&&h.value.every(n);function n(n){return n[u.value]!==e[u.value]}}));return[...f(p.value,r.value),...f(h.value,r.value),...n]})),{getRecommendRequestInfo:b,getHttpInstance:K}=w();function j(n){const{url:t,getRecommendIds:o}=b(),r=i(o)?o():{},u=i(e.getRecommendInfo)?e.getRecommendInfo():{};return{url:t[n],info:Object.assign({},r,u)}}const{fieldKey:O}=g(),q=s(d);return{postRecommend:async function(n){if(!e.recommend)return;const t=K();if(!t)return;const{url:r,info:l}=j("post"),a=R.value.find((e=>e[u.value]===n));a&&o("postRecommend",await t.post(r,{...l,keyword:"",itemId:u.value,itemObj:JSON.stringify(a)}))},getRecommend:async function(n){if(!e.recommend)return;if(m.value=n,l.value&&v.value&&e.recommendCache)return;const t=await q.addAsync(function(n,t){const{url:o,info:r}=j("get");return{url:o,method:"get",key:n,cache:t,params:{...r,recNum:e.recommendNum,keyword:""}}}(O.value,e.recommendCache)),{commonly:o,recently:r}=t.reduce(((e,n)=>("commonly"===n.type?e.commonly.push(a(n,["type"])):"recently"===n.type&&e.recently.push(a(n,["type"])),e)),{commonly:[],recently:[]});l.value=o,v.value=r},sortedOptions:R}}function K(n,t){e();const r=s(d),a=c((()=>{var e,t;return null!=(t=null==(e=n.urlConfig)?void 0:e.nameKey)?t:"text"})),i=c((()=>{var e,t;return null!=(t=null==(e=n.urlConfig)?void 0:e.valueKey)?t:"value"})),{searchContent:h,optionSearchFilter:w}=C(),k=v(null),{field:R,fieldKey:b}=g(),K=o((async function(e){if(h.value=e||"",!n.urlConfig)return k.value=null;try{k.value=await r.addAsync(await y({config:n.urlConfig,cache:n.requestCache,field:R.value}))}catch(e){u(e)&&p(e)}}),300),j=c((()=>k.value?w(k.value,a.value):Array.isArray(n.options)?w(n.options,a.value):[])),O=c((()=>k.value||n.options||[])),q=s(f);return m((()=>n.urlConfig),((e,o)=>{l(e,o)||(k.value=null,e&&(q.setDeps(b.value,e.dependKey||[],(async()=>{k.value=null,t.value=null,!n.lazyRequest&&await K()})),(t.value||!n.lazyRequest)&&K()))}),{immediate:!0}),{labelKey:a,valueKey:i,filterOptions:j,fullOptions:O,fetchData:K}}function j(n,t){e();const r=s(d),a=c((()=>{var e,t,o;return null!=(o=null==(t=null==(e=n.wordbook)?void 0:e.render_key)?void 0:t[0])?o:"text"})),i=c((()=>{var e,t;return null!=(t=null==(e=n.wordbook)?void 0:e.value_key)?t:"value"})),{searchContent:f,optionSearchFilter:y}=C(),h=v(null),{fieldKey:k}=g(),{getSearchRequestInfo:R}=w(),b=o((async function(e){if(f.value=e||"",!n.autograph||!n.wordbook)return h.value=null;try{h.value=await r.addAsync(function(e,t,o){const r={autograph:t,wordbookId:e.id,wordbookType:e.type,fieldKeys:e.search_key,keyword:"",page:1};return{...R(),params:r,key:o,cache:n.requestCache}}(n.wordbook,n.autograph,k.value))}catch(e){u(e)&&p(e)}}),300),K=c((()=>h.value?y(h.value,a.value):Array.isArray(n.options)?y(n.options,a.value):[])),j=c((()=>h.value||n.options||[]));return m((()=>n.wordbook),((e,o)=>{l(e,o)||(h.value=null,e&&(t.value||!n.lazyRequest)&&b())}),{immediate:!0}),{labelKey:a,valueKey:i,filterOptions:K,fullOptions:j,fetchData:b}}export{R as searchContentMatcher,j as useAutographOptions,b as useRecommendOptions,K as useUrlConfigOptions};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.annotation-edit{align-items:center;color
|
|
1
|
+
.annotation-edit{align-items:center;color:var(--c-primary-color);cursor:pointer;display:inline-flex;font-size:16px;user-select:none}.annotation-edit.is-active{color:var(--c-primary-color);filter:hue-rotate(140deg)}.annotation-edit__icon{align-items:center;display:inline-flex}.annotation-edit__textarea{min-width:200px}.annotation-edit__footer{align-items:center;display:flex;flex-wrap:nowrap;gap:8px;justify-content:space-between;opacity:.5}.annotation-edit__footer>div{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.annotation-edit__footer>div:first-of-type{min-width:30%}.recommend-search__menu{min-height:100px}.recommend-search__menuRecommendList{display:flex;flex-wrap:wrap;gap:8px;margin-top:4px}.recommend-search__menuRecommendList .n-tag{cursor:pointer}.recommend-search__recentRecommend{margin-bottom:8px}.recommend-search__recentRecommend>header{align-items:center;color:rgba(0,0,0,.4);display:flex;justify-content:space-between}.recommend-search__recentRecommend>header .n-icon:hover{color:rgba(0,0,0,.6);cursor:pointer}.recommend-search__commonRecommend{margin-bottom:8px}.recommend-search__commonRecommend>header{align-items:center;color:rgba(0,0,0,.4);display:flex;justify-content:space-between}.recommend-search__commonRecommend>header .n-icon:hover{color:rgba(0,0,0,.6);cursor:pointer}.recommend-search__option{align-items:center;border-radius:4px;cursor:pointer;display:flex;height:32px;justify-content:space-between;padding:0 8px}.recommend-search__optionText{max-width:calc(100% - 24px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.recommend-search__option.is-active{color:var(--n-color)!important}.recommend-search__option.is-active .n-icon{font-size:20px}.recommend-search__option:hover{background:rgba(0,0,0,.03)}.recommend-search__optionContainer{margin:-8px -10px}.recommend-search__empty{align-items:center;color:rgba(0,0,0,.3);display:flex;height:100px;justify-content:center}.search-cascader__menuWrapper{display:flex;flex-wrap:nowrap;margin:-8px -14px}.search-cascader__input input{cursor:pointer!important}.search-cascader__option{align-items:center;border-radius:4px;box-sizing:border-box;display:flex;height:32px;justify-content:space-between;padding:0 8px 0 16px;width:100%}.search-cascader__option--active{background:#f8f8f8}.search-cascader__option:hover{background:#f5f5f5;cursor:pointer}.search-cascader__optionWrapper{background:#fff;height:256px;overflow-x:auto;width:calc(var(--menu-width)*1px)}.search-cascader__optionWrapper:not(:last-of-type){border:solid #e5e5e5;border-width:0 1px 0 0}.search-cascader__optionText{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:calc(100% - 20px)}.search-cascader__option svg{color:#bfbfbf;flex-shrink:0;font-size:12px;width:20px}.search-cascader__option svg.rotate{animation:rotate 1s linear infinite}.search-cascader__emptyWrapper{align-items:center;background:#fff;box-sizing:border-box;display:flex;height:300px;justify-content:center;padding:16px;width:100%}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(1turn)}}.form-render__wrapper{align-items:start;display:grid!important;gap:0 16px;grid-template-columns:repeat(var(--column),minmax(0,1fr));max-height:var(--form-height);overflow-y:auto;position:relative}.form-render__formItem{grid-column:span min(var(--column),var(--form-item-column)) /span min(var(--column),var(--form-item-column))}.form-render__formItem .n-date-picker,.form-render__formItem .n-input-number{width:100%}.form-render__formItemLabel{align-items:center;display:inline-flex;justify-content:space-between;position:relative}.form-render__formItemLabel--operation{align-items:center;display:flex;gap:2px;position:absolute;right:0;top:50%;transform:translateY(-50%)}.form-render__formItemLabel--tooltip{font-size:0;line-height:1;width:16px}.form-render__formItemLabel--text{white-space:nowrap}.form-render__formItem .n-form-item-label{display:inline-flex}.form-render__formItem .n-form-item-label [annotation-hover-show=true]{visibility:hidden}.form-render__formItem .n-form-item-label:hover [annotation-hover-show=true]{visibility:visible}.form-render__linebar{grid-column:span min(var(--column),var(--column)) /span min(var(--column),var(--column))}.form-render__linebarHeader{align-items:center;background:#f2f2f2;border-radius:4px;cursor:pointer;display:flex;font-size:14px;font-weight:600;height:32px;justify-content:space-between;margin-bottom:8px;padding:0 16px}.form-render__linebarHeader>svg{color:rgba(33,33,33,.4);width:14px}.form-render__linebarHeaderTitle{align-items:center;display:flex;font-size:15px;gap:4px;vertical-align:middle}.form-render__linebarHeaderTitle svg{height:16px;transform:translateY(-1px)}.form-render__linebarHeader--disabled{cursor:auto}.form-render__linebarItem{align-items:start;display:grid!important;gap:0 16px;grid-template-columns:repeat(var(--column),minmax(0,1fr))}.form-render__linebreaks{grid-column:span min(var(--column),var(--form-item-column)) /span min(var(--column),var(--form-item-column))}.form-render__inputGroup{align-items:flex-start;display:flex;grid-column:span min(var(--column),var(--column)) /span min(var(--column),var(--column))}.form-render__inputGroup>div{flex:1}.form-render__inputGroup>div:not(:last-of-type) .n-base-selection__border,.form-render__inputGroup>div:not(:last-of-type) .n-input__border{border-bottom-right-radius:0;border-right:0;border-top-right-radius:0}.form-render__inputGroup>div:last-of-type .n-base-selection__border,.form-render__inputGroup>div:last-of-type .n-input__border{border-bottom-left-radius:0;border-top-left-radius:0}.form-render__inputGroup .n-form-item--left-labelled:not(:first-of-type)>label{display:none}.form-render__combination{width:100%}.form-render__combinationHeader{display:flex;gap:12px}.form-render__combinationHeader>h3{font-size:16px;font-weight:700;margin:0;padding:0}.form-render__combinationHeader .n-button__icon{font-size:14px;margin:0 2px 0 0}.form-render__combinationHeaderText{font-size:16px;font-weight:500}.form-render__combinationClose{font-size:16px;height:14px;position:absolute;right:5px;top:5px;width:14px}.form-render__combinationContentJson{position:relative}.form-render__combinationContent{align-items:start;display:grid!important;gap:0 16px;grid-template-columns:repeat(var(--column),minmax(0,1fr));position:relative}.form-render__complex{width:100%}.form-render__complexContent--grid{align-items:start;display:grid!important;gap:0 16px;grid-template-columns:repeat(var(--column),minmax(0,1fr))}.form-render__complexContent--flex{display:flex!important;gap:0 8px}.form-render__selectMenu .n-scrollbar-rail__scrollbar{display:none!important}.form-render__selectMenu .n-virtual-list::-webkit-scrollbar,.form-render__selectMenu .n-virtual-list::-webkit-scrollbar-thumb{display:unset!important;height:6px;width:6px}.form-render__selectMenu .n-virtual-list::-webkit-scrollbar-thumb{background:#bfbfbf;border-radius:4px}.form-render__selectMenu .v-vl-items{min-width:100%;width:max-content}.form-render__selectOption .n-base-select-option__content{overflow:visible!important;text-overflow:unset!important;word-break:keep-all!important}.form-render__labelField{align-items:start;display:grid!important;display:inline-grid!important;gap:0 16px;grid-template-columns:repeat(var(--column),minmax(0,1fr));grid-template-columns:repeat(var(--column),auto)!important;margin-left:16px}.form-render__labelField .n-form-item{display:inline-grid}.form-render__labelField label.n-form-item-label.n-form-item-label--left-mark{align-items:center}.form-render__labelField .n-checkbox[aria-checked=false] .n-checkbox-box{background-color:transparent}.form-render__labelField .n-checkbox[aria-checked=false] .n-checkbox-icon .check-icon{opacity:0}.form-render__labelField .n-checkbox[aria-checked=false] .n-checkbox-box__border{border:var(--n-border)}.form-render .form-render__formItem .n-checkbox,.form-render .form-render__formItem .n-radio{align-items:center}.form-render .form-render__formItem .n-radio-input{left:auto;right:auto}.form-render .form-render__formItem .n-checkbox-group>.n-space:not([vertical-space=true]),.form-render .form-render__formItem .n-radio-group>.n-space:not([vertical-space=true]){align-items:center!important}.form-render .form-render__formItem .n-checkbox__label{align-items:center;display:inline-flex}
|
|
@@ -102,6 +102,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
102
102
|
onKeyboard?: ((...args: any[]) => any) | undefined;
|
|
103
103
|
}>>;
|
|
104
104
|
__emits: (event: "toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "formChange" | "settingClick" | "formClick" | "keyboard" | "cut" | "paste" | "keydown" | "keydownStart" | "keydownEnd" | "currentChange" | "radioChange" | "checkboxChange" | "checkboxAll" | "checkboxRangeStart" | "checkboxRangeChange" | "checkboxRangeEnd" | "cellClick" | "cellDblclick" | "cellMenu" | "cellMouseenter" | "cellMouseleave" | "headerCellClick" | "headerCellDblclick" | "headerCellMenu" | "footerCellClick" | "footerCellDblclick" | "footerCellMenu" | "sortChange" | "filterChange" | "filterVisible" | "resizableChange" | "menuClick" | "editClosed" | "editActived" | "editDisabled" | "validError" | "custom" | "openFnr" | "fnrChange" | "fnrFind" | "fnrFindAll" | "fnrReplace" | "fnrReplaceAll" | "cellAreaCopy" | "cellAreaCut" | "cellAreaPaste" | "cellAreaMerge" | "clearCellAreaMerge" | "headerCellAreaSelection" | "cellAreaSelectionStart" | "cellAreaSelectionDrag" | "cellAreaSelectionEnd" | "cellAreaExtensionStart" | "cellAreaExtensionDrag" | "cellAreaExtensionEnd" | "cellAreaArrowsStart" | "cellAreaArrowsEnd" | "activeCellChangeStart" | "activeCellChangeEnd", ...args: any[]) => void;
|
|
105
|
+
cssVars: import("vue").ComputedRef<import("vue").CSSProperties>;
|
|
105
106
|
eventListener: import("./src/hooks/tapHooks/useEventHooks").IhoTableEventListener;
|
|
106
107
|
emits: (event: "toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "formChange" | "settingClick" | "formClick" | "keyboard" | "cut" | "paste" | "keydown" | "keydownStart" | "keydownEnd" | "currentChange" | "radioChange" | "checkboxChange" | "checkboxAll" | "checkboxRangeStart" | "checkboxRangeChange" | "checkboxRangeEnd" | "cellClick" | "cellDblclick" | "cellMenu" | "cellMouseenter" | "cellMouseleave" | "headerCellClick" | "headerCellDblclick" | "headerCellMenu" | "footerCellClick" | "footerCellDblclick" | "footerCellMenu" | "sortChange" | "filterChange" | "filterVisible" | "resizableChange" | "menuClick" | "editClosed" | "editActived" | "editDisabled" | "validError" | "custom" | "openFnr" | "fnrChange" | "fnrFind" | "fnrFindAll" | "fnrReplace" | "fnrReplaceAll" | "cellAreaCopy" | "cellAreaCut" | "cellAreaPaste" | "cellAreaMerge" | "clearCellAreaMerge" | "headerCellAreaSelection" | "cellAreaSelectionStart" | "cellAreaSelectionDrag" | "cellAreaSelectionEnd" | "cellAreaExtensionStart" | "cellAreaExtensionDrag" | "cellAreaExtensionEnd" | "cellAreaArrowsStart" | "cellAreaArrowsEnd" | "activeCellChangeStart" | "activeCellChangeEnd", ...args: any[]) => void;
|
|
107
108
|
hooks: Readonly<{
|
|
@@ -2096,6 +2097,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2096
2097
|
uuid?: string | undefined;
|
|
2097
2098
|
isTree?: import("../../../es/shared/types").MaybeString<0 | 2 | 1 | 3> | undefined;
|
|
2098
2099
|
isBatchSelect?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
2100
|
+
hideSettingBtn?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
2099
2101
|
showSeq?: boolean | undefined;
|
|
2100
2102
|
selectType?: "checkbox" | "radio" | null | undefined;
|
|
2101
2103
|
rowGroupSetting?: {
|
|
@@ -4501,6 +4503,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
4501
4503
|
uuid?: string | undefined;
|
|
4502
4504
|
isTree?: import("../../../es/shared/types").MaybeString<0 | 2 | 1 | 3> | undefined;
|
|
4503
4505
|
isBatchSelect?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
4506
|
+
hideSettingBtn?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
4504
4507
|
showSeq?: boolean | undefined;
|
|
4505
4508
|
selectType?: "checkbox" | "radio" | null | undefined;
|
|
4506
4509
|
rowGroupSetting?: {
|
|
@@ -101,6 +101,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
101
101
|
onKeyboard?: ((...args: any[]) => any) | undefined;
|
|
102
102
|
}>>;
|
|
103
103
|
__emits: (event: "toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "formChange" | "settingClick" | "formClick" | "keyboard" | "cut" | "paste" | "keydown" | "keydownStart" | "keydownEnd" | "currentChange" | "radioChange" | "checkboxChange" | "checkboxAll" | "checkboxRangeStart" | "checkboxRangeChange" | "checkboxRangeEnd" | "cellClick" | "cellDblclick" | "cellMenu" | "cellMouseenter" | "cellMouseleave" | "headerCellClick" | "headerCellDblclick" | "headerCellMenu" | "footerCellClick" | "footerCellDblclick" | "footerCellMenu" | "sortChange" | "filterChange" | "filterVisible" | "resizableChange" | "menuClick" | "editClosed" | "editActived" | "editDisabled" | "validError" | "custom" | "openFnr" | "fnrChange" | "fnrFind" | "fnrFindAll" | "fnrReplace" | "fnrReplaceAll" | "cellAreaCopy" | "cellAreaCut" | "cellAreaPaste" | "cellAreaMerge" | "clearCellAreaMerge" | "headerCellAreaSelection" | "cellAreaSelectionStart" | "cellAreaSelectionDrag" | "cellAreaSelectionEnd" | "cellAreaExtensionStart" | "cellAreaExtensionDrag" | "cellAreaExtensionEnd" | "cellAreaArrowsStart" | "cellAreaArrowsEnd" | "activeCellChangeStart" | "activeCellChangeEnd", ...args: any[]) => void;
|
|
104
|
+
cssVars: import("vue").ComputedRef<import("vue").CSSProperties>;
|
|
104
105
|
eventListener: import("../../../../es/components/iho-table/src/hooks/tapHooks/useEventHooks").IhoTableEventListener;
|
|
105
106
|
emits: (event: "toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "formChange" | "settingClick" | "formClick" | "keyboard" | "cut" | "paste" | "keydown" | "keydownStart" | "keydownEnd" | "currentChange" | "radioChange" | "checkboxChange" | "checkboxAll" | "checkboxRangeStart" | "checkboxRangeChange" | "checkboxRangeEnd" | "cellClick" | "cellDblclick" | "cellMenu" | "cellMouseenter" | "cellMouseleave" | "headerCellClick" | "headerCellDblclick" | "headerCellMenu" | "footerCellClick" | "footerCellDblclick" | "footerCellMenu" | "sortChange" | "filterChange" | "filterVisible" | "resizableChange" | "menuClick" | "editClosed" | "editActived" | "editDisabled" | "validError" | "custom" | "openFnr" | "fnrChange" | "fnrFind" | "fnrFindAll" | "fnrReplace" | "fnrReplaceAll" | "cellAreaCopy" | "cellAreaCut" | "cellAreaPaste" | "cellAreaMerge" | "clearCellAreaMerge" | "headerCellAreaSelection" | "cellAreaSelectionStart" | "cellAreaSelectionDrag" | "cellAreaSelectionEnd" | "cellAreaExtensionStart" | "cellAreaExtensionDrag" | "cellAreaExtensionEnd" | "cellAreaArrowsStart" | "cellAreaArrowsEnd" | "activeCellChangeStart" | "activeCellChangeEnd", ...args: any[]) => void;
|
|
106
107
|
hooks: Readonly<{
|
|
@@ -2095,6 +2096,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2095
2096
|
uuid?: string | undefined;
|
|
2096
2097
|
isTree?: import("../../../../es/shared/types").MaybeString<0 | 2 | 1 | 3> | undefined;
|
|
2097
2098
|
isBatchSelect?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
2099
|
+
hideSettingBtn?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
2098
2100
|
showSeq?: boolean | undefined;
|
|
2099
2101
|
selectType?: "checkbox" | "radio" | null | undefined;
|
|
2100
2102
|
rowGroupSetting?: {
|
|
@@ -4500,6 +4502,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4500
4502
|
uuid?: string | undefined;
|
|
4501
4503
|
isTree?: import("../../../../es/shared/types").MaybeString<0 | 2 | 1 | 3> | undefined;
|
|
4502
4504
|
isBatchSelect?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
4505
|
+
hideSettingBtn?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
4503
4506
|
showSeq?: boolean | undefined;
|
|
4504
4507
|
selectType?: "checkbox" | "radio" | null | undefined;
|
|
4505
4508
|
rowGroupSetting?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,provide as t,computed as
|
|
1
|
+
import{defineComponent as e,provide as t,computed as o,ref as a,watch as l,resolveComponent as s,openBlock as i,createElementBlock as n,unref as r,normalizeStyle as u,createBlock as f,resolveDynamicComponent as c,createVNode as d,mergeProps as p,createSlots as m,renderList as v,withCtx as b,createCommentVNode as h,renderSlot as g}from"vue";import{useTheme as x}from"../../../shared/mixins/useTheme.js";import{uuidGenerator as k}from"../../../shared/utils/index.js";import{useDebounceFn as y}from"@vueuse/core";import{promiseTimeout as j}from"@vueuse/shared";import{isFunction as C}from"lodash-es";import{VxeTableEventNameList as D,InjectionIhoTableEmits as _,InjectionIhoTableAnnotation as $,InjectionIhoTableUUID as H,InjectionIhoTableInstance as T,InjectionIhoTableConfig as A,InjectionIhoTableFieldList as L,InjectionIhoTableHandler as w}from"./constants/index.js";import{createTableHooks as R,applyTableConfigHooks as E,applyTableFieldHooks as F,createTableEventHandlers as I,createDomInsertComponent as O,createDataTransfer as S}from"./hooks/tapHooks/index.js";import{provideIhoTableEventListener as q}from"./hooks/tapHooks/useEventHooks.js";import{eventName2EventListener as z}from"./utils/index.js";import B from"../../../_virtual/plugin-vue_export-helper.js";const G=["id"];var J=B(e({__name:"IhoTable",props:{tableConfig:{type:Object,default:()=>({})},fieldList:{type:Array,default:()=>[]},tableData:{type:Array,default:()=>[]},annotation:{type:Object}},emits:["formChange","settingClick","formClick","keyboard",...D],setup(e,{expose:D,emit:B}){var J,K;const M=e,N=x({"--c-border-color":"#e2e2e2","--c-head-bg-color":"#f2f2f2","--c-hover-color":"#f7f7f7"}),P=q(),Q=function(e,...t){B(e,...t);const o=r(X)[z(e)];C(o)&&o(...t),P.trigger(e,...t)};t(_,Q);const U=R();t($,o((()=>M.annotation)));const V=k();t(H,V);const W=a();t(T,W);const X=a({uuid:null!=(K=null==(J=M.tableConfig)?void 0:J.uuid)?K:V});t(A,X);const Y=y(Z,10);function Z(){X.value=E(U,M.tableConfig),X.value.uuid=V}const ee=a([]);t(L,ee);const te=y(oe,10);function oe(){ee.value=F(U,M.fieldList,X.value,{$table:W,emits:Q})}const ae=S(U,X,W),le=a([]),se=y(ie,10);async function ie(){var e;le.value=await ae(M.tableData),null==(e=W.value)||e.recalculate(!0)}const ne={updateTableDataRef:se,updateConfigRef:Y,updateFieldListRef:te};t(w,ne);const re=I({hooks:U,config:X,$table:W,context:ne,emits:Q}),ue=o((()=>({...X.value,...re})));l((()=>M.tableConfig),(()=>{Y(),te(),se()}),{deep:!0}),l((()=>M.fieldList),(()=>{te(),se()}),{deep:!0}),l([()=>M.tableData,()=>{var e;return null==(e=M.tableData)?void 0:e.length}],(async()=>{var e,t;(null==(e=X.value.treeConfig)?void 0:e.expandAll)&&(await j(11),null==(t=W.value)||t.setAllTreeExpand(!0))})),l((()=>[...M.tableData]),se),Z(),oe(),ie();const{header:fe,footer:ce}=O(U);return D({$table:W,async loadData(e){var t;null==(t=W.value)||t.loadData(await ae(e))},setSort:(e,t)=>({field:e,value:t}),setFilter:(e,t)=>({field:e,value:t}),...U.exposeHooks.expose.call({},X,{$table:W,emits:Q})}),U.setupHooks.setup.call(X,ee),(e,t)=>{const o=s("vxe-grid");return i(),n("section",{class:"iho-table",id:r(V),style:u(r(N))},[(i(),f(c(r(fe)))),d(o,p({ref_key:"$table",ref:W},r(ue),{columns:ee.value,data:le.value}),m({_:2},[v(e.$slots,((t,o)=>({name:o,fn:b((()=>[h(" 实际上所有的vxe-grid插槽都支持 "),g(e.$slots,o)]))})))]),1040,["columns","data"]),(i(),f(c(r(ce))))],12,G)}}}),[["__file","IhoTable.vue"]]);export{J as default};
|
|
@@ -59,10 +59,10 @@ export declare enum IHO_TABLE_STRING_STATUS {
|
|
|
59
59
|
POSITIVE = "1"
|
|
60
60
|
}
|
|
61
61
|
export declare enum IHO_TABLE_TREE_TYPE {
|
|
62
|
-
NOT_TREE = 0,
|
|
63
|
-
UNKNOWN = 1,
|
|
64
|
-
|
|
65
|
-
|
|
62
|
+
NOT_TREE = "0",
|
|
63
|
+
UNKNOWN = "1",
|
|
64
|
+
TRANSFORM_TREE_TYPE = "2",
|
|
65
|
+
TRANSFORM_WITH_SPAN_METHOD = "3"
|
|
66
66
|
}
|
|
67
67
|
export declare enum IHO_TABLE_FIXED_STATUS {
|
|
68
68
|
left = 1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{eventListener2EventName as e}from"../utils/index.js";var o=(e=>(e.DEFAULT="DEFAULT",e.PICTURE="PICTURE",e.FILE="FILE",e.MONEY="MONEY",e.HEADPORTRAIT="HEADPORTRAIT",e.LABEL="LABEL",e.TELEPHONE="TELEPHONE",e.BIRTHDAY="BIRTHDAY",e.MULTISELECT="MULTISELECT",e.CASCADE="CASCADE",e.SEARCH_TREE="SEARCH_TREE",e.COLOR="COLOR",e.EVALUATE="EVALUATE",e.MAP="MAP",e.VIDEO="VIDEO",e.SYSTEMFIELDS="SYSTEMFIELDS",e.PERCENTAGE="PERCENTAGE",e.CANDIDATE_COMPONENTS="CANDIDATE_COMPONENTS",e.TASKDATE="TASKDATE",e.AGE="AGE",e.STATUS="STATUS",e.WEBSITE="WEBSITE",e.IDCARD="IDCARD",e.COUNTDOWN="COUNTDOWN",e.DURATION="DURATION",e.COMBINATION="COMBINATION",e.PASSWORD="PASSWORD",e.QR_CODE="QR_CODE",e.CUSTOMER_NAME="CUSTOMER_NAME",e.BANK_CARD="BANK_CARD",e.SEQUENCE="SEQUENCE",e))(o||{});const n=Object.freeze(["onKeydownStart","onKeydown","onKeydownEnd","onPaste","onCopy","onCut","onCurrentChange","onRadioChange","onCheckboxChange","onCheckboxAll","onCheckboxRangeStart","onCheckboxRangeChange","onCheckboxRangeEnd","onCellClick","onCellDblclick","onCellMenu","onCellMouseenter","onCellMouseleave","onHeaderCellClick","onHeaderCellDblclick","onHeaderCellMenu","onFooterCellClick","onFooterCellDblclick","onFooterCellMenu","onSortChange","onFilterChange","onFilterVisible","onResizableChange","onToggleRowExpand","onToggleTreeExpand","onMenuClick","onEditClosed","onEditActived","onEditDisabled","onValidError","onScroll","onCustom","onOpenFnr","onFnrChange","onFnrFind","onFnrFindAll","onFnrReplace","onFnrReplaceAll","onCellAreaCopy","onCellAreaCut","onCellAreaPaste","onCellAreaMerge","onClearCellAreaMerge","onHeaderCellAreaSelection","onCellAreaSelectionStart","onCellAreaSelectionDrag","onCellAreaSelectionEnd","onCellAreaExtensionStart","onCellAreaExtensionDrag","onCellAreaExtensionEnd","onCellAreaArrowsStart","onCellAreaArrowsEnd","onActiveCellChangeStart","onActiveCellChangeEnd"]),E=n.map(e),l=Object.freeze(["firstRowGroup","secondRowGroup","thirdRowGroup","fourthRowGroup","fifthRowGroup","sixthRowGroup","seventhRowGroup","eighthRowGroup","ninthRowGroup","tenthRowGroup"]),C=-1/0,A=1/0;var T=(e=>(e.INPUT="INPUT",e.SEPARATE="SEPARATE",e.SELECT="SELECT",e.DATE="DATE",e.TIME="TIME",e.NUMBER="NUMBER",e))(T||{}),r=(e=>(e[e.NEGATIVE=0]="NEGATIVE",e[e.POSITIVE=1]="POSITIVE",e))(r||{}),t=(e=>(e.NEGATIVE="0",e.POSITIVE="1",e))(t||{}),a=(e=>(e
|
|
1
|
+
import{eventListener2EventName as e}from"../utils/index.js";var o=(e=>(e.DEFAULT="DEFAULT",e.PICTURE="PICTURE",e.FILE="FILE",e.MONEY="MONEY",e.HEADPORTRAIT="HEADPORTRAIT",e.LABEL="LABEL",e.TELEPHONE="TELEPHONE",e.BIRTHDAY="BIRTHDAY",e.MULTISELECT="MULTISELECT",e.CASCADE="CASCADE",e.SEARCH_TREE="SEARCH_TREE",e.COLOR="COLOR",e.EVALUATE="EVALUATE",e.MAP="MAP",e.VIDEO="VIDEO",e.SYSTEMFIELDS="SYSTEMFIELDS",e.PERCENTAGE="PERCENTAGE",e.CANDIDATE_COMPONENTS="CANDIDATE_COMPONENTS",e.TASKDATE="TASKDATE",e.AGE="AGE",e.STATUS="STATUS",e.WEBSITE="WEBSITE",e.IDCARD="IDCARD",e.COUNTDOWN="COUNTDOWN",e.DURATION="DURATION",e.COMBINATION="COMBINATION",e.PASSWORD="PASSWORD",e.QR_CODE="QR_CODE",e.CUSTOMER_NAME="CUSTOMER_NAME",e.BANK_CARD="BANK_CARD",e.SEQUENCE="SEQUENCE",e))(o||{});const n=Object.freeze(["onKeydownStart","onKeydown","onKeydownEnd","onPaste","onCopy","onCut","onCurrentChange","onRadioChange","onCheckboxChange","onCheckboxAll","onCheckboxRangeStart","onCheckboxRangeChange","onCheckboxRangeEnd","onCellClick","onCellDblclick","onCellMenu","onCellMouseenter","onCellMouseleave","onHeaderCellClick","onHeaderCellDblclick","onHeaderCellMenu","onFooterCellClick","onFooterCellDblclick","onFooterCellMenu","onSortChange","onFilterChange","onFilterVisible","onResizableChange","onToggleRowExpand","onToggleTreeExpand","onMenuClick","onEditClosed","onEditActived","onEditDisabled","onValidError","onScroll","onCustom","onOpenFnr","onFnrChange","onFnrFind","onFnrFindAll","onFnrReplace","onFnrReplaceAll","onCellAreaCopy","onCellAreaCut","onCellAreaPaste","onCellAreaMerge","onClearCellAreaMerge","onHeaderCellAreaSelection","onCellAreaSelectionStart","onCellAreaSelectionDrag","onCellAreaSelectionEnd","onCellAreaExtensionStart","onCellAreaExtensionDrag","onCellAreaExtensionEnd","onCellAreaArrowsStart","onCellAreaArrowsEnd","onActiveCellChangeStart","onActiveCellChangeEnd"]),E=n.map(e),l=Object.freeze(["firstRowGroup","secondRowGroup","thirdRowGroup","fourthRowGroup","fifthRowGroup","sixthRowGroup","seventhRowGroup","eighthRowGroup","ninthRowGroup","tenthRowGroup"]),C=-1/0,A=1/0;var T=(e=>(e.INPUT="INPUT",e.SEPARATE="SEPARATE",e.SELECT="SELECT",e.DATE="DATE",e.TIME="TIME",e.NUMBER="NUMBER",e))(T||{}),r=(e=>(e[e.NEGATIVE=0]="NEGATIVE",e[e.POSITIVE=1]="POSITIVE",e))(r||{}),t=(e=>(e.NEGATIVE="0",e.POSITIVE="1",e))(t||{}),a=(e=>(e.NOT_TREE="0",e.UNKNOWN="1",e.TRANSFORM_TREE_TYPE="2",e.TRANSFORM_WITH_SPAN_METHOD="3",e))(a||{}),i=(e=>(e[e.left=1]="left",e[e.right=2]="right",e))(i||{});const S=["formChange","settingClick","formClick","keyboard"],I=[...S,...E],R=Symbol("injectionIhoTableConfig"),O=Symbol("injectionIhoTableFieldList"),D=Symbol("InjectionIhoTableEmits"),N=Symbol("InjectionIhoTableAnnotation"),c=Symbol("InjectionIhoTableUUID"),h=Symbol("InjectionIhoTableInstance"),d=Symbol("InjectionIhoTableHandler"),M=Symbol("InjectionIhoTableEventListener");export{T as EDITABLE_WIDGET_TYPE,C as HIGHEST_PRIORITY,i as IHO_TABLE_FIXED_STATUS,r as IHO_TABLE_NUMBER_STATUS,t as IHO_TABLE_STRING_STATUS,a as IHO_TABLE_TREE_TYPE,S as IhoTableCustomEventNameTuple,I as IhoTableEventNameTuple,l as IhoTableRowGroupSequence,N as InjectionIhoTableAnnotation,R as InjectionIhoTableConfig,D as InjectionIhoTableEmits,M as InjectionIhoTableEventListener,O as InjectionIhoTableFieldList,d as InjectionIhoTableHandler,h as InjectionIhoTableInstance,c as InjectionIhoTableUUID,A as LOWEST_PRIORITY,n as VxeEventListenerNameList,E as VxeTableEventNameList,o as WIDGET_TYPE};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{mergeWith as e,isObject as o}from"lodash-es";import{HIGHEST_PRIORITY as i
|
|
1
|
+
import{mergeWith as e,isObject as o}from"lodash-es";import{HIGHEST_PRIORITY as i}from"../../constants/index.js";import{defineTablePlugin as t}from"../../hooks/useTablePlugin.js";import{IhoTableStatusHelper as s}from"../../utils/index.js";function n(){const n="defaultTablePlugin";return t({name:n,apply(t){t.configHooks.config.tap({name:n,stage:i},(o=>{const i=e({height:"100%",border:!0,showSeq:!0,columnConfig:{resizable:!0},rowConfig:{height:36,isHover:!0,isCurrent:!0,keyField:"theUniqueKey"},showOverflow:"tooltip",editConfig:{trigger:"click",mode:"cell"}},o);return(s.isPositive(o.isBatchSelect)||o.selectType)&&(i.selectType=o.selectType||"checkbox"),i})),t.configHooks.mouseConfig.tap({name:n,stage:i},((e,i)=>o(i.keyboardConfig)?Object.assign({selected:!!i.keyboardConfig.isEdit},e):e))}})}export{n as defaultConfigPlugin};
|
|
@@ -45,8 +45,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
45
45
|
emit: (event: "update:value", ...args: any[]) => void;
|
|
46
46
|
formRef: import("vue").Ref<HTMLElement | null>;
|
|
47
47
|
isShow: import("vue").Ref<boolean>;
|
|
48
|
-
formattedValue:
|
|
49
|
-
onConfirm: (value:
|
|
48
|
+
formattedValue: any;
|
|
49
|
+
onConfirm: (value: any) => void;
|
|
50
50
|
isStartDate: any;
|
|
51
51
|
isEndDate: any;
|
|
52
52
|
connectField: string;
|
|
@@ -58,8 +58,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
58
58
|
isSecondDisabled: (second: number) => boolean;
|
|
59
59
|
};
|
|
60
60
|
customDateDisabledDecorator: (customDateDisabled?: Func) => ((ts: number) => any) | null;
|
|
61
|
-
getFormatDate: (str: string) => string;
|
|
62
|
-
onBlur: () => void;
|
|
63
61
|
formatConfig: import("vue").ComputedRef<{
|
|
64
62
|
valueFormat: string;
|
|
65
63
|
format: string;
|
|
@@ -68,9 +66,24 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
68
66
|
};
|
|
69
67
|
}>;
|
|
70
68
|
dateConfig: AnyObject;
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
69
|
+
DatePicker: import("../../../../../../../../es/shared/types").SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
70
|
+
attrs: {
|
|
71
|
+
[x: string]: unknown;
|
|
72
|
+
};
|
|
73
|
+
emits: (event: "update:formattedValue", ...args: any[]) => void;
|
|
74
|
+
datePickerRef: import("vue").Ref<null>;
|
|
75
|
+
__formattedValue: import("vue").Ref<any>;
|
|
76
|
+
keyupValue: import("vue").Ref<string>;
|
|
77
|
+
inputIndex: number;
|
|
78
|
+
placeholder: string;
|
|
79
|
+
formatRef: import("vue").ComputedRef<unknown>;
|
|
80
|
+
updateFormattedValue: (value: any) => void;
|
|
81
|
+
onBlur: () => void;
|
|
82
|
+
onKeyUp: (event: AnyObject) => any;
|
|
83
|
+
NDatePicker: any;
|
|
84
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:formattedValue"[], "update:formattedValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
85
|
+
"onUpdate:formattedValue"?: ((...args: any[]) => any) | undefined;
|
|
86
|
+
}, {}>>;
|
|
74
87
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
75
88
|
value: {
|
|
76
89
|
type: StringConstructor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,useAttrs as t,ref as r,computed as
|
|
1
|
+
import{defineComponent as e,useAttrs as t,ref as r,computed as o,watch as i,openBlock as a,createBlock as s,unref as u,mergeProps as l,isRef as n}from"vue";import{generateTimeFormat as m}from"../../../../../../../shared/utils/index.js";import{isFunction as d}from"lodash-es";import{useIhoTableFormEvent as p}from"../../../../utils/index.js";import{useAutoFocus as c}from"../hooks/useAutoFocus.js";import f from"../../../../../../date-picker/index.js";import w from"../../../../../../../_virtual/plugin-vue_export-helper.js";var v=w(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:w}){const v=e,D=t(),{emitFormChangeWithParams:g}=p(v),{formRef:h,isShow:y}=c(),b=r(v.value),j=e=>{b.value=e;const t=v.value;w("update:value",e),g({oldValue:t})},{isStartDate:S=!1,isEndDate:T=!1}=D,$=D.connectField||"",_=(e,t)=>S&&$?e>t:!(!T||!$)&&e<t,x=e=>{const t=new Date(v.row[$]),r=new Date(e),o=t.getHours(),i=t.getMinutes(),a=t.getSeconds(),s=(e,t,r,o)=>!(T&&r>o)&&(!(S&&r<o)&&_(e,t));return{isHourDisabled:t=>{if(!v.row[$])return!1;const i=new Date(`${v.row[$].split(" ")[0]} 00:00:00`).getTime(),a=r.getMinutes(),u=r.getSeconds();return s(t,o,e-60*t*60*1e3-60*a*1e3-1e3*u,i)},isMinuteDisabled:t=>{if(!v.row[$])return!1;const a=new Date(`${v.row[$].split(" ")[0]} ${o}:00:00`).getTime(),u=r.getSeconds();return s(t,i,e-60*t*1e3-1e3*u,a)},isSecondDisabled:t=>{if(!v.row[$])return!1;const r=new Date(`${v.row[$].split(" ")[0]} ${o}:${i}:00`).getTime();return s(t,a,e-1e3*t,r)}}};function F(e){return d(e)?t=>e(t,v.row):null}const M=o((()=>{const e=D.valueFormat||"yyyy-MM-dd HH:mm:ss";return{valueFormat:e,format:e,timePickerProps:{format:m(e)}}})),k={type:D.type||"datetime",clearable:!0,placeholder:D.placeholder||"请选择",...D,...M.value,isDateDisabled:F(D.isDateDisabled)||(e=>!!v.row[$]&&_(e,T?new Date(`${v.row[$].split(" ")[0]} 00:00:00`).getTime():new Date(v.row[$]).getTime()))};return k.type.includes("time")&&(k.isTimeDisabled=F(D.isTimeDisabled)||x),i((()=>v.value),(e=>{b.value=e})),(e,t)=>(a(),s(u(f),l({ref_key:"formRef",ref:h,show:u(y),"onUpdate:show":t[0]||(t[0]=e=>n(y)?y.value=e:null),"formatted-value":b.value},u(k),{"onUpdate:formattedValue":j}),null,16,["show","formatted-value"]))}}),[["__file","editDate.vue"]]);export{v as default};
|
|
@@ -52,13 +52,30 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
52
52
|
shortcutOptions: any;
|
|
53
53
|
timeConfig: AnyObject;
|
|
54
54
|
clickShortcutOption: (item: string) => void;
|
|
55
|
+
onUpdateFormattedValue: (value: string) => void;
|
|
55
56
|
onBlur: () => void;
|
|
56
|
-
|
|
57
|
+
onKeyUp: (event: AnyObject) => void;
|
|
57
58
|
NInput: any;
|
|
58
59
|
NPopover: any;
|
|
59
60
|
NSpace: any;
|
|
60
61
|
NButton: any;
|
|
61
62
|
NScrollbar: any;
|
|
63
|
+
TimePicker: import("../../../../../../../../es/shared/types").SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
64
|
+
attrs: {
|
|
65
|
+
[x: string]: unknown;
|
|
66
|
+
};
|
|
67
|
+
emits: (event: "update:formattedValue", ...args: any[]) => void;
|
|
68
|
+
timePickerRef: import("vue").Ref<null>;
|
|
69
|
+
__formattedValue: import("vue").Ref<any>;
|
|
70
|
+
keyupValue: import("vue").Ref<string>;
|
|
71
|
+
formatRef: import("vue").ComputedRef<string>;
|
|
72
|
+
updateFormattedValue: (value: any) => void;
|
|
73
|
+
onBlur: () => void;
|
|
74
|
+
onKeyUp: (event: AnyObject) => any;
|
|
75
|
+
NTimePicker: any;
|
|
76
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:formattedValue"[], "update:formattedValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
77
|
+
"onUpdate:formattedValue"?: ((...args: any[]) => any) | undefined;
|
|
78
|
+
}, {}>>;
|
|
62
79
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "update:formattedValue")[], "click" | "update:formattedValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
63
80
|
formattedValue: {
|
|
64
81
|
type: StringConstructor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,useAttrs as t,ref as a,openBlock as
|
|
1
|
+
import{defineComponent as e,useAttrs as t,ref as a,openBlock as o,createBlock as l,unref as r,mergeProps as u,withCtx as i,createVNode as m,isRef as n,createElementBlock as d,Fragment as f,renderList as s,createTextVNode as c,toDisplayString as p,createCommentVNode as v}from"vue";import{NPopover as _,NInput as h,NSpace as y,NScrollbar as k,NButton as V}from"naive-ui";import{useIhoTableFormEvent as w}from"../../../../utils/index.js";import{useAutoFocus as b}from"../hooks/useAutoFocus.js";import g from"../../../../../../time-picker/index.js";import{parse as C,isValid as j,format as F}from"date-fns";import x from"../../../../../../../_virtual/plugin-vue_export-helper.js";var H=x(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:x}){const H=e,q=t(),{emitFormChangeWithParams:O}=w(H),{formRef:A,isShow:M}=b(),R=a(H.formattedValue);let S=H.formattedValue;const{placeholder:T="请选择",valueFormat:U="HH:mm",shortcutOptions:z=[]}=q,B={placeholder:T,valueFormat:U,format:U||"yyyy-MM-dd HH:mm:ss"};function D(e){R.value=e,S!==e&&(x("update:formattedValue",e),O({oldValue:S}),S=e)}function I(){const e=C(H.formattedValue||"",B.valueFormat.replace(/:/,""),new Date);if(j(e)){D(F(e,B.valueFormat))}}function K(e){var t;const{keyCode:a=0}=e;13==a&&(null==(t=A.value)||t.blur(),M.value=!1)}return(t,a)=>(o(),l(r(_),u({show:r(M),trigger:"click",showArrow:!1,placement:"bottom-start",style:{padding:"0"}},t.$attrs,{onClickoutside:a[3]||(a[3]=()=>M.value=!1)}),{trigger:i((()=>[m(r(h),{ref_key:"formRef",ref:A,clearable:"",value:e.formattedValue,"onUpdate:value":a[0]||(a[0]=e=>n(formattedValue)?formattedValue.value=e:null),onClick:a[1]||(a[1]=()=>M.value=!0),onBlur:I,onKeyup:K},null,8,["value"])])),default:i((()=>[m(r(y),null,{default:i((()=>[m(r(g),u({show:"","formatted-value":R.value},r(B),{class:"iho-table__time-picker",to:!1,"onUpdate:formattedValue":D,onConfirm:a[2]||(a[2]=()=>M.value=!1)}),null,16,["formatted-value"]),m(r(k),{class:"iho-table__scrollbar"},{default:i((()=>[r(z).length?(o(),l(r(y),{key:0,vertical:"",wrap:!1},{default:i((()=>[(o(!0),d(f,null,s(r(z),(e=>(o(),l(r(V),{size:"tiny",key:e,onClick:t=>function(e){D(e),M.value=!1}(e)},{default:i((()=>[c(p(e),1)])),_:2},1032,["onClick"])))),128))])),_:1})):v("v-if",!0)])),_:1})])),_:1})])),_:1},16,["show"]))}}),[["__file","editTime.vue"]]);export{H as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createVNode as e}from"vue";import{isArray as
|
|
1
|
+
import{createVNode as e}from"vue";import{jsonParse as r}from"../../../../../../shared/utils/index.js";import{isArray as l,isString as o}from"lodash-es";import"../../../../index.js";import{WIDGET_TYPE as t}from"../../../constants/index.js";import{defineTablePlugin as n}from"../../../hooks/useTablePlugin.js";function i(){return n({name:"labelRendererPlugin",vxe(n){n.renderer.add(t.LABEL,{renderCell(t,{row:n,column:i}){try{if(!n[i.field])return[];const t=r(n[i.field]),s=l(t.labels)?t.labels:(a=t.labelStr,o(a)?a.split(",").map((e=>({labelName:e}))):[]);return e("section",{style:{display:"flex"}},[s.map((function(r){return e("div",{style:{backgroundColor:r.color||"#5585f5",color:"white",flex:"1"}},[r.labelName])}))])}catch(e){return[]}var a}})}})}export{i as labelRendererPlugin};
|
package/es/components/iho-table/src/plugins/rendererPlugins/widgets/pictureRendererPlugin.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,watch as r,onBeforeUnmount as t,createVNode as n}from"vue";import{arrayed as
|
|
1
|
+
import{defineComponent as e,watch as r,onBeforeUnmount as t,createVNode 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(e){function r(e){return{renderCell(r,{row:t,column:s}){try{if(!t[s.field])return[];const r=i(t[s.field]),u=l()-16;return[n("section",{style:"display:flex;justify-content:center"},[n(p,{style:{width:u+"px",height:u+"px",...e},images:o(r).map((e=>e.url))},null)])]}catch(e){return u(`invalid ${r.name} value of field(${s.field}): ${t[s.field]}`),[]}}}}e.renderer.add(s.PICTURE,r({})),e.renderer.add(s.HEADPORTRAIT,r({"border-radius":"50%"}))}})}const p=e({name:"ViewerImage",props:{images:{type:Array,default:()=>[]},options:{type:Object,default:()=>({})}},setup(e){let i=null;function o(){if(i)return i.show();const r=document.createElement("section");e.images.map((e=>r.appendChild(function(e){const r=new Image;return r.src=e,r}(e)))),i=new d(r,e.options).show()}return r([()=>e.images,()=>e.options],(()=>{null==i||i.destroy(),i=null}),{deep:!0}),t((()=>null==i?void 0:i.destroy())),()=>n("img",{style:"cursor:pointer",alt:"",src:e.images[0],onClick:o},null)}});export{a as pictureRendererPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{inject as o,createVNode as e}from"vue";import{SettingsSharp as n}from"@vicons/ionicons5";import{isFunction as i}from"lodash-es";import{NIcon as t}from"naive-ui";import"../../../../index.js";import{InjectionIhoTableEmits as r}from"../../../constants/index.js";import{
|
|
1
|
+
import{inject as o,createVNode as e}from"vue";import{SettingsSharp as n}from"@vicons/ionicons5";import{isFunction as i}from"lodash-es";import{NIcon as t}from"naive-ui";import"../../../../index.js";import{InjectionIhoTableEmits as r}from"../../../constants/index.js";import{IhoTableStatusHelper as s}from"../../../utils/index.js";import{defineTablePlugin as l}from"../../../hooks/useTablePlugin.js";function f(){const f="seqRendererPlugin";return l({name:f,apply(l){l.fieldHooks.field.tap({name:f,before:"checkRendererPlugin"},((l,{index:m,insertBefore:u},c)=>{var d;if(0===m&&c.showSeq){const l={align:"center",fixed:"left",width:50,type:"seq",field:f,annotation:!1,slots:{header(){if(s.isPositive(c.hideSettingBtn))return[];const i=o(r);return[e(t,{style:{cursor:"pointer"},size:"14",color:"#777",component:n,onClick:function(){i&&i("settingClick")}},null)]}}};i(null==(d=c.columnConfig)?void 0:d.seqSlotFn)&&(l.slots||(l.slots={}),l.slots.default=c.columnConfig.seqSlotFn),u(l)}return l}))}})}export{f as seqRendererPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{traverse as e,uuidGenerator as t,DMZ as r}from"../../../../../shared/utils/index.js";import{isArray as n,isFunction as
|
|
1
|
+
import{traverse as e,uuidGenerator as t,DMZ as r}from"../../../../../shared/utils/index.js";import{isArray as n,isFunction as i}from"lodash-es";import{onBeforeUnmount as o}from"vue";import"../../../index.js";import{HIGHEST_PRIORITY as s,IHO_TABLE_TREE_TYPE as a}from"../../constants/index.js";import{isTransformTreeType as d}from"../../utils/index.js";import{defineTablePlugin as l}from"../../hooks/useTablePlugin.js";function f(){const f="virtualTreePlugin",u=new Map;return l({name:f,apply(l){l.configHooks.treeConfig.tap({name:f,stage:s},((e,t)=>d(t)?Object.assign({transform:!0,expandAll:!0,reserve:!0,children:"childrenList",rowField:"__id"},e):e)),l.dataHooks.data.tap(f,((r,i,o)=>{if(!i.treeConfig)return;const{transform:s,rowField:a="__id",parentField:l="parentId",children:f="childrenList"}=i.treeConfig;function u(e){e[a]=e[a]||e.theUniqueKey||t()}d(i)&&s&&(u(r),n(r[f])&&e(r[f],((e,t,r)=>{r&&(e[l]=r[a]),o.insertAfter(e),u(e)}),f,r))})),l.fieldHooks.fieldList.tap(f,((e,t)=>{if(!t.treeConfig)return e;const{transform:n}=t.treeConfig||r;if(!d(t)||!n||!t.uuid)return e;const i=e.filter((e=>!1!==e.visible));let o=i.findIndex((e=>e.treeNode));~o||i.some(((e,t)=>{if(!e.type)return o=t,e.treeNode=!0}));const s=i.length-o-i.filter((e=>"right"===e.fixed)).length;return u.set(t.uuid,{index:o,colspan:s}),e})),l.configHooks.treeConfig.tap(f,((e,t)=>{if(!e)return e;const{transform:r,parentField:n="parentId",hasChild:o="hasChild"}=e;if(i(t.spanMethod)||!r||`${t.isTree}`!==a.TRANSFORM_WITH_SPAN_METHOD)return e;const s=Object.freeze({rowspan:0,colspan:0}),d=Object.freeze({rowspan:1,colspan:1});return t.spanMethod=({row:e,column:r,$columnIndex:i})=>{const a=u.get(t.uuid);if(!a)return d;const l=Reflect.has(e,o)?!e[o]:e[n];return r.treeNode?l?d:{rowspan:1,colspan:a.colspan}:l||"right"===r.fixed||i<a.index?d:s},e})),l.setupHooks.setup.tap(f,(e=>{o((()=>{var t;(null==(t=e.value)?void 0:t.uuid)&&u.delete(e.value.uuid)}))}))}})}export{f as virtualTreePlugin};
|
|
@@ -15,6 +15,7 @@ export declare type IhoTableConfig = VxeTableProps & Partial<{
|
|
|
15
15
|
uuid: string;
|
|
16
16
|
isTree: MaybeString<0 | 1 | 2 | 3>;
|
|
17
17
|
isBatchSelect: MaybeString<0 | 1>;
|
|
18
|
+
hideSettingBtn: MaybeString<0 | 1>;
|
|
18
19
|
showSeq: boolean;
|
|
19
20
|
selectType: Exclude<VxeTableDefines.ColumnInfo['type'], 'seq' | 'expand' | 'html'>;
|
|
20
21
|
rowGroupSetting: Partial<Record<TupleToUnion<typeof IhoTableRowGroupSequence>, IhoTableRowGroupItem[]>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{inject as e,unref as n,toRaw as t,createVNode as r}from"vue";import{jsonParse as o,findAncestor as i}from"../../../../shared/utils/index.js";import{promiseTimeout as u}from"@vueuse/shared";import{isNumber as l,cloneDeep as c,isString as a,isObject as d}from"lodash-es";import{InjectionIhoTableEmits as s,InjectionIhoTableConfig as f,IHO_TABLE_STRING_STATUS as m,IHO_TABLE_NUMBER_STATUS as v}from"../constants/index.js";function
|
|
1
|
+
import{inject as e,unref as n,toRaw as t,createVNode as r}from"vue";import{jsonParse as o,findAncestor as i}from"../../../../shared/utils/index.js";import{promiseTimeout as u}from"@vueuse/shared";import{isNumber as l,cloneDeep as c,isString as a,isObject as d}from"lodash-es";import{InjectionIhoTableEmits as s,InjectionIhoTableConfig as f,IHO_TABLE_STRING_STATUS as m,IHO_TABLE_NUMBER_STATUS as v,IHO_TABLE_TREE_TYPE as p}from"../constants/index.js";function I(e){return console.warn(`[IhoTable]: ${e}`)}const E=Object.freeze({getCellType(e){var n;return((null==(n=e.settingObj)?void 0:n.attr)||e.formType||"DEFAULT").toUpperCase()}});function T(){var n,t,r;const o=e(f);return o||I("this function(getRowHeight) only can be used in setup environment"),null!=(r=null==(t=null==(n=null==o?void 0:o.value)?void 0:n.rowConfig)?void 0:t.height)?r:32}function h(e){const n=e.slice(2);return`${n[0].toLowerCase()}${n.slice(1)}`}function g(e){return`on${e[0].toUpperCase()}${e.slice(1)}`}async function C(e,t){return r()||await u(0),r()||function(){const n=+e.colWidth;return l(n)?n:64}();function r(){var r,o;return null==(o=null==(r=n(t))?void 0:r.getColumnByField(e.field))?void 0:o.renderWidth}}function w(n){const r=e(s);function o(){var e;return{value:n.row[n.column.field],row:n.row,column:{...n.column,...null==(e=n.column.editRender)?void 0:e.props},index:n.rowIndex>-1?n.rowIndex:n.$rowIndex}}function i(e={}){r("formChange",{...o(),...c(t(e))})}function u(e={}){r("formClick",{...o(),...c(t(e))})}return{emitFormChange:function(){i()},emitFormClick:function(){u()},emitFormChangeWithParams:i,emitFormClickWithParams:u}}const O=Object.freeze({createDefaultRenderCell:function(){return function(e,{row:n,column:t}){return[r("span",null,[n[t.field]])]}},createRenderEdit:function(e){return function({props:n},t){return e({...t,fieldItem:n||{},...w(t)})}},isEditableColumn(e,n){var t;return!1!==(null==(t=e.editConfig)?void 0:t.showIcon)&&n.editRender&&!1!==n.editRender.enabled},hasFilter(e){return a(e)&&(e=o(e||"")),d(e)&&((n=e).notParticipatingSearch!==m.POSITIVE&&"manual"===(null==(t=n.mapping)?void 0:t.type));var n,t}}),P=Object.freeze({isPositive:e=>e===v.POSITIVE||e===m.POSITIVE,isNegative:e=>e===v.NEGATIVE||e===m.NEGATIVE,notPositive:e=>e!==v.POSITIVE&&e!==m.POSITIVE,notNegative:e=>e!==v.NEGATIVE&&e!==m.NEGATIVE}),R=(e,n)=>({$event:t,column:r})=>{var o;if((null==(o=r.editRender)?void 0:o.name)!==e)return!0;const u=null==t?void 0:t.target;return!d(u)||!i(u,n)};function F(e){return[p.TRANSFORM_WITH_SPAN_METHOD,p.TRANSFORM_TREE_TYPE].includes(`${e.isTree}`)}export{O as IhoTableRenderHelper,P as IhoTableStatusHelper,E as IhoTableUtils,I as IhoTableWarn,R as createIhoTableClearActivedInterceptor,h as eventListener2EventName,g as eventName2EventListener,C as getColumnRenderWidth,T as getRowHeight,F as isTransformTreeType,w as useIhoTableFormEvent};
|