cnhis-design-vue 3.1.42-beta.13 → 3.1.42-beta.14

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.
@@ -1733,6 +1733,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
1733
1733
  }[] | undefined;
1734
1734
  } | undefined;
1735
1735
  __new?: boolean | undefined;
1736
+ __isCombinationChild?: boolean | undefined;
1736
1737
  }[]>;
1737
1738
  materialListRef: import("vue").Ref<{
1738
1739
  key: string;
@@ -3426,6 +3427,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
3426
3427
  }[] | undefined;
3427
3428
  } | undefined;
3428
3429
  __new?: boolean | undefined;
3430
+ __isCombinationChild?: boolean | undefined;
3429
3431
  }[]>;
3430
3432
  addItem: (formConfigItem: import("./src/types").FormConfigItem) => void;
3431
3433
  parsedTextFormatter: import("./src/types").FormConfigTextFormatter;
@@ -4371,7 +4373,6 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
4371
4373
  };
4372
4374
  }>> & {}>>;
4373
4375
  wrapperSelector: import("vue").ComputedRef<string>;
4374
- key: import("vue").Ref<number>;
4375
4376
  formRenderRef: import("vue").Ref<import("..").FormRenderExpose | undefined>;
4376
4377
  currentActiveField: import("vue").Ref<import("../../../es/shared/types").UndefinedAble<import("./src/types").FormConfigItem>>;
4377
4378
  fieldList: import("vue").Ref<{
@@ -7756,6 +7757,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
7756
7757
  }[] | undefined;
7757
7758
  } | undefined;
7758
7759
  __new?: boolean | undefined;
7760
+ __isCombinationChild?: boolean | undefined;
7759
7761
  }[] | undefined;
7760
7762
  originalSetting?: {
7761
7763
  [x: string]: any;
@@ -9433,6 +9435,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
9433
9435
  }[] | undefined;
9434
9436
  } | undefined;
9435
9437
  __new?: boolean | undefined;
9438
+ __isCombinationChild?: boolean | undefined;
9436
9439
  }>;
9437
9440
  generateFieldListByFormConfigItem: (formConfigItem: import("./src/types").FormConfigItem, fieldItem?: import("..").FieldItem | undefined) => import("..").FieldItem[];
9438
9441
  showModal: import("vue").Ref<boolean>;
@@ -1735,6 +1735,7 @@ declare const _default: import("vue").DefineComponent<{
1735
1735
  }[] | undefined;
1736
1736
  } | undefined;
1737
1737
  __new?: boolean | undefined;
1738
+ __isCombinationChild?: boolean | undefined;
1738
1739
  }[]>;
1739
1740
  materialListRef: import("vue").Ref<{
1740
1741
  key: string;
@@ -3428,6 +3429,7 @@ declare const _default: import("vue").DefineComponent<{
3428
3429
  }[] | undefined;
3429
3430
  } | undefined;
3430
3431
  __new?: boolean | undefined;
3432
+ __isCombinationChild?: boolean | undefined;
3431
3433
  }[]>;
3432
3434
  addItem: (formConfigItem: FormConfigItem) => void;
3433
3435
  parsedTextFormatter: FormConfigTextFormatter;
@@ -4373,7 +4375,6 @@ declare const _default: import("vue").DefineComponent<{
4373
4375
  };
4374
4376
  }>> & {}>>;
4375
4377
  wrapperSelector: import("vue").ComputedRef<string>;
4376
- key: import("vue").Ref<number>;
4377
4378
  formRenderRef: import("vue").Ref<FormRenderExpose | undefined>;
4378
4379
  currentActiveField: import("vue").Ref<import("../../../../es/shared/types").UndefinedAble<FormConfigItem>>;
4379
4380
  fieldList: import("vue").Ref<{
@@ -7758,6 +7759,7 @@ declare const _default: import("vue").DefineComponent<{
7758
7759
  }[] | undefined;
7759
7760
  } | undefined;
7760
7761
  __new?: boolean | undefined;
7762
+ __isCombinationChild?: boolean | undefined;
7761
7763
  }[] | undefined;
7762
7764
  originalSetting?: {
7763
7765
  [x: string]: any;
@@ -9435,6 +9437,7 @@ declare const _default: import("vue").DefineComponent<{
9435
9437
  }[] | undefined;
9436
9438
  } | undefined;
9437
9439
  __new?: boolean | undefined;
9440
+ __isCombinationChild?: boolean | undefined;
9438
9441
  }>;
9439
9442
  generateFieldListByFormConfigItem: (formConfigItem: FormConfigItem, fieldItem?: import("../../../../es/components/form-render").FieldItem | undefined) => import("../../../../es/components/form-render").FieldItem[];
9440
9443
  showModal: import("vue").Ref<boolean>;
