cnhis-design-vue 3.2.5-beta.12 → 3.2.5-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.
- package/es/components/big-table/index.d.ts +1 -1
- package/es/components/big-table/src/BigTable.vue.d.ts +1 -1
- package/es/components/form-config/index.d.ts +30 -0
- package/es/components/form-config/src/FormConfig.vue.d.ts +30 -0
- package/es/components/form-config/src/FormConfig.vue2.js +1 -1
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +12 -0
- package/es/components/form-config/src/hooks/useConfigurationField.js +1 -1
- package/es/components/form-config/src/types/index.d.ts +4 -0
- package/es/components/form-render/src/components/renderer/switch.d.ts +1 -1
- package/es/components/form-render/src/components/renderer/switch.js +1 -1
- package/es/components/form-render/src/types/fieldItem.d.ts +4 -0
- package/es/components/iho-table/src/plugins/stickyFixedPlugin.js +1 -1
- package/es/components/shortcut-setter/index.d.ts +4 -0
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +4 -0
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
|
@@ -610,7 +610,7 @@ declare const BigTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
610
610
|
setGroupTreeExpand: () => void;
|
|
611
611
|
resetTableInlineEditStatus: () => false | undefined;
|
|
612
612
|
renderAnnotation: (columnConfig: import("../../shared/types").AnyObject) => JSX.Element | null;
|
|
613
|
-
toolTipTitle: (item: any, type?: any) => (JSX.Element | null)[]
|
|
613
|
+
toolTipTitle: (item: any, type?: any) => (() => any) | (JSX.Element | null)[];
|
|
614
614
|
triggerExpand: (e: any, isExpand: any) => void;
|
|
615
615
|
getOtherConfigInit: () => any;
|
|
616
616
|
refreshTable: () => void;
|
|
@@ -612,7 +612,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
612
612
|
setGroupTreeExpand: () => void;
|
|
613
613
|
resetTableInlineEditStatus: () => false | undefined;
|
|
614
614
|
renderAnnotation: (columnConfig: AnyObject) => JSX.Element | null;
|
|
615
|
-
toolTipTitle: (item: any, type?: any) => (JSX.Element | null)[]
|
|
615
|
+
toolTipTitle: (item: any, type?: any) => (() => any) | (JSX.Element | null)[];
|
|
616
616
|
triggerExpand: (e: any, isExpand: any) => void;
|
|
617
617
|
getOtherConfigInit: () => any;
|
|
618
618
|
refreshTable: () => void;
|
|
@@ -127,6 +127,12 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
127
127
|
beforeMove: {
|
|
128
128
|
type: import("vue").PropType<((payload: import("./src/types").FormConfigBeforeMovePayload) => boolean | void) | undefined>;
|
|
129
129
|
};
|
|
130
|
+
requiredReminderConfig: {
|
|
131
|
+
type: import("vue").PropType<Partial<Partial<{
|
|
132
|
+
enabled: boolean;
|
|
133
|
+
content: string;
|
|
134
|
+
}>>>;
|
|
135
|
+
};
|
|
130
136
|
}, {
|
|
131
137
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
132
138
|
maxHeight: {
|
|
@@ -254,6 +260,12 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
254
260
|
beforeMove: {
|
|
255
261
|
type: import("vue").PropType<((payload: import("./src/types").FormConfigBeforeMovePayload) => boolean | void) | undefined>;
|
|
256
262
|
};
|
|
263
|
+
requiredReminderConfig: {
|
|
264
|
+
type: import("vue").PropType<Partial<Partial<{
|
|
265
|
+
enabled: boolean;
|
|
266
|
+
content: string;
|
|
267
|
+
}>>>;
|
|
268
|
+
};
|
|
257
269
|
}>> & {
|
|
258
270
|
onAddItem?: ((...args: any[]) => any) | undefined;
|
|
259
271
|
onRemoveItem?: ((...args: any[]) => any) | undefined;
|
|
@@ -1803,6 +1815,10 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1803
1815
|
value?: any;
|
|
1804
1816
|
describe?: string | undefined;
|
|
1805
1817
|
} | undefined;
|
|
1818
|
+
reminderConfig?: {
|
|
1819
|
+
enabled?: boolean | undefined;
|
|
1820
|
+
content?: string | undefined;
|
|
1821
|
+
} | undefined;
|
|
1806
1822
|
date_format?: string | undefined;
|
|
1807
1823
|
step_length?: string | number | undefined;
|
|
1808
1824
|
urlConfig?: {
|
|
@@ -3570,6 +3586,10 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
3570
3586
|
value?: any;
|
|
3571
3587
|
describe?: string | undefined;
|
|
3572
3588
|
} | undefined;
|
|
3589
|
+
reminderConfig?: {
|
|
3590
|
+
enabled?: boolean | undefined;
|
|
3591
|
+
content?: string | undefined;
|
|
3592
|
+
} | undefined;
|
|
3573
3593
|
date_format?: string | undefined;
|
|
3574
3594
|
step_length?: string | number | undefined;
|
|
3575
3595
|
urlConfig?: {
|
|
@@ -5310,6 +5330,10 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
5310
5330
|
value?: any;
|
|
5311
5331
|
describe?: string | undefined;
|
|
5312
5332
|
} | undefined;
|
|
5333
|
+
reminderConfig?: {
|
|
5334
|
+
enabled?: boolean | undefined;
|
|
5335
|
+
content?: string | undefined;
|
|
5336
|
+
} | undefined;
|
|
5313
5337
|
date_format?: string | undefined;
|
|
5314
5338
|
step_length?: string | number | undefined;
|
|
5315
5339
|
urlConfig?: {
|
|
@@ -8330,6 +8354,12 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
8330
8354
|
beforeMove: {
|
|
8331
8355
|
type: import("vue").PropType<((payload: import("./src/types").FormConfigBeforeMovePayload) => boolean | void) | undefined>;
|
|
8332
8356
|
};
|
|
8357
|
+
requiredReminderConfig: {
|
|
8358
|
+
type: import("vue").PropType<Partial<Partial<{
|
|
8359
|
+
enabled: boolean;
|
|
8360
|
+
content: string;
|
|
8361
|
+
}>>>;
|
|
8362
|
+
};
|
|
8333
8363
|
}>> & {
|
|
8334
8364
|
onAddItem?: ((...args: any[]) => any) | undefined;
|
|
8335
8365
|
onRemoveItem?: ((...args: any[]) => any) | undefined;
|
|
@@ -130,6 +130,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
130
130
|
beforeMove: {
|
|
131
131
|
type: PropType<((payload: import("../../../components/form-config/src/types").FormConfigBeforeMovePayload) => boolean | void) | undefined>;
|
|
132
132
|
};
|
|
133
|
+
requiredReminderConfig: {
|
|
134
|
+
type: PropType<Partial<Partial<{
|
|
135
|
+
enabled: boolean;
|
|
136
|
+
content: string;
|
|
137
|
+
}>>>;
|
|
138
|
+
};
|
|
133
139
|
}, {
|
|
134
140
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
135
141
|
maxHeight: {
|
|
@@ -257,6 +263,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
257
263
|
beforeMove: {
|
|
258
264
|
type: PropType<((payload: import("../../../components/form-config/src/types").FormConfigBeforeMovePayload) => boolean | void) | undefined>;
|
|
259
265
|
};
|
|
266
|
+
requiredReminderConfig: {
|
|
267
|
+
type: PropType<Partial<Partial<{
|
|
268
|
+
enabled: boolean;
|
|
269
|
+
content: string;
|
|
270
|
+
}>>>;
|
|
271
|
+
};
|
|
260
272
|
}>> & {
|
|
261
273
|
onAddItem?: ((...args: any[]) => any) | undefined;
|
|
262
274
|
onRemoveItem?: ((...args: any[]) => any) | undefined;
|
|
@@ -1806,6 +1818,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1806
1818
|
value?: any;
|
|
1807
1819
|
describe?: string | undefined;
|
|
1808
1820
|
} | undefined;
|
|
1821
|
+
reminderConfig?: {
|
|
1822
|
+
enabled?: boolean | undefined;
|
|
1823
|
+
content?: string | undefined;
|
|
1824
|
+
} | undefined;
|
|
1809
1825
|
date_format?: string | undefined;
|
|
1810
1826
|
step_length?: string | number | undefined;
|
|
1811
1827
|
urlConfig?: {
|
|
@@ -3573,6 +3589,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3573
3589
|
value?: any;
|
|
3574
3590
|
describe?: string | undefined;
|
|
3575
3591
|
} | undefined;
|
|
3592
|
+
reminderConfig?: {
|
|
3593
|
+
enabled?: boolean | undefined;
|
|
3594
|
+
content?: string | undefined;
|
|
3595
|
+
} | undefined;
|
|
3576
3596
|
date_format?: string | undefined;
|
|
3577
3597
|
step_length?: string | number | undefined;
|
|
3578
3598
|
urlConfig?: {
|
|
@@ -5313,6 +5333,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5313
5333
|
value?: any;
|
|
5314
5334
|
describe?: string | undefined;
|
|
5315
5335
|
} | undefined;
|
|
5336
|
+
reminderConfig?: {
|
|
5337
|
+
enabled?: boolean | undefined;
|
|
5338
|
+
content?: string | undefined;
|
|
5339
|
+
} | undefined;
|
|
5316
5340
|
date_format?: string | undefined;
|
|
5317
5341
|
step_length?: string | number | undefined;
|
|
5318
5342
|
urlConfig?: {
|
|
@@ -8333,6 +8357,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
8333
8357
|
beforeMove: {
|
|
8334
8358
|
type: PropType<((payload: import("../../../components/form-config/src/types").FormConfigBeforeMovePayload) => boolean | void) | undefined>;
|
|
8335
8359
|
};
|
|
8360
|
+
requiredReminderConfig: {
|
|
8361
|
+
type: PropType<Partial<Partial<{
|
|
8362
|
+
enabled: boolean;
|
|
8363
|
+
content: string;
|
|
8364
|
+
}>>>;
|
|
8365
|
+
};
|
|
8336
8366
|
}>> & {
|
|
8337
8367
|
onAddItem?: ((...args: any[]) => any) | undefined;
|
|
8338
8368
|
onRemoveItem?: ((...args: any[]) => any) | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,provide as o,ref as t,computed as r,toRaw as a,openBlock as i,createElementBlock as s,mergeProps as l,unref as n,createElementVNode as m,createVNode as u,isRef as f,withCtx as d,createBlock as c,createCommentVNode as p,createTextVNode as v}from"vue";import{useTheme as h}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{isArray as g,cloneDeep as _,isFunction as y}from"lodash-es";import"@vue/shared";import{uuidGenerator as x,traverse as C}from"../../../shared/utils/index.js";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{NSelect as j,NSpace as L}from"naive-ui";import{useVersion as k}from"../../../shared/hooks/useVersion.js";import F from"../../../shared/components/VueDraggable/src/vuedraggable.js";import b from"./components/FormConfigCreator.vue.js";import V from"./components/FormConfigDragDisplay.vue.js";import M from"./components/FormConfigEdit.vue.js";import
|
|
1
|
+
import{defineComponent as e,provide as o,ref as t,computed as r,toRaw as a,openBlock as i,createElementBlock as s,mergeProps as l,unref as n,createElementVNode as m,createVNode as u,isRef as f,withCtx as d,createBlock as c,createCommentVNode as p,createTextVNode as v}from"vue";import{useTheme as h}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{isArray as g,cloneDeep as _,isFunction as y}from"lodash-es";import"@vue/shared";import{uuidGenerator as x,traverse as C}from"../../../shared/utils/index.js";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{NSelect as j,NSpace as L}from"naive-ui";import{useVersion as k}from"../../../shared/hooks/useVersion.js";import F from"../../../shared/components/VueDraggable/src/vuedraggable.js";import b from"./components/FormConfigCreator.vue.js";import V from"./components/FormConfigDragDisplay.vue.js";import M from"./components/FormConfigEdit.vue.js";import R from"./components/FormConfigEventSetting.vue.js";import w from"./components/FormConfigMaterialItem.js";import{useDataNormalize as E}from"./hooks/useDataNormalize.js";import{InjectionFormConfigProps as I,InjectionFormConfigEmit as D,InjectionFieldList as H,InjectionMaterialList as O,InjectionLowCodeReactions as S,InjectionActiveFieldItem as N,FORM_CONFIG_GROUP as U}from"./constants/index.js";import"./utils/index.js";import{useSortableConfig as A}from"./hooks/useSortalbeConfig.js";import"./hooks/useConfigurationField.js";const B=["id"],T={class:"form-config__material"},P=m("header",{class:"form-config__materialHeader"},"物料区",-1),q={class:"form-config__displayWrapper"},z={class:"form-config__displayHeader"},W={class:"form-config__config"},G=m("header",{class:"form-config__configHeader"},"配置区",-1),J={class:"form-config__configContent"};var K=e({__name:"FormConfig",props:{maxHeight:{type:String},fieldVisitor:{type:Object},textFormatter:{type:Function},formRenderRef:{type:Object},extraMaterialList:{type:[Array,Function]},showLowCodeReactions:Boolean,formProps:{type:Object},beforeMove:{type:Function},requiredReminderConfig:{type:Object}},emits:["addItem","removeItem","reactionsValidateFailure"],setup(e,{expose:K,emit:Q}){const X=e;o(I,X),o(D,Q);const Y=x(),Z=h(),$=t([]);o(H,$);const ee=t([]);o(O,ee);const oe=t([]);function te(e){$.value.some((o=>o.key===e.key))||$.value.push(e)}o(S,oe);const re=(e,o)=>y(X.textFormatter)?X.textFormatter(e,o):o,ae=t();o(N,ae);const ie=t(),{transform:se,inverseTransform:le}=E(X),ne=r({get:()=>null,set(e){if(!e)return;const o=ue.value.find((o=>o.key===e));o&&(o.__extra=!0,ee.value.push(o),Q("addItem",o))}}),me=t([]),ue=r((()=>{if(!g(me.value))return[];const e=[];return C([...ee.value,...$.value],(o=>e.push(o.key))),me.value.filter((o=>!e.find((e=>e===o.key))))}));async function fe(){X.extraMaterialList&&!me.value.length&&(me.value=y(X.extraMaterialList)?await X.extraMaterialList():X.extraMaterialList)}return K({loadData({fieldList:e,lowCodeReactions:o=[]}){let t=[],r=[];e.forEach((e=>function(e){"LINE_BAR"===e.type&&(e.children=[]);!1===e.show?r.push(e):t.push(e),"COMBINATION"===e.type&&g(e.children)&&e.children.length&&e.children.forEach((e=>{e.__isCombinationChild=!0}))}(_(a(e))))),$.value=se(t),ee.value=r,oe.value=o,ae.value=void 0},validate(){var e;return null==(e=ie.value)?void 0:e.validate()},getData:(e=!1)=>({fieldList:le(_(a($.value)),e,{show:!0}),materialList:le(_(a(ee.value)),e,{show:!1}),lowCodeReactions:_(a(oe.value))}),clearExtraList(){me.value=[]}}),(o,t)=>(i(),s("section",l({class:"form-config",style:{"--max-height":e.maxHeight,...n(Z)},id:n(Y)},n(k)()),[m("section",T,[P,u(n(F),l(A({fieldList:$,materialList:ee,hooks:{beforeMove:X.beforeMove}}),{class:"form-config__materialContent",modelValue:n(ee),"onUpdate:modelValue":t[0]||(t[0]=e=>f(ee)?ee.value=e:null)}),{item:d((({element:e})=>[u(n(w),{"form-config-item":e,"text-formatter":re,"material-List":n(ee)},null,8,["form-config-item","material-List"])])),_:1},16,["modelValue"]),e.extraMaterialList?(i(),c(n(j),{key:0,class:"form-config__materialExtraList",filterable:"",value:n(ne),"onUpdate:value":t[1]||(t[1]=e=>f(ne)?ne.value=e:null),placeholder:"请选择额外物料",options:n(ue),"label-field":"name","value-field":"key",onFocus:fe},null,8,["value","options"])):p("v-if",!0)]),m("section",q,[m("header",z,[v(" 布局区 "),u(n(L),null,{default:d((()=>[e.showLowCodeReactions?(i(),c(R,{key:0,modelValue:oe.value,"onUpdate:modelValue":t[2]||(t[2]=e=>oe.value=e),onValidateFailure:t[3]||(t[3]=e=>Q("reactionsValidateFailure",e))},null,8,["modelValue"])):p("v-if",!0),u(b,{onSubmit:te})])),_:1})]),u(V,{class:"form-config__displayContent",group:n(U),"text-formatter":re,modelValue:n($),"onUpdate:modelValue":t[4]||(t[4]=e=>f($)?$.value=e:null)},null,8,["group","modelValue"])]),m("section",W,[G,m("section",J,[u(M,{ref_key:"formConfigEditRef",ref:ie,uuid:n(Y),"bind-form-render-ref":e.formRenderRef,"form-props":e.formProps},null,8,["uuid","bind-form-render-ref","form-props"])])])],16,B))}});export{K as default};
|
|
@@ -326,6 +326,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
326
326
|
value?: any;
|
|
327
327
|
describe?: string | undefined;
|
|
328
328
|
} | undefined;
|
|
329
|
+
reminderConfig?: {
|
|
330
|
+
enabled?: boolean | undefined;
|
|
331
|
+
content?: string | undefined;
|
|
332
|
+
} | undefined;
|
|
329
333
|
date_format?: string | undefined;
|
|
330
334
|
step_length?: string | number | undefined;
|
|
331
335
|
urlConfig?: {
|
|
@@ -2093,6 +2097,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2093
2097
|
value?: any;
|
|
2094
2098
|
describe?: string | undefined;
|
|
2095
2099
|
} | undefined;
|
|
2100
|
+
reminderConfig?: {
|
|
2101
|
+
enabled?: boolean | undefined;
|
|
2102
|
+
content?: string | undefined;
|
|
2103
|
+
} | undefined;
|
|
2096
2104
|
date_format?: string | undefined;
|
|
2097
2105
|
step_length?: string | number | undefined;
|
|
2098
2106
|
urlConfig?: {
|
|
@@ -3833,6 +3841,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3833
3841
|
value?: any;
|
|
3834
3842
|
describe?: string | undefined;
|
|
3835
3843
|
} | undefined;
|
|
3844
|
+
reminderConfig?: {
|
|
3845
|
+
enabled?: boolean | undefined;
|
|
3846
|
+
content?: string | undefined;
|
|
3847
|
+
} | undefined;
|
|
3836
3848
|
date_format?: string | undefined;
|
|
3837
3849
|
step_length?: string | number | undefined;
|
|
3838
3850
|
urlConfig?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{omit as e,pick as
|
|
1
|
+
import{omit as e,pick as l}from"lodash-es";import{InjectionFormConfigProps as t,EditAbleField as i,widgetWidthOptionConfig as a,isShowOptionConfig as o,isNotFoldOptionConfig as _,isEditOptionConfig as n,isNullOptionConfig as m,isVisibleOptionConfig as r,rowsOptionConfig as s}from"../constants/index.js";import"../../../form-render/index.js";import{inject as d}from"vue";import{useFieldNormalize as E}from"../../../form-render/src/hooks/useFieldNormalize.js";const{FieldNormalizeWaterfallHook:p}=E();function h(){const E=d(t),h=new Map([[i.KEY,e=>({alias:"字段",elem_width:6,html_type:"TEXT",content:null==e?void 0:e.key,decoratorProps:{labelPlacement:"left"}})],[i.NAME,()=>({alias:"名称",elem_width:6,is_null:"0",html_type:"INPUT"})],[i.NOTES,()=>({alias:"问号提示",elem_width:6,html_type:"INPUT",is_empty:"0"})],[i.DEFAULT_VALUE,(t,i)=>{const a=p.call(Object.assign({},null==t?void 0:t.originalSetting,i),{});return{alias:"默认值",elem_width:6,html_type:"INPUT",is_empty:"0",componentProps:e(a.componentProps,["class","style","disabled"]),...l(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","allowSlash","is_allow_check_mid","allow_check_mid_level"])}}],[i.LAYOUT_WIDTH_ENUM,()=>({alias:"宽度",fieldType:"number",html_type:"SELECT",elem_width:6,...a()})],[i.DESC,()=>({alias:"说明文本",elem_width:6,html_type:"INPUT",is_empty:"0",validate:{max_length:30}})],[i.DEFAULT_EXPAND,()=>({alias:"是否默认展开",html_type:"SWITCH",elem_width:6,...o()})],[i.FOLD,()=>({alias:"是否可折叠",html_type:"SWITCH",elem_width:6,..._()})],[i.EDITABLE,e=>({alias:"是否可编辑",html_type:"SWITCH",elem_width:6,is_edit:(null==e?void 0:e.editableDisabled)?"0":"1",...n()})],[i.REQUIRED,e=>({alias:"是否必填",html_type:"SWITCH",elem_width:6,is_edit:(null==e?void 0:e.requiredDisabled)?"0":"1",reminderConfig:{enabled:!1,...null==E?void 0:E.requiredReminderConfig},...m()})],[i.SHOW,e=>({alias:"是否显示",html_type:"SWITCH",elem_width:6,is_show:(null==e?void 0:e.__isCombinationChild)?"1":"0",...r()})],[i.ROWS,()=>({alias:"高度",elem_width:6,remark:"默认为3行高度,可调整为1-10行高度",default_val:3,is_empty:"0",html_type:"SELECT",...s()})]]);function T(e,l,t){return e.map((e=>{var i,a;return{...null!=(a=null==(i=h.get(e))?void 0:i(l,t))?a:{},val_key:e}}))}const u=new Map([["LINE_BAR",[i.KEY,i.NAME,i.LAYOUT_WIDTH_ENUM,i.NOTES,i.DEFAULT_EXPAND,i.FOLD]],["NEWLINE",[i.KEY,i.NAME]],...["COMPLEX","COMBINATION"].map((e=>[e,[i.KEY,i.NAME,i.LAYOUT_WIDTH_ENUM]]))]),y=[i.KEY,i.NAME,i.DEFAULT_VALUE,i.LAYOUT_WIDTH_ENUM,i.DESC,i.NOTES,i.EDITABLE,i.REQUIRED,i.SHOW];return{generateFieldListByKeys:T,generateFieldListByFormConfigItem:function(e,l){var t;const a=u.get(e.type)||y;return"TEXTAREA"===(l?l.html_type:null==(t=e.originalSetting)?void 0:t.html_type)&&a.splice(3,0,i.ROWS),T(a,e,l)}}}export{h as useConfigurationField};
|
|
@@ -62,4 +62,8 @@ interface FieldVisitorContext {
|
|
|
62
62
|
replace(f: FieldItem): void;
|
|
63
63
|
}
|
|
64
64
|
export declare type FormConfigVisitor = Record<string, (context: FieldVisitorContext) => void>;
|
|
65
|
+
export declare type FormConfigReminderConfig = Partial<{
|
|
66
|
+
enabled: boolean;
|
|
67
|
+
content: string;
|
|
68
|
+
}>;
|
|
65
69
|
export {};
|
|
@@ -16,7 +16,7 @@ export declare const SWITCH: import("vue").DefineComponent<{
|
|
|
16
16
|
default: string;
|
|
17
17
|
};
|
|
18
18
|
onChange: {};
|
|
19
|
-
}, () => JSX.Element | JSX.Element[], unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
19
|
+
}, () => JSX.Element | (JSX.Element | null)[], unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
20
20
|
value: {};
|
|
21
21
|
openDescription: {
|
|
22
22
|
type: PropType<Description>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,useAttrs as o,ref as
|
|
1
|
+
import{defineComponent as e,useAttrs as o,ref as l,computed as i,createVNode as r,mergeProps as t,createTextVNode as u}from"vue";import{NSwitch as n,NModal as a,NCheckbox as v}from"naive-ui";import"../../../../../shared/utils/index.js";import"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"@vueuse/core";import"lodash-es";import"date-fns";import{assignUpdateValue as d,assignValueBindKey as s}from"../../utils/schema.js";import{connect as p,mapProps as c}from"@formily/vue";import"../../../index.js";import{useFormField as m}from"../../hooks/useFormField.js";const f=p(e({name:"FormSwitch",props:{value:{},openDescription:{type:Object},closeDescription:{type:Object},showMode:{type:String,default:"SWITCH"},onChange:{}},emits:["update:value"],setup(e,{emit:d}){const s=o(),p=l(!1),{field:c,fieldKey:f}=m(),h=i((()=>{var e,o,l;return null==(l=null==(o=null==(e=c.value.decoratorProps)?void 0:e.fieldItem)?void 0:o.reminderConfig)?void 0:l.enabled})),y=i((()=>{var o,l;return null==(l=null==(o=e.openDescription)?void 0:o.value)||l})),g=i((()=>{var o,l;return null!=(l=null==(o=e.closeDescription)?void 0:o.value)&&l})),w=()=>{var o,l;return u(null!=(l=null==(o=e.openDescription)?void 0:o.describe)?l:"")},C=()=>{var o,l;return u(null!=(l=null==(o=e.closeDescription)?void 0:o.describe)?l:"")},j=i({get:()=>e.value===y.value,set(o){if(!h.value||"SWITCH"!==e.showMode||"required"!==f.value||o)return d("update:value",o?y.value:g.value);p.value=!0}});function k(){d("update:value",g.value)}return()=>{return"SWITCH"===e.showMode?[r(n,t({value:j.value,"onUpdate:value":e=>j.value=e},s),{checked:w,unchecked:C}),h.value?r(a,{show:p.value,"onUpdate:show":e=>p.value=e,"display-directive":"show",preset:"dialog",title:"确认","positive-text":"确认","negative-text":"取消",content:null!=(u=null==(i=null==(l=null==(o=c.value.decoratorProps)?void 0:o.fieldItem)?void 0:l.reminderConfig)?void 0:i.content)?u:"是否确认由必填改为非必填?",onPositiveClick:k},null):null]:r(v,{checked:j.value,"onUpdate:checked":e=>j.value=e},{default:w});var o,l,i,u}}}),c(d,s));export{f as SWITCH};
|
|
@@ -103,6 +103,10 @@ export declare type FieldItem = {
|
|
|
103
103
|
wordbook: LowCodeTypes.wordbook;
|
|
104
104
|
open: LowCodeTypes.switchProperty;
|
|
105
105
|
close: LowCodeTypes.switchProperty;
|
|
106
|
+
reminderConfig?: Partial<{
|
|
107
|
+
enabled: boolean;
|
|
108
|
+
content: string;
|
|
109
|
+
}>;
|
|
106
110
|
date_format: string;
|
|
107
111
|
step_length: string | number;
|
|
108
112
|
urlConfig: UrlConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{onBeforeUnmount as e,createVNode as l,defineComponent as t,inject as i,computed as r,watch as u,onMounted as d}from"vue";import{traverse as o}from"../../../../shared/utils/index.js";import{promiseTimeout as a}from"@vueuse/shared";import{last as n,first as s}from"lodash-es";import"../../index.js";import{LOWEST_PRIORITY as f,InjectionIhoTableConfig as
|
|
1
|
+
import{onBeforeUnmount as e,createVNode as l,defineComponent as t,inject as i,computed as r,watch as u,onMounted as d}from"vue";import{traverse as o}from"../../../../shared/utils/index.js";import{promiseTimeout as a}from"@vueuse/shared";import{last as n,first as s}from"lodash-es";import"../../index.js";import{LOWEST_PRIORITY as f,InjectionIhoTableConfig as h,InjectionIhoTableXeInstance as c}from"../constants/index.js";import{mergeVxeStyle as v,useUUIDMap as g,mergeVxeClass as m}from"../utils/index.js";import{defineTablePlugin as x}from"../hooks/useTablePlugin.js";function b(){const b="stickyFixedPlugin";return x({name:b,apply(x){x.configHooks.config.tap(b,((e,{$table:l})=>{var t;if(null==(t=e.stickyFixedConfig)?void 0:t.enable){const t=e=>{if(!l.value)return{left:0,right:0};return{left:l.value.getColumns().slice(0,e).reduce(((e,l)=>e+(l.resizeWidth||l.renderWidth)),0),right:l.value.getColumns().slice(e+1).reduce(((e,l)=>e+(l.resizeWidth||l.renderWidth)),0)}};e.cellStyle=v((({_columnIndex:e})=>({"--iho-table-fixed-left":t(e).left,"--iho-table-fixed-right":t(e).right})),e.cellStyle),e.headerCellStyle=v((({_columnIndex:e})=>({"--iho-table-fixed-left":t(e).left,"--iho-table-fixed-right":t(e).right})),e.headerCellStyle)}return e}));const{getItemFromUUID:p,removeItemFromUUID:y}=g((()=>({left:[],noFixed:[],right:[]}))),{getItemFromUUID:B,removeItemFromUUID:H}=g((()=>({tableBody:null,tableHeader:null,leftEle:null,leftBorderEle:null,rightEle:null,rightBorderEle:null})),!1);function k(e){const l=B(e),{leftEle:t,rightEle:i,tableBody:r}=l;r&&(t&&(r.scrollLeft>0?t.classList.add("scrolling--middle"):null==t||t.classList.remove("scrolling--middle")),i&&(Math.ceil(r.scrollLeft)<r.scrollWidth-r.clientWidth?i.classList.add("scrolling--middle"):null==i||i.classList.remove("scrolling--middle")))}function E(e){var l,t;const i=B(e);if(!i.tableBody||!i.tableHeader)return;const{leftEle:r,rightBorderEle:u,rightEle:d,leftBorderEle:o,tableHeader:a}=i;if(r){const e=n(null==(l=i.tableHeader)?void 0:l.querySelectorAll("th.iho-table--fixed-left"));e&&(r.style.width=e.offsetLeft+e.clientWidth+"px",o.style.width=r.style.width)}if(d){const e=s(null==(t=i.tableHeader)?void 0:t.querySelectorAll("th.iho-table--fixed-right"));if(e){const l=i.tableBody.scrollHeight>i.tableBody.clientHeight;d.style.width=i.tableBody.clientWidth-e.offsetLeft-(l?0:10)+"px",u.style.width=d.style.width}}}x.fieldHooks.fieldList.tap({name:b,stage:f},((e,l)=>{var t;if(!(null==(t=l.stickyFixedConfig)?void 0:t.enable)||!l.uuid)return e;const i=p(l.uuid);return i.left=[],i.noFixed=[],i.right=[],o(e,(e=>{e.fixed?(i[e.fixed].push(e),e.className=m(e.className,`iho-table--fixed-${e.fixed}`),e.headerClassName=m(e.headerClassName,`iho-table--fixed-${e.fixed}`)):i.noFixed.push(e),e.fixed=void 0})),[...i.left||[],...i.noFixed||[],...i.right||[]]})),x.setupHooks.setup.tap(b,(l=>{e((()=>{var e;(null==(e=l.value)?void 0:e.uuid)&&(H(l.value.uuid),y(l.value.uuid))}))})),x.dataHooks.dataEnd.tap(b,(async e=>{var l;(null==(l=e.stickyFixedConfig)?void 0:l.enable)&&e.uuid&&(await a(100),E(e.uuid))})),x.eventHooks.onScroll.tap(b,(({isX:e},l)=>{var t;e&&(null==(t=l.stickyFixedConfig)?void 0:t.enable)&&l.uuid&&k(l.uuid)})),x.eventHooks.onResizableChange.tap(b,((e,l)=>{var t;(null==(t=l.stickyFixedConfig)?void 0:t.enable)&&l.uuid&&k(l.uuid)}));const F=t({setup(){const e=i(h),t=i(c),o=r((()=>{const l=p(e.value.uuid);return!(!l.left||!l.left.length)})),n=r((()=>{const l=p(e.value.uuid);return!(!l.right||!l.right.length)})),s=l=>{B(e.value.uuid).leftEle=l},f=l=>{B(e.value.uuid).leftBorderEle=l},v=l=>{B(e.value.uuid).rightEle=l},g=l=>{B(e.value.uuid).rightBorderEle=l};function m(){if(!t.value||!e.value.uuid)return;const{refTableBody:l,refTableHeader:i}=t.value.getRefMaps();if(!l.value)return;const r=B(e.value.uuid);r.tableBody=l.value.$el,r.tableHeader=i.value.$el,k(e.value.uuid),E(e.value.uuid)}return u([()=>p(e.value.uuid).left,()=>p(e.value.uuid).right],m),d((async()=>{await a(100),m()})),()=>[o.value?[l("div",{class:"iho-table__fixedLeftWrapper",ref:s},null),l("div",{class:"iho-table__fixedLeftTopBorder",ref:f},null)]:null,n.value?[l("div",{class:"iho-table__fixedRightWrapper",ref:v},null),l("div",{class:"iho-table__fixedRightTopBorder",ref:g},null)]:null]}}),C=t({setup(){const e=i(h);return()=>{var t,i;return(null==(i=null==(t=e.value)?void 0:t.stickyFixedConfig)?void 0:i.enable)?l(F,null,null):null}}});x.domInsertHooks.header.tap(b,(e=>(e.push(l(C,null,null)),e)))}})}export{b as stickyFixedPlugin};
|
|
@@ -128,6 +128,10 @@ declare const ShortcutSetter: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
128
128
|
value?: any;
|
|
129
129
|
describe?: string | undefined;
|
|
130
130
|
} | undefined;
|
|
131
|
+
reminderConfig?: {
|
|
132
|
+
enabled?: boolean | undefined;
|
|
133
|
+
content?: string | undefined;
|
|
134
|
+
} | undefined;
|
|
131
135
|
date_format?: string | undefined;
|
|
132
136
|
step_length?: string | number | undefined;
|
|
133
137
|
urlConfig?: {
|
|
@@ -131,6 +131,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
131
131
|
value?: any;
|
|
132
132
|
describe?: string | undefined;
|
|
133
133
|
} | undefined;
|
|
134
|
+
reminderConfig?: {
|
|
135
|
+
enabled?: boolean | undefined;
|
|
136
|
+
content?: string | undefined;
|
|
137
|
+
} | undefined;
|
|
134
138
|
date_format?: string | undefined;
|
|
135
139
|
step_length?: string | number | undefined;
|
|
136
140
|
urlConfig?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e="@cnhis-design-vue/shared",i="3.2.5-beta.
|
|
1
|
+
var e="@cnhis-design-vue/shared",i="3.2.5-beta.14",s="index.ts",n={"naive-ui":"^2.30.0",vue:"^3.2.0"},a={"@vicons/ionicons5":"^0.12.0","lodash-es":"^4.17.21",moment:"^2.29.1","video.js":"^7.19.2","videojs-contrib-hls":"^5.15.0",viewerjs:"^1.10.5","xe-utils":"^3.5.4"},d={name:e,version:"3.2.5-beta.14",private:!0,main:"index.ts",peerDependencies:n,dependencies:a};export{d as default,a as dependencies,s as main,e as name,n as peerDependencies,i as version};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cnhis-design-vue",
|
|
3
|
-
"version": "3.2.5-beta.
|
|
3
|
+
"version": "3.2.5-beta.14",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"module": "./es/components/index.js",
|
|
6
6
|
"main": "./es/components/index.js",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"iOS 7",
|
|
72
72
|
"last 3 iOS versions"
|
|
73
73
|
],
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "c7426c1a9a8a81286bad51c9eb4b603ce6f9779f"
|
|
75
75
|
}
|