cnhis-design-vue 3.1.42-beta.52 → 3.1.42-beta.53
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/button-print/index.d.ts +16 -16
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +16 -8
- package/es/components/form-config/index.d.ts +5 -0
- package/es/components/form-config/src/FormConfig.vue.d.ts +5 -0
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +3 -0
- package/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
- package/es/components/form-render/src/hooks/useFieldNormalize.js +1 -1
- package/es/components/form-render/src/types/fieldItem.d.ts +5 -0
- package/es/components/iho-table/src/hooks/useColumnConfigAdaptor.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.d.ts +2 -1
- package/es/components/iho-table/src/types/index.d.ts +4 -3
- package/es/components/shortcut-setter/index.d.ts +1 -0
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +1 -0
- package/package.json +2 -2
|
@@ -69,10 +69,10 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
69
69
|
default: boolean;
|
|
70
70
|
};
|
|
71
71
|
externalOptionConfig: {
|
|
72
|
-
type: import("vue").PropType<{
|
|
73
|
-
options
|
|
74
|
-
onSelect
|
|
75
|
-
}
|
|
72
|
+
type: import("vue").PropType<Partial<{
|
|
73
|
+
options: import("../../../es/shared/types").AnyObject[];
|
|
74
|
+
onSelect: (key: string | number, option: import("../../../es/shared/types").AnyObject) => void;
|
|
75
|
+
}>>;
|
|
76
76
|
default: () => {};
|
|
77
77
|
};
|
|
78
78
|
}, {
|
|
@@ -146,10 +146,10 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
146
146
|
default: boolean;
|
|
147
147
|
};
|
|
148
148
|
externalOptionConfig: {
|
|
149
|
-
type: import("vue").PropType<{
|
|
150
|
-
options
|
|
151
|
-
onSelect
|
|
152
|
-
}
|
|
149
|
+
type: import("vue").PropType<Partial<{
|
|
150
|
+
options: import("../../../es/shared/types").AnyObject[];
|
|
151
|
+
onSelect: (key: string | number, option: import("../../../es/shared/types").AnyObject) => void;
|
|
152
|
+
}>>;
|
|
153
153
|
default: () => {};
|
|
154
154
|
};
|
|
155
155
|
}>> & {
|
|
@@ -1908,10 +1908,10 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1908
1908
|
default: boolean;
|
|
1909
1909
|
};
|
|
1910
1910
|
externalOptionConfig: {
|
|
1911
|
-
type: import("vue").PropType<{
|
|
1912
|
-
options
|
|
1913
|
-
onSelect
|
|
1914
|
-
}
|
|
1911
|
+
type: import("vue").PropType<Partial<{
|
|
1912
|
+
options: import("../../../es/shared/types").AnyObject[];
|
|
1913
|
+
onSelect: (key: string | number, option: import("../../../es/shared/types").AnyObject) => void;
|
|
1914
|
+
}>>;
|
|
1915
1915
|
default: () => {};
|
|
1916
1916
|
};
|
|
1917
1917
|
}>> & {
|
|
@@ -1934,9 +1934,9 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1934
1934
|
printdlgshow: string;
|
|
1935
1935
|
btnprint: string;
|
|
1936
1936
|
directPrint: boolean;
|
|
1937
|
-
externalOptionConfig: {
|
|
1938
|
-
options
|
|
1939
|
-
onSelect
|
|
1940
|
-
}
|
|
1937
|
+
externalOptionConfig: Partial<{
|
|
1938
|
+
options: import("../../../es/shared/types").AnyObject[];
|
|
1939
|
+
onSelect: (key: string | number, option: import("../../../es/shared/types").AnyObject) => void;
|
|
1940
|
+
}>;
|
|
1941
1941
|
}>>;
|
|
1942
1942
|
export default ButtonPrint;
|
|
@@ -2,10 +2,6 @@
|
|
|
2
2
|
import { AnyObject } from '../../../../es/shared/types';
|
|
3
3
|
import { PropType } from 'vue';
|
|
4
4
|
import { Print } from './utils';
|
|
5
|
-
declare type IExternalOptionConfig = {
|
|
6
|
-
options?: AnyObject[];
|
|
7
|
-
onSelect?: (key: string | number, option: AnyObject) => void;
|
|
8
|
-
};
|
|
9
5
|
declare const _default: import("vue").DefineComponent<{
|
|
10
6
|
printParams: {
|
|
11
7
|
type: PropType<AnyObject[]>;
|
|
@@ -77,7 +73,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
77
73
|
default: boolean;
|
|
78
74
|
};
|
|
79
75
|
externalOptionConfig: {
|
|
80
|
-
type: PropType<
|
|
76
|
+
type: PropType<Partial<{
|
|
77
|
+
options: AnyObject[];
|
|
78
|
+
onSelect: (key: string | number, option: AnyObject) => void;
|
|
79
|
+
}>>;
|
|
81
80
|
default: () => {};
|
|
82
81
|
};
|
|
83
82
|
}, {
|
|
@@ -154,7 +153,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
154
153
|
default: boolean;
|
|
155
154
|
};
|
|
156
155
|
externalOptionConfig: {
|
|
157
|
-
type: PropType<
|
|
156
|
+
type: PropType<Partial<{
|
|
157
|
+
options: AnyObject[];
|
|
158
|
+
onSelect: (key: string | number, option: AnyObject) => void;
|
|
159
|
+
}>>;
|
|
158
160
|
default: () => {};
|
|
159
161
|
};
|
|
160
162
|
}>> & {
|
|
@@ -1916,7 +1918,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1916
1918
|
default: boolean;
|
|
1917
1919
|
};
|
|
1918
1920
|
externalOptionConfig: {
|
|
1919
|
-
type: PropType<
|
|
1921
|
+
type: PropType<Partial<{
|
|
1922
|
+
options: AnyObject[];
|
|
1923
|
+
onSelect: (key: string | number, option: AnyObject) => void;
|
|
1924
|
+
}>>;
|
|
1920
1925
|
default: () => {};
|
|
1921
1926
|
};
|
|
1922
1927
|
}>> & {
|
|
@@ -1939,6 +1944,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1939
1944
|
printdlgshow: string;
|
|
1940
1945
|
btnprint: string;
|
|
1941
1946
|
directPrint: boolean;
|
|
1942
|
-
externalOptionConfig:
|
|
1947
|
+
externalOptionConfig: Partial<{
|
|
1948
|
+
options: AnyObject[];
|
|
1949
|
+
onSelect: (key: string | number, option: AnyObject) => void;
|
|
1950
|
+
}>;
|
|
1943
1951
|
}>;
|
|
1944
1952
|
export default _default;
|
|
@@ -116,6 +116,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
116
116
|
children?: any[] | undefined;
|
|
117
117
|
childrenFields?: any[] | undefined;
|
|
118
118
|
}[] | undefined;
|
|
119
|
+
multi_select?: import("..").FormCommonState | undefined;
|
|
119
120
|
multi_select_value?: string | number | undefined;
|
|
120
121
|
wordbook?: {
|
|
121
122
|
level_num?: number | undefined;
|
|
@@ -1810,6 +1811,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1810
1811
|
children?: any[] | undefined;
|
|
1811
1812
|
childrenFields?: any[] | undefined;
|
|
1812
1813
|
}[] | undefined;
|
|
1814
|
+
multi_select?: import("..").FormCommonState | undefined;
|
|
1813
1815
|
multi_select_value?: string | number | undefined;
|
|
1814
1816
|
wordbook?: {
|
|
1815
1817
|
level_num?: number | undefined;
|
|
@@ -4448,6 +4450,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
4448
4450
|
children?: any[] | undefined;
|
|
4449
4451
|
childrenFields?: any[] | undefined;
|
|
4450
4452
|
}[] | undefined;
|
|
4453
|
+
multi_select?: import("..").FormCommonState | undefined;
|
|
4451
4454
|
multi_select_value?: string | number | undefined;
|
|
4452
4455
|
wordbook?: {
|
|
4453
4456
|
level_num?: number | undefined;
|
|
@@ -6154,6 +6157,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
6154
6157
|
children?: any[] | undefined;
|
|
6155
6158
|
childrenFields?: any[] | undefined;
|
|
6156
6159
|
}[] | undefined;
|
|
6160
|
+
multi_select?: import("..").FormCommonState | undefined;
|
|
6157
6161
|
multi_select_value?: string | number | undefined;
|
|
6158
6162
|
wordbook?: {
|
|
6159
6163
|
level_num?: number | undefined;
|
|
@@ -7832,6 +7836,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
7832
7836
|
children?: any[] | undefined;
|
|
7833
7837
|
childrenFields?: any[] | undefined;
|
|
7834
7838
|
}[] | undefined;
|
|
7839
|
+
multi_select?: import("..").FormCommonState | undefined;
|
|
7835
7840
|
multi_select_value?: string | number | undefined;
|
|
7836
7841
|
wordbook?: {
|
|
7837
7842
|
level_num?: number | undefined;
|
|
@@ -118,6 +118,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
118
118
|
children?: any[] | undefined;
|
|
119
119
|
childrenFields?: any[] | undefined;
|
|
120
120
|
}[] | undefined;
|
|
121
|
+
multi_select?: import("../../../../es/components/form-render").FormCommonState | undefined;
|
|
121
122
|
multi_select_value?: string | number | undefined;
|
|
122
123
|
wordbook?: {
|
|
123
124
|
level_num?: number | undefined;
|
|
@@ -1812,6 +1813,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1812
1813
|
children?: any[] | undefined;
|
|
1813
1814
|
childrenFields?: any[] | undefined;
|
|
1814
1815
|
}[] | undefined;
|
|
1816
|
+
multi_select?: import("../../../../es/components/form-render").FormCommonState | undefined;
|
|
1815
1817
|
multi_select_value?: string | number | undefined;
|
|
1816
1818
|
wordbook?: {
|
|
1817
1819
|
level_num?: number | undefined;
|
|
@@ -4450,6 +4452,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4450
4452
|
children?: any[] | undefined;
|
|
4451
4453
|
childrenFields?: any[] | undefined;
|
|
4452
4454
|
}[] | undefined;
|
|
4455
|
+
multi_select?: import("../../../../es/components/form-render").FormCommonState | undefined;
|
|
4453
4456
|
multi_select_value?: string | number | undefined;
|
|
4454
4457
|
wordbook?: {
|
|
4455
4458
|
level_num?: number | undefined;
|
|
@@ -6156,6 +6159,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
6156
6159
|
children?: any[] | undefined;
|
|
6157
6160
|
childrenFields?: any[] | undefined;
|
|
6158
6161
|
}[] | undefined;
|
|
6162
|
+
multi_select?: import("../../../../es/components/form-render").FormCommonState | undefined;
|
|
6159
6163
|
multi_select_value?: string | number | undefined;
|
|
6160
6164
|
wordbook?: {
|
|
6161
6165
|
level_num?: number | undefined;
|
|
@@ -7834,6 +7838,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
7834
7838
|
children?: any[] | undefined;
|
|
7835
7839
|
childrenFields?: any[] | undefined;
|
|
7836
7840
|
}[] | undefined;
|
|
7841
|
+
multi_select?: import("../../../../es/components/form-render").FormCommonState | undefined;
|
|
7837
7842
|
multi_select_value?: string | number | undefined;
|
|
7838
7843
|
wordbook?: {
|
|
7839
7844
|
level_num?: number | undefined;
|
|
@@ -81,6 +81,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
81
81
|
children?: any[] | undefined;
|
|
82
82
|
childrenFields?: any[] | undefined;
|
|
83
83
|
}[] | undefined;
|
|
84
|
+
multi_select?: import("../../../../../es/components/form-render").FormCommonState | undefined;
|
|
84
85
|
multi_select_value?: string | number | undefined;
|
|
85
86
|
wordbook?: {
|
|
86
87
|
level_num?: number | undefined;
|
|
@@ -1787,6 +1788,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1787
1788
|
children?: any[] | undefined;
|
|
1788
1789
|
childrenFields?: any[] | undefined;
|
|
1789
1790
|
}[] | undefined;
|
|
1791
|
+
multi_select?: import("../../../../../es/components/form-render").FormCommonState | undefined;
|
|
1790
1792
|
multi_select_value?: string | number | undefined;
|
|
1791
1793
|
wordbook?: {
|
|
1792
1794
|
level_num?: number | undefined;
|
|
@@ -3465,6 +3467,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3465
3467
|
children?: any[] | undefined;
|
|
3466
3468
|
childrenFields?: any[] | undefined;
|
|
3467
3469
|
}[] | undefined;
|
|
3470
|
+
multi_select?: import("../../../../../es/components/form-render").FormCommonState | undefined;
|
|
3468
3471
|
multi_select_value?: string | number | undefined;
|
|
3469
3472
|
wordbook?: {
|
|
3470
3473
|
level_num?: number | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as t,computed as a,inject as l,watch as r,createVNode as o,nextTick as n}from"vue";import{isEqual as i,isArray as u,isString as s}from"lodash-es";import"../../../index.js";import{useCommonInjection as c}from"../../hooks/useCommonInjection.js";import{InjectionAsyncQueue as p,InjectionFormUUID as d}from"../../constants/index.js";import"../../../../../shared/utils/index.js";import"../../utils/index.js";import{useFormField as m}from"../../hooks/useFormField.js";import{NCascader as v}from"naive-ui";import"@vueuse/core";import"date-fns";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"@formily/reactive";import{connect as f,mapProps as y}from"@formily/vue";import"@vue/shared";import"./index.js";import"../../hooks/useFormRenderOptions.js";import{createVisitedSetter as h,assignUpdateValue as j,traverseDependKey as k}from"../../utils/schema.js";const b=f(e({name:"FormCascader",props:{options:{type:Array,default:()=>[]},depth:{type:[Number,String]},urlConfig:{type:Object},requestCache:{type:Boolean,default:!0},onFocus:{type:Function},filterable:{type:Boolean,default:!1},labelField:{type:String,default:"text"},valueField:{type:String,default:"value"},onChange:{},value:{}},emits:["update:value"],setup(e,{slots:f,emit:y}){const j=t(),{field:b,title:C}=m(),g=a((()=>{var t,a,l;return null!=(l=null!=(a=null==(t=e.urlConfig)?void 0:t.nameKey)?a:e.labelField)?l:"text"})),F=a((()=>{var t,a,l;return null!=(l=null!=(a=null==(t=e.urlConfig)?void 0:t.valueKey)?a:e.valueField)?l:"value"})),S=a((()=>{try{const t=Array.isArray(e.value)?e.value:JSON.parse(e.value||"");return Array.isArray(t)&&t.length?t.map((e=>e[
|
|
1
|
+
import{defineComponent as e,ref as t,computed as a,inject as l,watch as r,createVNode as o,nextTick as n}from"vue";import{isEqual as i,isArray as u,isString as s}from"lodash-es";import"../../../index.js";import{useCommonInjection as c}from"../../hooks/useCommonInjection.js";import{InjectionAsyncQueue as p,InjectionFormUUID as d}from"../../constants/index.js";import"../../../../../shared/utils/index.js";import"../../utils/index.js";import{useFormField as m}from"../../hooks/useFormField.js";import{NCascader as v}from"naive-ui";import"@vueuse/core";import"date-fns";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"@formily/reactive";import{connect as f,mapProps as y}from"@formily/vue";import"@vue/shared";import"./index.js";import"../../hooks/useFormRenderOptions.js";import{createVisitedSetter as h,assignUpdateValue as j,traverseDependKey as k}from"../../utils/schema.js";const b=f(e({name:"FormCascader",props:{options:{type:Array,default:()=>[]},depth:{type:[Number,String]},urlConfig:{type:Object},requestCache:{type:Boolean,default:!0},onFocus:{type:Function},filterable:{type:Boolean,default:!1},labelField:{type:String,default:"text"},valueField:{type:String,default:"value"},onChange:{},value:{}},emits:["update:value"],setup(e,{slots:f,emit:y}){const j=t(),{field:b,title:C}=m(),g=a((()=>{var t,a,l;return null!=(l=null!=(a=null==(t=e.urlConfig)?void 0:t.nameKey)?a:e.labelField)?l:"text"})),F=a((()=>{var t,a,l;return null!=(l=null!=(a=null==(t=e.urlConfig)?void 0:t.valueKey)?a:e.valueField)?l:"value"})),S=a((()=>{try{const t=Array.isArray(e.value)?e.value:JSON.parse(e.value||"");return Array.isArray(t)&&t.length?t.map((e=>e[F.value])).slice(-1).join(""):null}catch(e){return null}}));function w(e,t,a){y("update:value",u(a)?a.map((function(e){return{...e,label:e[g.value],children:void 0,parent:void 0}})):null)}const A=l(p);async function H(t){e.filterable?await async function(){if(!e.urlConfig||j.value&&e.requestCache)return;const t=await A.addAsync({...e.urlConfig,params:{lvlnr:"1"},key:C.value,cache:e.requestCache});function a(e,t){const l={[g.value]:e[g.value],[F.value]:e[F.value],depth:t+1,isLeaf:!0,keyword:e.keyword};return u(e.children)&&(l.children=e.children.map((e=>a(e,t+1))),l.isLeaf=!e.children.length),l}j.value=t.map((e=>a(e,0)))}():await async function(t){if(r(e,t))return;const a=await A.addAsync(o(s(t),u(e),C.value,t));if(!a.length&&t)return t.isLeaf=!0,w(0,0,n(t)),void(E.value=!1);const l=a.map((e=>i(e,s(t))));function r(e,t){return!u(e)||!t&&j.value&&e.requestCache||s(t)>=s(e)-1}function o(t,a,l,r){const o={lvlnr:t+1+""};return r&&a.dependKey&&k(a.dependKey,((e,t)=>{o[t]=r[e]})),{params:o,...a,key:l,cache:e.requestCache}}function n(e){let t=e;const a=[e];for(;t.parent;)a.unshift(t.parent),t=t.parent;return a}function i(a,l){return{[g.value]:a[g.value],[F.value]:a[F.value],depth:l+1,parent:t,isLeaf:l+2>=s(e)}}function u(e){return e.urlConfig}function s(e){var t;return null!=(t=null==e?void 0:e.depth)?t:-1}t?t.children=l:j.value=l}(t),await L()}const x=`form-render__cascade--menu-${l(d)}`;async function L(){await n();const e=document.querySelector(`.${x} .v-vl`);e&&e.dispatchEvent(new CustomEvent("scroll"))}function q(e,t){if(!e||!t)return!1;const{keyword:a,[g.value]:l}=t;return s(a)?a.split(",").some((t=>t.includes(e))):!!s(l)&&l.includes(e)}const{injectValueValidate:B,injectValueWatchFromEmpty:K,injectValueBindKey:V}=c();K((()=>e.value),H),B((()=>e.value)),r((()=>e.urlConfig),(async(e,t)=>{i(e,t)||(j.value=null,await H())}));const E=t(!1);function O(e){E.value=!!e,e&&H()}const W=a((()=>j.value||e.options||[])),N=a((()=>!e.filterable)),P=V(S);return()=>o(v,{key:P.value,remote:N.value,filterable:e.filterable,"menu-props":{class:x,onClick:L},checkStrategy:"child",show:!!E.value,"onUpdate:show":O,value:S.value,filter:q,"onUpdate:value":w,labelField:g.value,valueField:F.value,options:W.value,onLoad:H,onFocus:h(b)},f)}}),y({dataSource:"options"},j));export{b as SEARCH_CASCADER};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{arrayed as t}from"../../../../shared/utils/index.js";import"../../../../shared/utils/tapable/SyncHook.js";import"../../../../shared/utils/tapable/SyncBailHook.js";import e from"../../../../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{FIELD_BUSINESS_TYPE as
|
|
1
|
+
import{arrayed as t}from"../../../../shared/utils/index.js";import"../../../../shared/utils/tapable/SyncHook.js";import"../../../../shared/utils/tapable/SyncBailHook.js";import e from"../../../../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{FIELD_BUSINESS_TYPE as l}from"../constants/index.js";function a(){const a=new e(["fieldItem"]);a.tap("__block",(t=>(["CHECKBOX_BLOCK","RADIO_BLOCK"].includes(t.html_type)&&(t.__vertical=!0),t))),a.tap("__age",(e=>("AGE"===e.html_type&&(e.html_type="INPUT_NUMBER",e.reactions=e.reactions?t(e.reactions):[],e.reactions.push({target:e.val_key_unit,fulfill:{state:{disabled:"{{$self.disabled}}"}}}),e.suffixConfig=[{validate:{obj_type:l.AGE_UNIT},val_key:e.val_key_unit,html_type:"SELECT",option:e.option,urlConfig:e.urlConfig}]),e))),a.tap("__multiple_select",(t=>{const{html_type:e,multi_select:l,__multiple:a}=t;return t.__multiple="SEARCH"!==e&&("SEARCH_MORE"===e||("SELECT"===e?"0"===l:a)),t}));const s=[[["SEARCH","PHONE_TYPE","IDCARD_TYPE","SEARCH_MORE"],"SELECT"],["DIGITAL","INPUT_NUMBER"],["CHECKBOX_BLOCK","CHECKBOX"],["RADIO_BLOCK","RADIO"],[["DATE-INPUT","DATETIME-INPUT"],"DATE"],["SWITCH_COMPONENT","SWITCH"],["SLIDER_COMPONENT","SLIDER"],["LEVEL_SEARCH_CASCADE","LEVEL_SEARCH_CASCADER"],["SEARCH_CASCADE","SEARCH_CASCADER"]];return a.tap("__normalize",(t=>(s.some((([e,l])=>(Array.isArray(e)?e.includes(t.html_type):e===t.html_type)&&(t.html_type=l))),t))),{FieldNormalizeWaterfallHook:a}}export{a as useFieldNormalize};
|
|
@@ -145,6 +145,11 @@ export declare type FieldItem = {
|
|
|
145
145
|
placeholder: string;
|
|
146
146
|
validate: ValidateItem;
|
|
147
147
|
option: FormOptionItem[];
|
|
148
|
+
/**
|
|
149
|
+
* 是否开启多选('0'表示开启, 值是反的)
|
|
150
|
+
* 仅在html_type为SELECT时生效
|
|
151
|
+
*/
|
|
152
|
+
multi_select: FormCommonState;
|
|
148
153
|
/**
|
|
149
154
|
* 多选时最大选择数量
|
|
150
155
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cloneDeep as e,isString as t,isFunction as
|
|
1
|
+
import{cloneDeep as e,isString as t,isFunction as n,pick as o,isArray as i,isNumber as a}from"lodash-es";import{isObject as r}from"@vue/shared";const s=Symbol("remove property");function l(){return{formConfigLikeAdaptor:function(l){const p={};return r(l)?{fieldList:function(l){const m=new Map([["NONE",0],["LEFT",1],["RIGHT",2]]),u=new Map([["0",0],["1",1]]),c=new Map([...["RADIO","RADIO_BLOCK","CHECKBOX","CHECKBOX_BLOCK","SELECT","SEARCH","SEARCH_MORE","SWITCH_COMPONENT"].map((e=>[e,"select"])),...["DATE"].map((e=>[e,"date"])),...["INPUT"].map((e=>[e,"input"])),...["DIGITAL"].map((e=>[e,"number"]))]),d=(e,t)=>{if(!r(e))return;const n={label:e.describe,...e};t.options=i(t.options)?[...t.options,n]:[n]},f=(e,n)=>{0!==e&&"0"!==e&&(t(e)||a(e))&&(n.componentProps={maxTagCount:+e,...n.componentProps})},_=new Map([["multi_select_value",f],["is_null",(e,t,n,o)=>{"1"!==e&&"0"===e&&(o[n.val_key]=[{required:!0,message:"必填"}])}],["validate",(e,t)=>{if(!r(e))return;t.componentProps=Object.assign({},t.comonentProps,Object.entries({maxlength:"max_length",minlength:"min_length",max:"max_value",min:"min_value",precision:"decimal_length"}).reduce(((t,[n,o])=>(t[n]=e[o],t)),{}))}],["dateValidate",(e,t)=>{r(e)&&(t.isDateDisabled=(t,n)=>{if(!r(n))return;const{startDate:o,endDate:i}=e;let a=!1;return o&&(a=new Date(n[o]).getTime()>t),i&&(a=a||new Date(n[i]).getTime()<t),a})}],["date_format","valueFormat"],...["open","close"].map((e=>[e,d])),["is_edit",{property:"isEdit",valueMap:u}],["html_type",(e,n,o)=>{var i;if(!t(e))return;if("DATE"===e)return void(n.formType=t(o.date_format)&&o.date_format.startsWith("HH:mm")?"time":"date");n.formType=null!=(i=c.get(e))?i:e;const a="SEARCH"!==e&&("SEARCH_MORE"===e||("SELECT"===e?"0"===o.multi_select:null));a&&(n.componentProps={multiple:a,...n.componentProps})}],["option",{property:"options",fieldMap:new Map([["text","label"]])}],["alias",(e,t,n)=>{t.title=`${e}${n.suffix?`(${n.suffix})`:""}`}]]),g=new Map([["sum","isSum"],["show","isShow"],["elementId","columnName"],["columnWidth","colWidth"],["fixedWayEnum",{property:"isFixed",valueMap:m}],["multi_select_value",f],["setting",{fieldMap:_,assign:!0}]]);return l.map((e=>E(e,p,g)));function E(a,l,p){if(!p)return e(a);const m={};return Object.entries(a).forEach((([e,o])=>{const i=p.get(e);return i?i!==s?t(i)?m[i]=o:n(i)?i(o,m,a,l):void(r(i)&&(i.assign?Object.assign(m,u(o,i)):m[i.property||e]=u(o,i))):void 0:m[e]=o})),m.componentProps=Object.assign({},m.componentProps,o(m,["options","maxTagCount","isDateDisabled"])),m;function u(e,t){var o,a;return!r(t)||n(t)?e:i(e)?e.map((e=>u(e,t))):r(e)?E(e,l,t.fieldMap):null!=(a=null==(o=t.valueMap)?void 0:o.get(e))?a:e}}}(l.fieldList),editRules:p}:{fieldList:[],editRules:p}}}}export{l as useColumnConfigAdaptor};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{reactive as e,
|
|
1
|
+
import{reactive as e,inject as t,createVNode as o,mergeProps as i,onBeforeUnmount as n}from"vue";import"../../../../../index.js";import{EDITABLE_WIDGET_TYPE as l,InjectionIhoTableUUID as r}from"../../../../constants/index.js";import{createIhoTableClearActivedInterceptor as s,IhoTableRenderHelper as d,IhoTableUtils as u}from"../../../../utils/index.js";import p from"./editSelect.js";import{getDefaultValue as a}from"./selectUtils.js";import{defineTablePlugin as c}from"../../../../hooks/useTablePlugin.js";function f(){const f="selectRendererPlugin",m=e(new Map),v=e(new Map);return c({name:f,vxe(e){e.interceptor.add("event.clearActived",s(l.SELECT,(e=>e.classList.contains("iho-table__selectMenu")))),e.renderer.add(l.SELECT,{renderCell({props:e},{row:i,column:n}){const l=t(r),s=m.get(l)[n.field]||[];return[o("span",null,[a(i,e,s)])]},renderEdit:d.createRenderEdit((({fieldItem:e,emitFormClick:n,row:l,column:s,$rowIndex:d})=>{const u=t(r),a=m.get(u)[s.field]||[];return[o(p,i({queryOptions:e.queryOptions,options:a},e.componentProps,{column:s,row:l,"row-index":d,value:l[s.field],"onUpdate:value":e=>l[s.field]=e,onClick:n}),null)]}))})},apply(e){e.fieldHooks.fieldList.tap(f,((e,{uuid:t})=>(t&&(v.set(t,e),m.set(t,{})),e))),e.fieldHooks.fieldEnd.tapPromise(f,(async({uuid:e})=>{if(!e)return;const t=v.get(e),o=m.get(e);t.forEach((async e=>{var t,i;const n=null==(t=e.editRender)?void 0:t.props;if(e.field&&n&&"SELECT"===u.getCellType(n)){if(o[e.field])return;let t=n.options||[];if(n.queryOptions)try{const o={column:e,isFullData:!0};t=await(null==(i=n.queryOptions)?void 0:i.call(n,o))}catch(e){console.log(`获取${n.field}_options错误`)}o[e.field]=t}}))})),e.setupHooks.setup.tap(f,(e=>{n((()=>{e.value.uuid&&(v.delete(e.value.uuid),m.delete(e.value.uuid))}))}))}})}export{f as selectRendererPlugin};
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import { AnyObject } from '../../../../../../../../es/shared/types';
|
|
1
2
|
import { LowCodeTableFieldItem } from '../../../../../../../../es/components/iho-table/src/types';
|
|
2
|
-
export declare function getDefaultValue(row: any, item: LowCodeTableFieldItem | any, options?:
|
|
3
|
+
export declare function getDefaultValue(row: any, item: LowCodeTableFieldItem | any, options?: AnyObject[]): any;
|
|
@@ -67,10 +67,11 @@ export declare namespace IhoTableLowCodeField {
|
|
|
67
67
|
[K: string]: unknown;
|
|
68
68
|
}>;
|
|
69
69
|
type QueryOptions = (payload: {
|
|
70
|
-
keyword
|
|
71
|
-
row
|
|
70
|
+
keyword?: string;
|
|
71
|
+
row?: AnyObject;
|
|
72
72
|
column: VxeTableDefines.ColumnInfo;
|
|
73
|
-
rowIndex
|
|
73
|
+
rowIndex?: number;
|
|
74
|
+
isFullData?: boolean;
|
|
74
75
|
}) => Promise<AnyObject[]>;
|
|
75
76
|
}
|
|
76
77
|
export declare type LowCodeTableFieldItem = {
|
|
@@ -94,6 +94,7 @@ declare const ShortcutSetter: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
94
94
|
children?: any[] | undefined;
|
|
95
95
|
childrenFields?: any[] | undefined;
|
|
96
96
|
}[] | undefined;
|
|
97
|
+
multi_select?: import("..").FormCommonState | undefined;
|
|
97
98
|
multi_select_value?: string | number | undefined;
|
|
98
99
|
wordbook?: {
|
|
99
100
|
level_num?: number | undefined;
|
|
@@ -96,6 +96,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
96
96
|
children?: any[] | undefined;
|
|
97
97
|
childrenFields?: any[] | undefined;
|
|
98
98
|
}[] | undefined;
|
|
99
|
+
multi_select?: import("../../../../es/components/form-render").FormCommonState | undefined;
|
|
99
100
|
multi_select_value?: string | number | undefined;
|
|
100
101
|
wordbook?: {
|
|
101
102
|
level_num?: number | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cnhis-design-vue",
|
|
3
|
-
"version": "3.1.42-beta.
|
|
3
|
+
"version": "3.1.42-beta.53",
|
|
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": "
|
|
64
|
+
"gitHead": "56951dc47382372aee9c01af6c5327f62f9c2f25"
|
|
65
65
|
}
|