@@ -1 +1 @@
1
- import{defineComponent as e,ref as o,provide as r,toRaw as t,openBlock as i,createElementBlock as a,normalizeStyle as m,unref as s,createElementVNode as n,createVNode as f,mergeProps as l,withCtx as u,createTextVNode as c}from"vue";import{useTheme as p}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import{cloneDeep as d,isFunction as g}from"lodash-es";import{uuidGenerator as v}from"../../../shared/utils/index.js";import _ from"../../../shared/components/VueDraggable/src/vuedraggable.js";import h from"./components/FormConfigCreator.vue.js";import j from"./components/FormConfigDragDisplay.vue.js";import C from"./components/FormConfigEdit.vue.js";import x from"./components/FormConfigMaterialItem.js";import{useDataNormalize as y}from"./hooks/useDataNormalize.js";import{InjectionFieldList as F,InjectionMaterialList as V,InjectionActiveFieldItem as k,FORM_CONFIG_GROUP as b}from"./constants/index.js";import"@vicons/ionicons5";import"naive-ui";import D from"../../../_virtual/plugin-vue_export-helper.js";import"./utils/index.js";import{useSortableConfig as R}from"./hooks/useSortalbeConfig.js";import"./hooks/useConfigurationField.js";const H=["id"],E={class:"form-config__material"},L=n("header",{class:"form-config__materialHeader"},"物料区",-1),S={class:"form-config__displayWrapper"},I={class:"form-config__displayHeader"},N={class:"form-config__config"},O=n("header",{class:"form-config__configHeader"},"配置区",-1),T={class:"form-config__configContent"};var U=D(e({__name:"FormConfig",props:{maxHeight:{type:String},fieldVisitor:{type:Object},textFormatter:{type:Function},formRenderRef:{type:Object}},setup(e,{expose:D}){const U=e,w=v(),z=p(),{getCommonConfig:A}=R(),B=o([]);r(F,B);const M=o([]);function W(e){B.value.some((o=>o.key===e.key))||B.value.push(e)}r(V,M);const q=(e,o)=>g(U.textFormatter)?U.textFormatter(e,o):o,G=o();r(k,G);const J=o(),{transform:K,inverseTransform:P}=y(U);return D({loadData({fieldList:e}){let o=[],r=[];e.forEach((e=>function(e){"LINE_BAR"===e.type&&(e.children=[]);!1===e.show?r.push(e):o.push(e)}(d(t(e))))),B.value=K(o),M.value=r,G.value=void 0},validate(){var e;return null==(e=J.value)?void 0:e.validate()},getData:()=>({fieldList:P(d(t(B.value))),materialList:P(d(t(M.value)))})}),(o,r)=>(i(),a("section",{class:"form-config",style:m({"--max-height":e.maxHeight,...s(z)}),id:s(w)},[n("section",E,[L,f(s(_),l(s(A)(),{class:"form-config__materialContent",modelValue:M.value,"onUpdate:modelValue":r[0]||(r[0]=e=>M.value=e)}),{item:u((({element:e})=>[f(s(x),{"form-config-item":e,"text-formatter":q},null,8,["form-config-item"])])),_:1},16,["modelValue"])]),n("section",S,[n("header",I,[c(" 布局区 "),f(h,{onSubmit:W})]),f(j,{class:"form-config__displayContent",group:s(b),"text-formatter":q,modelValue:B.value,"onUpdate:modelValue":r[1]||(r[1]=e=>B.value=e)},null,8,["group","modelValue"])]),n("section",N,[O,n("section",T,[f(C,{ref_key:"formConfigEditRef",ref:J,uuid:s(w),"form-render-ref":e.formRenderRef},null,8,["uuid","form-render-ref"])])])],12,H))}}),[["__file","FormConfig.vue"]]);export{U as default};
1
+ import{defineComponent as e,ref as o,provide as r,toRaw as t,openBlock as i,createElementBlock as a,normalizeStyle as n,unref as m,createElementVNode as s,createVNode as l,mergeProps as f,withCtx as u,createTextVNode as c}from"vue";import{useTheme as d}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import{cloneDeep as p,isArray as g,isFunction as v}from"lodash-es";import{uuidGenerator as h}from"../../../shared/utils/index.js";import _ from"../../../shared/components/VueDraggable/src/vuedraggable.js";import C from"./components/FormConfigCreator.vue.js";import j from"./components/FormConfigDragDisplay.vue.js";import x from"./components/FormConfigEdit.vue.js";import y from"./components/FormConfigMaterialItem.js";import{useDataNormalize as F}from"./hooks/useDataNormalize.js";import{InjectionFieldList as V,InjectionMaterialList as b,InjectionActiveFieldItem as k,FORM_CONFIG_GROUP as D}from"./constants/index.js";import"@vicons/ionicons5";import"naive-ui";import R from"../../../_virtual/plugin-vue_export-helper.js";import"./utils/index.js";import{useSortableConfig as E}from"./hooks/useSortalbeConfig.js";import"./hooks/useConfigurationField.js";const H=["id"],I={class:"form-config__material"},L=s("header",{class:"form-config__materialHeader"},"物料区",-1),N={class:"form-config__displayWrapper"},O={class:"form-config__displayHeader"},S={class:"form-config__config"},T=s("header",{class:"form-config__configHeader"},"配置区",-1),A={class:"form-config__configContent"};var B=R(e({__name:"FormConfig",props:{maxHeight:{type:String},fieldVisitor:{type:Object},textFormatter:{type:Function},formRenderRef:{type:Object}},setup(e,{expose:R}){const B=e,M=h(),U=d(),{getCommonConfig:w}=E(),z=o([]);r(V,z);const W=o([]);function q(e){z.value.some((o=>o.key===e.key))||z.value.push(e)}r(b,W);const G=(e,o)=>v(B.textFormatter)?B.textFormatter(e,o):o,J=o();r(k,J);const K=o(),{transform:P,inverseTransform:Q}=F(B);return R({loadData({fieldList:e}){let o=[],r=[];e.forEach((e=>function(e){"LINE_BAR"===e.type&&(e.children=[]);!1===e.show?r.push(e):o.push(e),"COMBINATION"===e.type&&g(e.children)&&e.children.length&&e.children.forEach((e=>{e.__isCombinationChild=!0}))}(p(t(e))))),z.value=P(o),W.value=r,J.value=void 0},validate(){var e;return null==(e=K.value)?void 0:e.validate()},getData:()=>({fieldList:Q(p(t(z.value))),materialList:Q(p(t(W.value)))})}),(o,r)=>(i(),a("section",{class:"form-config",style:n({"--max-height":e.maxHeight,...m(U)}),id:m(M)},[s("section",I,[L,l(m(_),f(m(w)(),{class:"form-config__materialContent",modelValue:W.value,"onUpdate:modelValue":r[0]||(r[0]=e=>W.value=e)}),{item:u((({element:e})=>[l(m(y),{"form-config-item":e,"text-formatter":G},null,8,["form-config-item"])])),_:1},16,["modelValue"])]),s("section",N,[s("header",O,[c(" 布局区 "),l(C,{onSubmit:q})]),l(j,{class:"form-config__displayContent",group:m(D),"text-formatter":G,modelValue:z.value,"onUpdate:modelValue":r[1]||(r[1]=e=>z.value=e)},null,8,["group","modelValue"])]),s("section",S,[T,s("section",A,[l(x,{ref_key:"formConfigEditRef",ref:K,uuid:m(M),"form-render-ref":e.formRenderRef},null,8,["uuid","form-render-ref"])])])],12,H))}}),[["__file","FormConfig.vue"]]);export{B as default};
@@ -20,7 +20,6 @@ declare const _default: import("vue").DefineComponent<{
20
20
  };
21
21
  }>> & {}>>;
22
22
  wrapperSelector: import("vue").ComputedRef<string>;
23
- key: import("vue").Ref<number>;
24
23
  formRenderRef: import("vue").Ref<FormRenderExpose | undefined>;
25
24
  currentActiveField: import("vue").Ref<import("../../../../../es/shared/types").UndefinedAble<FormConfigItem>>;
26
25
  fieldList: import("vue").Ref<{
@@ -3405,6 +3404,7 @@ declare const _default: import("vue").DefineComponent<{
3405
3404
  }[] | undefined;
3406
3405
  } | undefined;
3407
3406
  __new?: boolean | undefined;
3407
+ __isCombinationChild?: boolean | undefined;
3408
3408
  }[] | undefined;
3409
3409
  originalSetting?: {
3410
3410
  [x: string]: any;
@@ -5082,6 +5082,7 @@ declare const _default: import("vue").DefineComponent<{
5082
5082
  }[] | undefined;
5083
5083
  } | undefined;
5084
5084
  __new?: boolean | undefined;
5085
+ __isCombinationChild?: boolean | undefined;
5085
5086
  }>;
5086
5087
  generateFieldListByFormConfigItem: (formConfigItem: FormConfigItem, fieldItem?: FieldItem | undefined) => FieldItem[];
5087
5088
  showModal: import("vue").Ref<boolean>;
@@ -1 +1 @@
1
- import{defineComponent as e,computed as i,ref as o,inject as t,watch as l,toRaw as a,openBlock as r,createElementBlock as n,Fragment as u,createBlock as s,unref as m,createVNode as d,nextTick as v}from"vue";import{cloneDeep as f}from"lodash-es";import{InjectionActiveFieldItem as p}from"../constants/index.js";import"../../../../shared/components/VueDraggable/src/vuedraggable.js";import{findFieldItemByKey as c}from"../utils/index.js";import g from"../../../../_virtual/plugin-vue_export-helper.js";import"@vicons/ionicons5";import{NModal as h}from"naive-ui";import"../../../../shared/utils/index.js";import{useConfigurationField as y}from"../hooks/useConfigurationField.js";import"../../../index.js";import j from"../../../form-render/index.js";var x=g(e({__name:"FormConfigEdit",props:{uuid:{type:String,required:!0},formRenderRef:{type:Object}},setup(e,{expose:g}){const x=e,_=i((()=>`#${x.uuid} .form-config__config`)),F=o(0),b=o(),k=t(p),C=o([]),R=o({}),{generateFieldListByFormConfigItem:w}=y(),P=o(!1);async function E(){var e;k.value=L,await v(),null==(e=b.value)||e.validate()}let L=null;function q({fieldKey:e,value:i}){k.value&&(k.value[e]=i)}return l(k,(async(e,i)=>{var o,t;if(!e)return C.value=[];if(i&&e!==L)try{await(null==(o=b.value)?void 0:o.validate())}catch(e){return P.value=!0}L=e,R.value={editable:!0,...f(a(e))};const l=null==(t=x.formRenderRef)?void 0:t.getFieldList();C.value=w(e,c(l,e.key)).map((e=>({...e,componentProps:{...e.componentProps,to:_.value}}))),F.value++}),{immediate:!0}),g({validate(){var e;return null==(e=b.value)?void 0:e.validate()}}),(e,i)=>(r(),n(u,null,[(r(),s(m(j),{key:F.value,column:12,ref_key:"formRenderRef",ref:b,size:"small",onFormChange:q,"field-list":C.value,"initial-data":R.value},null,8,["field-list","initial-data"])),d(m(h),{show:P.value,"onUpdate:show":i[0]||(i[0]=e=>P.value=e),preset:"dialog",to:m(_),"close-on-esc":!1,"mask-closable":!1,closable:!1,title:"存在填写错误的字段","positive-text":"继续编辑",onPositiveClick:E},null,8,["show","to"])],64))}}),[["__file","FormConfigEdit.vue"]]);export{x as default};
1
+ import{defineComponent as e,computed as o,ref as i,inject as l,watch as t,toRaw as a,openBlock as r,createElementBlock as n,Fragment as u,createVNode as s,unref as m,nextTick as d}from"vue";import{cloneDeep as v}from"lodash-es";import{InjectionActiveFieldItem as f}from"../constants/index.js";import"../../../../shared/components/VueDraggable/src/vuedraggable.js";import{findFieldItemByKey as p}from"../utils/index.js";import c from"../../../../_virtual/plugin-vue_export-helper.js";import"@vicons/ionicons5";import{NModal as g}from"naive-ui";import"../../../../shared/utils/index.js";import{useConfigurationField as h}from"../hooks/useConfigurationField.js";import"../../../index.js";import j from"../../../form-render/index.js";var x=c(e({__name:"FormConfigEdit",props:{uuid:{type:String,required:!0},formRenderRef:{type:Object}},setup(e,{expose:c}){const x=e,y=o((()=>`#${x.uuid} .form-config__config`)),_=i(),F=l(f),b=i([]),w=i({}),{generateFieldListByFormConfigItem:C}=h(),R=i(!1);async function k(){var e;F.value=P,await d(),null==(e=_.value)||e.validate()}let P=null;function E({fieldKey:e,value:o}){F.value&&(F.value[e]=o)}return t(F,(async(e,o)=>{var i,l,t;if(!e)return b.value=[];if(o&&e!==P)try{await(null==(i=_.value)?void 0:i.validate())}catch(e){return R.value=!0}P=e,w.value={editable:!0,show:!0,...v(a(e))};const r=null==(l=x.formRenderRef)?void 0:l.getFieldList();b.value=C(e,p(r,e.key)).map((e=>({...e,componentProps:{...e.componentProps,to:y.value}}))),null==(t=_.value)||t.reload()}),{immediate:!0}),c({validate(){var e;return null==(e=_.value)?void 0:e.validate()}}),(e,o)=>(r(),n(u,null,[s(m(j),{column:12,ref_key:"formRenderRef",ref:_,size:"small",onFormChange:E,"field-list":b.value,"initial-data":w.value},null,8,["field-list","initial-data"]),s(m(g),{show:R.value,"onUpdate:show":o[0]||(o[0]=e=>R.value=e),preset:"dialog",to:m(y),"close-on-esc":!1,"mask-closable":!1,closable:!1,title:"存在填写错误的字段","positive-text":"继续编辑",onPositiveClick:k},null,8,["show","to"])],64))}}),[["__file","FormConfigEdit.vue"]]);export{x as default};
@@ -1 +1 @@
1
- import{defineComponent as e,inject as o,computed as t,openBlock as r,createElementBlock as i,mergeProps as f,unref as m,withModifiers as n,createVNode as l,normalizeClass as a,withCtx as u,createTextVNode as s,toDisplayString as d,createBlock as p,createCommentVNode as c}from"vue";import{NEllipsis as g}from"naive-ui";import C from"./CloseButton.vue.js";import{InjectionActiveFieldItem as v,WidgetTextMap as _}from"../../constants/index.js";import{bindHover as I}from"../../utils/index.js";import y from"../../../../../_virtual/plugin-vue_export-helper.js";const x=["onClick","data-type"];var j=y(e({__name:"DefaultNode",props:{formConfigItem:{type:Object,required:!0},textFormatter:{type:Function,required:!0},showCloseButton:{type:Boolean,default:!0},allowClick:{type:Boolean,default:!0}},setup(e){const y=e,j=o(v);function k(){y.allowClick&&(j.value=y.formConfigItem)}const q=t((()=>["form-config__renderer--default",{"is-required":y.formConfigItem.required}])),B=t((()=>[{"is-active":j.value===y.formConfigItem,"is-disabled":w.value},"form-config__renderer","form-config__renderer--defaultWrapper"])),w=t((()=>!1===y.formConfigItem.editable)),b=t((()=>{const e=_.get(y.formConfigItem.type);return y.textFormatter(y.formConfigItem,`${y.formConfigItem.name}${e?`(${e})`:""}`)}));return(o,t)=>(r(),i("div",f(m(I)(e.formConfigItem),{onClick:n(k,["stop"]),class:m(B),"data-type":e.formConfigItem.type}),[l(m(g),{class:a(m(q))},{default:u((()=>[s(d(m(b)),1)])),_:1},8,["class"]),e.showCloseButton&&!e.formConfigItem.required?(r(),p(C,{key:0,"form-config-item":e.formConfigItem},null,8,["form-config-item"])):c("v-if",!0)],16,x))}}),[["__file","DefaultNode.vue"]]);export{j as default};
1
+ import{defineComponent as e,inject as o,computed as t,openBlock as r,createElementBlock as i,mergeProps as f,unref as m,withModifiers as n,createVNode as l,normalizeClass as a,withCtx as u,createTextVNode as s,toDisplayString as d,createBlock as p,createCommentVNode as C}from"vue";import{NEllipsis as c}from"naive-ui";import g from"./CloseButton.vue.js";import{InjectionActiveFieldItem as _,WidgetTextMap as v}from"../../constants/index.js";import{bindHover as I}from"../../utils/index.js";import y from"../../../../../_virtual/plugin-vue_export-helper.js";const x=["onClick","data-type"];var j=y(e({__name:"DefaultNode",props:{formConfigItem:{type:Object,required:!0},textFormatter:{type:Function,required:!0},showCloseButton:{type:Boolean,default:!0},allowClick:{type:Boolean,default:!0}},setup(e){const y=e,j=o(_);function k(){y.allowClick&&(j.value=y.formConfigItem)}const q=t((()=>["form-config__renderer--default",{"is-required":y.formConfigItem.required}])),B=t((()=>[{"is-active":j.value===y.formConfigItem,"is-disabled":b.value},"form-config__renderer","form-config__renderer--defaultWrapper"])),b=t((()=>!1===y.formConfigItem.editable)),h=t((()=>{const e=v.get(y.formConfigItem.type);return y.textFormatter(y.formConfigItem,`${y.formConfigItem.name}${e?`(${e})`:""}`)}));return(o,t)=>(r(),i("div",f(m(I)(e.formConfigItem),{onClick:n(k,["stop"]),class:m(B),"data-type":e.formConfigItem.type}),[l(m(c),{class:a(m(q))},{default:u((()=>[s(d(m(h)),1)])),_:1},8,["class"]),!e.showCloseButton||e.formConfigItem.required||e.formConfigItem.__isCombinationChild?C("v-if",!0):(r(),p(g,{key:0,"form-config-item":e.formConfigItem},null,8,["form-config-item"]))],16,x))}}),[["__file","DefaultNode.vue"]]);export{j as default};
@@ -11,7 +11,8 @@ export declare enum EditAbleField {
11
11
  DEFAULT_EXPAND = "defaultExpand",
12
12
  FOLD = "fold",
13
13
  REQUIRED = "required",
14
- EDITABLE = "editable"
14
+ EDITABLE = "editable",
15
+ SHOW = "show"
15
16
  }
16
17
  export declare function widgetWidthOptionConfig(): {
17
18
  option: {
@@ -59,6 +60,16 @@ export declare function isNullOptionConfig(): {
59
60
  value: boolean;
60
61
  };
61
62
  };
63
+ export declare function isVisibleOptionConfig(): {
64
+ open: {
65
+ describe: string;
66
+ value: boolean;
67
+ };
68
+ close: {
69
+ describe: string;
70
+ value: boolean;
71
+ };
72
+ };
62
73
  export declare const FORM_CONFIG_GROUP = "__display";
63
74
  export declare const InjectionFieldList: InjectionKey<Ref<FormConfigItem[]>>;
64
75
  export declare const InjectionMaterialList: InjectionKey<Ref<FormConfigItem[]>>;
@@ -1 +1 @@
1
- const e=new Map([["LINE_BAR","分线栏"],["NEWLINE","分行符"]]);var t=(e=>(e.NAME="name",e.NOTES="notes",e.DEFAULT_VALUE="defaultValue",e.LAYOUT_WIDTH_ENUM="layoutWidthEnum",e.DESC="desc",e.DEFAULT_EXPAND="defaultExpand",e.FOLD="fold",e.REQUIRED="required",e.EDITABLE="editable",e))(t||{});function l(){return{option:[{text:"整行",value:"ALL_LINE"},{text:"半行",value:"HALF_LINE"},{text:"5/6",value:"FIVE_SIX"},{text:"2/3",value:"TWO_THREE"},{text:"1/3",value:"ONE_THREE"},{text:"3/4",value:"THREE_FOUR"},{text:"1/4",value:"ONE_FOUR"},{text:"1/6",value:"ONE_SIX"},{text:"1/8",value:"ONE_EIGHT"}]}}function n(){return{open:{describe:"默认展开",value:!0},close:{describe:"默认收起",value:!1}}}function u(){return{open:{describe:"可折叠",value:!0},close:{describe:"不可折叠",value:!1}}}function E(){return{open:{describe:"可编辑",value:!0},close:{describe:"不可编辑",value:!1}}}function a(){return{open:{describe:"必填",value:!0},close:{describe:"不必填",value:!1}}}const i="__display",o=Symbol("InjectionFieldList"),c=Symbol("InjectionMaterialList"),r=Symbol("InjectionActiveFieldItem");export{t as EditAbleField,i as FORM_CONFIG_GROUP,r as InjectionActiveFieldItem,o as InjectionFieldList,c as InjectionMaterialList,e as WidgetTextMap,E as isEditOptionConfig,u as isNotFoldOptionConfig,a as isNullOptionConfig,n as isShowOptionConfig,l as widgetWidthOptionConfig};
1
+ const e=new Map([["LINE_BAR","分线栏"],["NEWLINE","分行符"]]);var t=(e=>(e.NAME="name",e.NOTES="notes",e.DEFAULT_VALUE="defaultValue",e.LAYOUT_WIDTH_ENUM="layoutWidthEnum",e.DESC="desc",e.DEFAULT_EXPAND="defaultExpand",e.FOLD="fold",e.REQUIRED="required",e.EDITABLE="editable",e.SHOW="show",e))(t||{});function l(){return{option:[{text:"整行",value:"ALL_LINE"},{text:"半行",value:"HALF_LINE"},{text:"5/6",value:"FIVE_SIX"},{text:"2/3",value:"TWO_THREE"},{text:"1/3",value:"ONE_THREE"},{text:"3/4",value:"THREE_FOUR"},{text:"1/4",value:"ONE_FOUR"},{text:"1/6",value:"ONE_SIX"},{text:"1/8",value:"ONE_EIGHT"}]}}function n(){return{open:{describe:"默认展开",value:!0},close:{describe:"默认收起",value:!1}}}function u(){return{open:{describe:"可折叠",value:!0},close:{describe:"不可折叠",value:!1}}}function a(){return{open:{describe:"可编辑",value:!0},close:{describe:"不可编辑",value:!1}}}function o(){return{open:{describe:"必填",value:!0},close:{describe:"不必填",value:!1}}}function E(){return{open:{describe:"显示",value:!0},close:{describe:"隐藏",value:!1}}}const i="__display",c=Symbol("InjectionFieldList"),r=Symbol("InjectionMaterialList"),s=Symbol("InjectionActiveFieldItem");export{t as EditAbleField,i as FORM_CONFIG_GROUP,s as InjectionActiveFieldItem,c as InjectionFieldList,r as InjectionMaterialList,e as WidgetTextMap,a as isEditOptionConfig,u as isNotFoldOptionConfig,o as isNullOptionConfig,n as isShowOptionConfig,E as isVisibleOptionConfig,l as widgetWidthOptionConfig};
@@ -1 +1 @@
1
- import{omit as e,pick as t}from"lodash-es";import{EditAbleField as l,widgetWidthOptionConfig as i,isShowOptionConfig as a,isNotFoldOptionConfig as o,isEditOptionConfig as r,isNullOptionConfig as _}from"../constants/index.js";import"../../../form-render/index.js";import{useFieldNormalize as n}from"../../../form-render/src/hooks/useFieldNormalize.js";const{FieldNormalizeWaterfallHook:s}=n();function m(){const n=new Map([[l.NAME,()=>({alias:"名称",elem_width:6,is_null:"0",html_type:"INPUT"})],[l.NOTES,()=>({alias:"问号提示",elem_width:6,html_type:"INPUT",is_empty:"0"})],[l.DEFAULT_VALUE,(l,i)=>{const a=s.call(Object.assign({},null==l?void 0:l.originalSetting,i));return{alias:"默认值",elem_width:6,html_type:"INPUT",is_empty:"0",componentProps:e(a.componentProps,["class","style","disabled"]),...t(a,["html_type","validate","option","multi_select","multi_select_value","wordbook","open","close","date_format","step_length","urlConfig","autograph","defined_error_msg","free_entry","validator"])}}],[l.LAYOUT_WIDTH_ENUM,()=>({alias:"宽度",fieldType:"number",html_type:"SELECT",elem_width:6,...i()})],[l.DESC,()=>({alias:"说明文本",elem_width:6,html_type:"INPUT",is_empty:"0",validate:{max_length:30}})],[l.DEFAULT_EXPAND,()=>({alias:"是否默认展开",html_type:"SWITCH",elem_width:6,...a()})],[l.FOLD,()=>({alias:"是否可折叠",html_type:"SWITCH",elem_width:6,...o()})],[l.EDITABLE,e=>({alias:"是否可编辑",html_type:"SWITCH",elem_width:6,is_edit:(null==e?void 0:e.editableDisabled)?"0":"1",...r()})],[l.REQUIRED,e=>({alias:"是否必填",html_type:"SWITCH",elem_width:6,is_edit:(null==e?void 0:e.requiredDisabled)?"0":"1",..._()})]]);function m(e,t,l){return e.map((e=>{var i,a;return{...null!=(a=null==(i=n.get(e))?void 0:i(t,l))?a:{},val_key:e}}))}return{generateFieldListByKeys:m,generateFieldListByFormConfigItem:function(e,t){const i=new Map([["LINE_BAR",[l.NAME,l.LAYOUT_WIDTH_ENUM,l.NOTES,l.DEFAULT_EXPAND,l.FOLD]],...["NEWLINE","COMPLEX","COMBINATION"].map((e=>[e,[l.NAME,l.LAYOUT_WIDTH_ENUM]]))]),a=[l.NAME,l.DEFAULT_VALUE,l.LAYOUT_WIDTH_ENUM,l.DESC,l.NOTES,l.EDITABLE,l.REQUIRED];return m(i.get(e.type)||a,e,t)}}}export{m as useConfigurationField};
1
+ import{omit as e,pick as t}from"lodash-es";import{EditAbleField as l,widgetWidthOptionConfig as i,isShowOptionConfig as a,isNotFoldOptionConfig as o,isEditOptionConfig as _,isNullOptionConfig as s,isVisibleOptionConfig as n}from"../constants/index.js";import"../../../form-render/index.js";import{useFieldNormalize as m}from"../../../form-render/src/hooks/useFieldNormalize.js";const{FieldNormalizeWaterfallHook:r}=m();function d(){const m=new Map([[l.NAME,()=>({alias:"名称",elem_width:6,is_null:"0",html_type:"INPUT"})],[l.NOTES,()=>({alias:"问号提示",elem_width:6,html_type:"INPUT",is_empty:"0"})],[l.DEFAULT_VALUE,(l,i)=>{const a=r.call(Object.assign({},null==l?void 0:l.originalSetting,i));return{alias:"默认值",elem_width:6,html_type:"INPUT",is_empty:"0",componentProps:e(a.componentProps,["class","style","disabled"]),...t(a,["html_type","validate","option","multi_select","multi_select_value","wordbook","open","close","date_format","step_length","urlConfig","autograph","defined_error_msg","free_entry","validator"])}}],[l.LAYOUT_WIDTH_ENUM,()=>({alias:"宽度",fieldType:"number",html_type:"SELECT",elem_width:6,...i()})],[l.DESC,()=>({alias:"说明文本",elem_width:6,html_type:"INPUT",is_empty:"0",validate:{max_length:30}})],[l.DEFAULT_EXPAND,()=>({alias:"是否默认展开",html_type:"SWITCH",elem_width:6,...a()})],[l.FOLD,()=>({alias:"是否可折叠",html_type:"SWITCH",elem_width:6,...o()})],[l.EDITABLE,e=>({alias:"是否可编辑",html_type:"SWITCH",elem_width:6,is_edit:(null==e?void 0:e.editableDisabled)?"0":"1",..._()})],[l.REQUIRED,e=>({alias:"是否必填",html_type:"SWITCH",elem_width:6,is_edit:(null==e?void 0:e.requiredDisabled)?"0":"1",...s()})],[l.SHOW,e=>({alias:"是否显示",html_type:"SWITCH",elem_width:6,is_show:(null==e?void 0:e.__isCombinationChild)?"1":"0",...n()})]]);function d(e,t,l){return e.map((e=>{var i,a;return{...null!=(a=null==(i=m.get(e))?void 0:i(t,l))?a:{},val_key:e}}))}const E=new Map([["LINE_BAR",[l.NAME,l.LAYOUT_WIDTH_ENUM,l.NOTES,l.DEFAULT_EXPAND,l.FOLD]],...["NEWLINE","COMPLEX","COMBINATION"].map((e=>[e,[l.NAME,l.LAYOUT_WIDTH_ENUM]]))]),p=[l.NAME,l.DEFAULT_VALUE,l.LAYOUT_WIDTH_ENUM,l.DESC,l.NOTES,l.EDITABLE,l.REQUIRED,l.SHOW];return{generateFieldListByKeys:d,generateFieldListByFormConfigItem:function(e,t){return d(E.get(e.type)||p,e,t)}}}export{d as useConfigurationField};
@@ -29,6 +29,7 @@ export declare type FormConfigItem = {
29
29
  children: FormConfigItem[];
30
30
  originalSetting: FieldItem;
31
31
  __new: boolean;
32
+ __isCombinationChild: boolean;
32
33
  }>;
33
34
  export interface FormConfigTextFormatter {
34
35
  (formConfigItem: FormConfigItem, parsedText: string): string;
@@ -1 +1 @@
1
- import{defineComponent as e,reactive as o,createVNode as t,mergeProps as r}from"vue";import{NSelect as l}from"naive-ui";import{useIhoTableFormEvent as a}from"../../../../utils/index.js";import{useAutoFocus as n}from"../hooks/useAutoFocus.js";import{useDebounceFn as i}from"@vueuse/core";var u=e({name:"EditSelect",inheritAttrs:!1,components:{NSelect:l},props:{value:{type:[Array,String,Number],default:void 0},column:{type:Object,required:!0},row:{type:Object,required:!0},rowIndex:{type:Number,required:!0}},emits:["update:value"],setup(e,{attrs:u,emit:s}){const{isShow:c,setRef:p}=n(),{emitFormChangeWithParams:d}=a(e),m=o({placeholder:u.placeholder||"请选择",options:u.options});async function v(o){var t;m.loading=!0;const r={keyword:o,row:e.row,column:e.column,rowIndex:e.rowIndex};try{m.options=await(null==(t=u.queryOptions)?void 0:t.call(u,r)),m.loading=!1}catch(o){console.log(`获取${e.column.field}_options错误`)}}function h(o){const t=e.value;s("update:value",o),d({oldValue:t})}m.options||(m.remote=!0,m.loading=!1,m.onSearch=i(v,800),m.onSearch(""));const f=()=>({class:"iho-table__selectOption"}),w={class:"iho-table__selectMenu"};return()=>t(l,r({ref:p,show:c.value,"onUpdate:show":e=>c.value=e},u,m,{value:e.value,clearable:!0,filterable:!0,nodeProps:f,menuProps:w,onUpdateValue:h}),null)}});export{u as default};
1
+ import{defineComponent as e,reactive as o,createVNode as t,mergeProps as r}from"vue";import{NSelect as l}from"naive-ui";import{useIhoTableFormEvent as a}from"../../../../utils/index.js";import{useAutoFocus as n}from"../hooks/useAutoFocus.js";import{useDebounceFn as i}from"@vueuse/core";var u=e({name:"EditSelect",inheritAttrs:!1,components:{NSelect:l},props:{value:{type:[Array,String,Number],default:void 0},column:{type:Object,required:!0},row:{type:Object,required:!0},rowIndex:{type:Number,required:!0}},emits:["update:value"],setup(e,{attrs:u,emit:s}){const{isShow:c,setRef:p}=n(),{emitFormChangeWithParams:d}=a(e),m=o({placeholder:u.placeholder||"请选择",options:u.options});async function v(o){var t;m.loading=!0;const r={keyword:o,row:e.row,column:e.column,rowIndex:e.rowIndex};try{m.options=await(null==(t=u.queryOptions)?void 0:t.call(u,r)),m.loading=!1}catch(o){console.log(`获取${e.column.field}_options错误`)}}function h(o){const t=e.value;s("update:value",o),d({oldValue:t})}m.options||(m.remote=!0,m.loading=!1,m.onSearch=i(v,400),m.onSearch(""));const f=()=>({class:"iho-table__selectOption"}),w={class:"iho-table__selectMenu"};return()=>t(l,r({ref:p,show:c.value,"onUpdate:show":e=>c.value=e},u,m,{value:e.value,clearable:!0,filterable:!0,nodeProps:f,menuProps:w,onUpdateValue:h}),null)}});export{u as default};
@@ -1 +1 @@
1
- import{reactive as e,inject as o,createVNode as i,mergeProps as t,onBeforeUnmount as n}from"vue";import"../../../../../index.js";import{EDITABLE_WIDGET_TYPE as r,InjectionIhoTableUUID as l}from"../../../../constants/index.js";import{createIhoTableClearActivedInterceptor as d,IhoTableRenderHelper as s}from"../../../../utils/index.js";import u from"./editSelect.js";import{getDefaultValue as p}from"./selectUtils.js";import{defineTablePlugin as a}from"../../../../hooks/useTablePlugin.js";function c(){const c="selectRendererPlugin",f=e(new Map),m=e(new Map);return a({name:c,vxe(e){e.interceptor.add("event.clearActived",d(r.SELECT,(e=>e.classList.contains("n-base-select-menu-option-wrapper")))),e.renderer.add(r.SELECT,{renderCell({props:e},{row:t,column:n,rowIndex:r}){var d,s;const u=o(l),a=(null==(s=null==(d=f.get(u))?void 0:d.find((e=>e.field===n.field)))?void 0:s.options)||[],c=p(t,e,a);return[i("span",null,[c])]},renderEdit:s.createRenderEdit((({fieldItem:e,emitFormClick:o,row:n,column:r,$rowIndex:l})=>[i(u,t({options:e.options,queryOptions:e.queryOptions},e.componentProps,{column:r,row:n,"row-index":l,value:n[r.field],"onUpdate:value":e=>n[r.field]=e,onClick:o}),null)]))})},apply(e){e.fieldHooks.fieldList.tap(c,((e,{uuid:o})=>(o&&m.set(o,e),e))),e.dataHooks.data.tapPromise(c,(async(e,o,{index:i,$table:t})=>{var n;if(!o.uuid)return;const r=m.get(o.uuid),l=f.get(o.uuid)||[];for(const t of r)if(t.field){if("select"===t.formType){if(l.findIndex((e=>e.field===t.field))>-1)continue;let o=t.options||[];if(t.queryOptions)try{const r={keyword:"",row:e,column:t,rowIndex:i};o=await(null==(n=t.queryOptions)?void 0:n.call(t,r))}catch(e){console.log(`获取${t.field}_options错误`)}l.push({field:t.field,options:o})}f.set(o.uuid,l)}})),e.setupHooks.setup.tap(c,(e=>{n((()=>{e.value.uuid&&(m.delete(e.value.uuid),f.delete(e.value.uuid))}))}))}})}export{c as selectRendererPlugin};
1
+ import{reactive as e,inject as o,createVNode as i,mergeProps as t,onBeforeUnmount as n}from"vue";import"../../../../../index.js";import{EDITABLE_WIDGET_TYPE as l,InjectionIhoTableUUID as r}from"../../../../constants/index.js";import{createIhoTableClearActivedInterceptor as d,IhoTableRenderHelper as s}from"../../../../utils/index.js";import u from"./editSelect.js";import{getDefaultValue as p}from"./selectUtils.js";import{defineTablePlugin as a}from"../../../../hooks/useTablePlugin.js";function c(){const c="selectRendererPlugin",f=e(new Map),m=e(new Map);return a({name:c,vxe(e){e.interceptor.add("event.clearActived",d(l.SELECT,(e=>e.classList.contains("iho-table__selectMenu")))),e.renderer.add(l.SELECT,{renderCell({props:e},{row:t,column:n}){var l,d;const s=o(r),u=(null==(d=null==(l=f.get(s))?void 0:l.find((e=>e.field===n.field)))?void 0:d.options)||[],a=p(t,e,u);return[i("span",null,[a])]},renderEdit:s.createRenderEdit((({fieldItem:e,emitFormClick:o,row:n,column:l,$rowIndex:r})=>[i(u,t({options:e.options,queryOptions:e.queryOptions},e.componentProps,{column:l,row:n,"row-index":r,value:n[l.field],"onUpdate:value":e=>n[l.field]=e,onClick:o}),null)]))})},apply(e){e.fieldHooks.fieldList.tap(c,((e,{uuid:o})=>(o&&m.set(o,e),e))),e.dataHooks.data.tapPromise(c,(async(e,o,{index:i,$table:t})=>{var n;if(!o.uuid)return;const l=m.get(o.uuid),r=f.get(o.uuid)||[];for(const t of l)if(t.field){if("select"===t.formType){if(r.findIndex((e=>e.field===t.field))>-1)continue;let o=t.options||[];if(t.queryOptions)try{const l={keyword:"",row:e,column:t,rowIndex:i};o=await(null==(n=t.queryOptions)?void 0:n.call(t,l))}catch(e){console.log(`获取${t.field}_options错误`)}r.push({field:t.field,options:o})}f.set(o.uuid,r)}})),e.setupHooks.setup.tap(c,(e=>{n((()=>{e.value.uuid&&(m.delete(e.value.uuid),f.delete(e.value.uuid))}))}))}})}export{c as selectRendererPlugin};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
- "version": "3.1.42-beta.13",
3
+ "version": "3.1.42-beta.14",
4
4
  "license": "ISC",
5
5
  "module": "./es/components/index.js",
6
6
  "main": "./es/components/index.js",
@@ -61,5 +61,5 @@
61
61
  "iOS 7",
62
62
  "last 3 iOS versions"
63
63
  ],
64
- "gitHead": "e2091a5df755b39bf0728dc8a605b178fbbc4805"
64
+ "gitHead": "28c1d4e4aa33fe5cb7a7cd0d9775a0c88d40c52e"
65
65
  }