cnhis-design-vue 3.1.51-release.0 → 3.1.51-release.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components/base-search/index.d.ts +13 -8
- package/es/components/base-search/src/index.vue.d.ts +13 -8
- package/es/components/base-search/src/index.vue2.js +1 -1
- package/es/components/callback/index.d.ts +69 -0
- package/es/components/callback/index.js +1 -0
- package/es/components/callback/src/components/dialog/drawer.vue.d.ts +353 -0
- package/es/components/callback/src/components/dialog/drawer.vue.js +1 -0
- package/es/components/callback/src/components/dialog/drawer.vue2.js +1 -0
- package/es/components/callback/src/components/dialog/modal.vue.d.ts +166 -0
- package/es/components/callback/src/components/dialog/modal.vue.js +1 -0
- package/es/components/callback/src/components/dialog/modal.vue2.js +1 -0
- package/es/components/callback/src/components/popup/index.vue.d.ts +48 -0
- package/es/components/callback/src/components/popup/index.vue.js +1 -0
- package/es/components/callback/src/components/render/drawerIframe/index.vue.d.ts +62 -0
- package/es/components/callback/src/components/render/drawerIframe/index.vue.js +1 -0
- package/es/components/callback/src/components/render/drawerIframe/index.vue2.js +1 -0
- package/es/components/callback/src/components/render/enums.d.ts +5 -0
- package/es/components/callback/src/components/render/enums.js +1 -0
- package/es/components/callback/src/components/render/index.vue.d.ts +57 -0
- package/es/components/callback/src/components/render/index.vue.js +1 -0
- package/es/components/callback/src/components/render/popupMaps.d.ts +5700 -0
- package/es/components/callback/src/components/render/popupMaps.js +1 -0
- package/es/components/callback/src/index.vue.d.ts +68 -0
- package/es/components/callback/src/index.vue.js +1 -0
- package/es/components/callback/src/index.vue2.js +1 -0
- package/es/components/callback/src/types/index.d.ts +11 -0
- package/es/components/callback/style/callback-iconfont.ttf +0 -0
- package/es/components/callback/style/index.css +1 -0
- package/es/components/classification/index.d.ts +57 -15
- package/es/components/classification/src/components/search-filter/index.vue.d.ts +57 -15
- package/es/components/classification/src/components/set-classification/index.vue.d.ts +57 -15
- package/es/components/classification/src/index.vue.d.ts +57 -15
- package/es/components/classification/src/index.vue2.js +1 -1
- package/es/components/expand-field/index.d.ts +0 -13
- package/es/components/expand-field/src/components/FormItemPerson.vue.d.ts +0 -13
- package/es/components/expand-field/src/components/PersonModal.vue.d.ts +0 -13
- package/es/components/expand-field/src/components/PersonModal.vue2.js +1 -1
- package/es/components/expand-field/src/components/form.vue.d.ts +0 -13
- package/es/components/expand-field/src/index.vue.d.ts +0 -13
- package/es/components/expand-field/src/index.vue2.js +1 -1
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcessChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useLeft.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useBottom.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useOther.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useTop.js +1 -1
- package/es/components/fabric-chart/src/hooks/useCommon.d.ts +1 -0
- package/es/components/fabric-chart/src/hooks/useCommon.js +1 -1
- package/es/components/form-config/index.d.ts +174 -25
- package/es/components/form-config/src/FormConfig.vue.d.ts +175 -26
- package/es/components/form-config/src/FormConfig.vue2.js +1 -1
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +4 -4
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +13 -10
- package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +121 -0
- package/es/components/form-config/src/components/FormConfigEventSetting.vue.js +1 -0
- package/es/components/form-config/src/components/FormConfigEventSetting.vue2.js +1 -0
- package/es/components/form-config/src/constants/index.d.ts +19 -1
- package/es/components/form-config/src/constants/index.js +1 -1
- package/es/components/form-config/src/hooks/useDataNormalize.d.ts +1 -1
- package/es/components/form-config/src/hooks/useDataNormalize.js +1 -1
- package/es/components/form-config/src/types/index.d.ts +7 -3
- package/es/components/form-config/style/index.css +1 -1
- package/es/components/form-render/index.d.ts +4 -4
- package/es/components/form-render/src/FormRender.vue.d.ts +2 -2
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +4 -4
- package/es/components/form-render/src/components/renderer/remoteSearch.d.ts +79 -2
- package/es/components/form-render/src/components/renderer/remoteSearch.js +1 -1
- package/es/components/form-render/src/components/renderer/select.d.ts +10 -1
- package/es/components/form-render/src/components/renderer/select.js +1 -1
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
- package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +2 -2
- package/es/components/form-render/src/hooks/useFormRenderOptions.d.ts +16 -10
- package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
- package/es/components/form-render/src/hooks/useFormValidator.js +1 -1
- package/es/components/form-render/src/hooks/useLowCodeReactions.d.ts +1 -1
- package/es/components/form-render/src/types/fieldItem.d.ts +2 -1
- package/es/components/form-render/src/types/index.d.ts +1 -19
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.d.ts +1 -1
- package/es/components/iho-table/src/types/index.d.ts +2 -1
- package/es/components/index.css +1 -1
- package/es/components/index.d.ts +4 -3
- package/es/components/index.js +1 -1
- package/es/components/info-header/index.d.ts +13 -13
- package/es/components/info-header/src/InfoHeader.vue.d.ts +13 -13
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +1 -1
- package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +1 -1
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +5 -5
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +4 -4
- package/es/components/quick-search/index.d.ts +13 -8
- package/es/components/quick-search/src/index.vue.d.ts +13 -8
- package/es/components/quick-search/src/index.vue2.js +1 -1
- package/es/components/scale-view/src/hooks/use-component.d.ts +615 -255
- package/es/components/select-label/index.d.ts +617 -256
- package/es/components/select-label/index.js +1 -1
- package/es/components/{iho-select-label/src/LabelFormContent.vue.d.ts → select-label/src/ihoLabel/IhoLabelFormContent.vue.d.ts} +5 -5
- package/es/components/select-label/src/ihoLabel/IhoLabelFormContent.vue.js +1 -0
- package/es/components/select-label/src/ihoLabel/IhoLabelFormContent.vue2.js +1 -0
- package/es/components/{iho-select-label/src/SelectLabel.vue.d.ts → select-label/src/ihoLabel/IhoSelectLabel.vue.d.ts} +7 -7
- package/es/components/select-label/src/ihoLabel/IhoSelectLabel.vue.js +1 -0
- package/es/components/select-label/src/ihoLabel/IhoSelectLabel.vue2.js +1 -0
- package/es/components/{iho-select-label/src/components/label-classify.vue.d.ts → select-label/src/ihoLabel/iho-label-classify.vue.d.ts} +1 -1
- package/es/components/select-label/src/ihoLabel/iho-label-classify.vue.js +1 -0
- package/es/components/select-label/src/ihoLabel/iho-label-classify.vue2.js +1 -0
- package/es/components/select-label/src/index.vue.d.ts +899 -0
- package/es/components/select-label/src/index.vue.js +1 -0
- package/es/components/select-label/src/index.vue2.js +1 -0
- package/es/components/shortcut-setter/index.d.ts +6 -5
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +6 -5
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +52 -7
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue2.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/Date.vue.d.ts +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.d.ts +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/InputFilter.vue.d.ts +34 -2
- package/es/components/table-filter/src/components/classify-filter/components/InputFilter.vue2.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +36 -4
- package/es/components/table-filter/src/components/classify-filter/hooks/useFilterConditions.d.ts +1 -6
- package/es/components/table-filter/src/components/classify-filter/hooks/useFilterConditions.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +57 -15
- package/es/components/table-filter/src/components/classify-filter/index.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/InputCustom.vue.d.ts +58 -0
- package/es/components/table-filter/src/components/render-widget/components/InputCustom.vue.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/InputCustom.vue2.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/SelectDynamicOption/index.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/index.d.ts +56 -1
- package/es/components/table-filter/src/components/render-widget/components/index.js +1 -1
- package/es/components/table-filter/src/components/render-widget/index.vue.d.ts +4 -1
- package/es/components/table-filter/src/components/render-widget/index.vue.js +1 -1
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +55 -1
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -1
- package/es/components/table-filter/src/hooks/useAdvanced.d.ts +2 -0
- package/es/components/table-filter/src/hooks/useAdvanced.js +1 -1
- package/es/components/table-filter/src/hooks/useRenderWidget.d.ts +1 -7
- package/es/components/table-filter/src/hooks/useRenderWidget.js +1 -1
- package/es/components/table-filter/src/tool/transformData.d.ts +1 -6
- package/es/components/table-filter/src/tool/transformData.js +1 -1
- package/es/components/table-filter/src/types/index.d.ts +16 -1
- package/es/shared/components/InputNumberSlash/InputNumberSlash.d.ts +19 -1
- package/es/shared/components/InputNumberSlash/InputNumberSlash.js +1 -1
- package/es/shared/directive/flexibleResize.d.ts +4 -0
- package/es/{components/classification/src → shared}/directive/flexibleResize.js +1 -1
- package/es/shared/directive/index.d.ts +1 -0
- package/es/shared/directive/index.js +1 -0
- package/es/shared/package.json.js +1 -1
- package/es/shared/types/business.d.ts +27 -0
- package/es/shared/utils/business.d.ts +1 -2
- package/es/shared/utils/index.d.ts +3 -3
- package/package.json +2 -2
- package/es/components/classification/src/directive/flexibleResize.d.ts +0 -28
- package/es/components/iho-select-label/index.d.ts +0 -363
- package/es/components/iho-select-label/index.js +0 -1
- package/es/components/iho-select-label/src/LabelFormContent.vue.js +0 -1
- package/es/components/iho-select-label/src/LabelFormContent.vue2.js +0 -1
- package/es/components/iho-select-label/src/SelectLabel.vue.js +0 -1
- package/es/components/iho-select-label/src/SelectLabel.vue2.js +0 -1
- package/es/components/iho-select-label/src/components/label-classify.vue.js +0 -1
- package/es/components/iho-select-label/src/components/label-classify.vue2.js +0 -1
- package/es/components/iho-select-label/style/iho-select-label-iconfont.ttf +0 -0
- package/es/components/iho-select-label/style/index.css +0 -1
- package/es/components/table-filter/src/types/tool.d.ts +0 -7
- /package/es/components/{iho-select-label → callback}/src/types/index.js +0 -0
- /package/es/components/{iho-select-label → select-label}/src/types/index.d.ts +0 -0
- /package/es/components/{table-filter/src/types/tool.js → select-label/src/types/index.js} +0 -0
|
@@ -80,7 +80,7 @@ export declare function useFieldNormalize(): {
|
|
|
80
80
|
businessFormatter: import("../types").FormBusinessFormatter;
|
|
81
81
|
requestInstance: import("./useFormRequest").RequestInstance;
|
|
82
82
|
enterToNextWidget: boolean | ((fieldItem: FieldItem) => boolean | void);
|
|
83
|
-
lowCodeReactions: import("
|
|
83
|
+
lowCodeReactions: import("../../../../../es/shared/types").FormLowCodeReactions.Config[];
|
|
84
84
|
linebarAutoHidden: boolean;
|
|
85
85
|
bordered: string | boolean;
|
|
86
86
|
uniqueCacheData: boolean;
|
|
@@ -167,7 +167,7 @@ export declare function useFieldNormalize(): {
|
|
|
167
167
|
businessFormatter: import("../types").FormBusinessFormatter;
|
|
168
168
|
requestInstance: import("./useFormRequest").RequestInstance;
|
|
169
169
|
enterToNextWidget: boolean | ((fieldItem: FieldItem) => boolean | void);
|
|
170
|
-
lowCodeReactions: import("
|
|
170
|
+
lowCodeReactions: import("../../../../../es/shared/types").FormLowCodeReactions.Config[];
|
|
171
171
|
linebarAutoHidden: boolean;
|
|
172
172
|
bordered: string | boolean;
|
|
173
173
|
uniqueCacheData: boolean;
|
|
@@ -2,6 +2,11 @@ import { AnyObject, Func } from '../../../../../es/shared/types';
|
|
|
2
2
|
import { Ref } from 'vue';
|
|
3
3
|
import { FormWordbook, RecommendIds, UrlConfig } from '../../../../../es/components/form-render';
|
|
4
4
|
import { RecommendItem } from '../../../../../es/components/recommend-search/src/types';
|
|
5
|
+
declare type UseOptionHooks = Partial<Record<'onRequestConfigChange' | 'onDepsChange', (payload: {
|
|
6
|
+
fetchData: (content?: string | null, otherParams?: AnyObject) => any;
|
|
7
|
+
labelKey: string;
|
|
8
|
+
valueKey: string;
|
|
9
|
+
}) => any>>;
|
|
5
10
|
export declare const searchContentMatcher: (searchContent: string, label: string) => RegExpMatchArray | null;
|
|
6
11
|
export declare function useRecommendOptions(props: {
|
|
7
12
|
recommend: boolean;
|
|
@@ -16,15 +21,15 @@ export declare function useRecommendOptions(props: {
|
|
|
16
21
|
getRecommend: (content?: string) => Promise<void>;
|
|
17
22
|
sortedOptions: import("vue").ComputedRef<AnyObject[]>;
|
|
18
23
|
};
|
|
19
|
-
export declare function useUrlConfigOptions(props: {
|
|
20
|
-
labelField
|
|
21
|
-
valueField
|
|
22
|
-
showField
|
|
23
|
-
urlConfig
|
|
24
|
-
options
|
|
24
|
+
export declare function useUrlConfigOptions(props: Partial<{
|
|
25
|
+
labelField: string;
|
|
26
|
+
valueField: string;
|
|
27
|
+
showField: string;
|
|
28
|
+
urlConfig: UrlConfig;
|
|
29
|
+
options: AnyObject[];
|
|
25
30
|
requestCache: boolean;
|
|
26
31
|
lazyRequest: boolean;
|
|
27
|
-
}
|
|
32
|
+
}>, valueRef: Ref, hooks?: UseOptionHooks): {
|
|
28
33
|
labelKey: import("vue").ComputedRef<string>;
|
|
29
34
|
loading: Ref<boolean>;
|
|
30
35
|
showKey: import("vue").ComputedRef<string | undefined>;
|
|
@@ -32,7 +37,7 @@ export declare function useUrlConfigOptions(props: {
|
|
|
32
37
|
remoteOptions: Ref<AnyObject[] | null>;
|
|
33
38
|
filterOptions: import("vue").ComputedRef<AnyObject[]>;
|
|
34
39
|
fullOptions: import("vue").ComputedRef<AnyObject[]>;
|
|
35
|
-
fetchData: (content?: string) => Promise<null | undefined>;
|
|
40
|
+
fetchData: (content?: string | null, otherParams?: AnyObject) => Promise<null | undefined>;
|
|
36
41
|
searchContent: Ref<string | undefined>;
|
|
37
42
|
};
|
|
38
43
|
export declare function useAutographOptions(props: Partial<{
|
|
@@ -44,7 +49,7 @@ export declare function useAutographOptions(props: Partial<{
|
|
|
44
49
|
autograph: string;
|
|
45
50
|
lazyRequest: boolean;
|
|
46
51
|
options: AnyObject[];
|
|
47
|
-
}>, valueRef: Ref): {
|
|
52
|
+
}>, valueRef: Ref, hooks?: UseOptionHooks): {
|
|
48
53
|
labelKey: import("vue").ComputedRef<string>;
|
|
49
54
|
showKey: import("vue").ComputedRef<string | undefined>;
|
|
50
55
|
loading: Ref<boolean>;
|
|
@@ -52,6 +57,7 @@ export declare function useAutographOptions(props: Partial<{
|
|
|
52
57
|
valueKey: import("vue").ComputedRef<string>;
|
|
53
58
|
filterOptions: import("vue").ComputedRef<AnyObject[]>;
|
|
54
59
|
fullOptions: import("vue").ComputedRef<AnyObject[]>;
|
|
55
|
-
fetchData: (content?: string) => Promise<null | undefined>;
|
|
60
|
+
fetchData: (content?: string | null, otherParams?: AnyObject) => Promise<null | undefined>;
|
|
56
61
|
searchContent: Ref<string | undefined>;
|
|
57
62
|
};
|
|
63
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{checkInSetupEnv as e,arrayed as l,jsonParse as n,keywordMatcher as u}from"../../../../shared/utils/index.js";import{useForm as t}from"@formily/vue";import{useMemoize as a}from"@vueuse/core";import{identity as o,uniqBy as r,isEqual as i,isString as v,omit as
|
|
1
|
+
import{checkInSetupEnv as e,arrayed as l,jsonParse as n,keywordMatcher as u}from"../../../../shared/utils/index.js";import{useForm as t}from"@formily/vue";import{useMemoize as a}from"@vueuse/core";import{identity as o,uniqBy as r,isEqual as i,isString as v,omit as s,isArray as c,isFunction as m}from"lodash-es";import{computed as f,inject as d,ref as y,watch as p,toRaw as h}from"vue";import"../../index.js";import{InjectionAsyncQueue as g,InjectionFormLifeCycleCaller as w,InjectionFormItemDepsCollector as K}from"../constants/index.js";import{createUrlConfigParams as C,formRenderLog as b}from"../utils/index.js";import{useFormField as k}from"./useFormField.js";import{useFormRequest as R}from"./useFormRequest.js";function F(e,l){const n=y();return f({get:()=>n.value?n.value:e[l],set(e){n.value=e}})}const q=(()=>{const e=a((e=>new RegExp(`(.*)${e.split("").map((e=>`(${function(e){return e.match(/[()\[\]{}$^\/]/)?"\\"+e:e}(e)})`)).join("(.*)")}(.*)`)),{getKey:o});return(l,n)=>n.match(e(l))})();function O(){const e=y();return{searchContent:e,optionSearchFilter:function(l,n,t){if(!e.value)return l;const a=c(t)?t.filter((e=>e&&v(e))):[];return l.filter((l=>function(l,n,t){if(!e.value)return!0;const a=l?l[n]:"";return!!v(a)&&(!!q(e.value,a)||!!u(e.value,l.keyword)||!!t.length&&t.some((n=>v(l[n])&&l[n].includes(e.value))))}(l,n,a)))}}}function j(e,l,u,t,a){const o=F(e,"commonList"),i=F(e,"recentList"),{searchContent:v,optionSearchFilter:c}=O();function y(e){return n(e.itemObj)}const p=f((()=>{var e,l;return null!=(l=null==(e=o.value)?void 0:e.map(y))?l:[]})),h=f((()=>{var e,l;return null!=(l=null==(e=i.value)?void 0:e.map(y))?l:[]})),w=f((()=>{if(!e.recommend||!p.value.length&&!h.value.length)return l.value;const n=r(p.value.concat(h.value),(e=>e[a.value])),u=l.value.filter((e=>n.every((function(l){return l[a.value]!==e[a.value]}))));return[...c(n,t.value),...u]})),{getRecommendRequestInfo:K,getHttpInstance:C}=R();function b(l){const{url:n,getRecommendIds:u}=K(),t=m(u)?u():{},a=m(e.getRecommendInfo)?e.getRecommendInfo():{};return{url:n[l],info:Object.assign({},t,a)}}const{fieldKey:q,field:j}=k(),I=d(g);return{postRecommend:async function(l){if(!e.recommend)return;const n=C();if(!n)return;const{url:t,info:o}=b("post"),r=w.value.find((e=>e[a.value]===l));r&&u("postRecommend",await n.post(t,{...o,keyword:"",itemId:a.value,itemObj:JSON.stringify(r)}))},getRecommend:async function(l){if(!e.recommend)return;if(v.value=l,o.value&&i.value&&e.recommendCache)return;const n=await I.addAsync(function(l,n){const{url:u,info:o}=b("get");return{url:u,method:"get",key:l,cache:n,params:{...o,recNum:Math.max(e.commonNum,e.recentNum),keyword:""},payload:{field:j.value,labelKey:t.value,valueKey:a.value}}}(q.value,e.recommendCache)),{commonly:u,recently:r}=n.reduce(((e,l)=>("commonly"===l.type?e.commonly.push(s(l,["type"])):"recently"===l.type&&e.recently.push(s(l,["type"])),e)),{commonly:[],recently:[]});o.value=u.slice(0,e.commonNum),i.value=r.slice(0,e.recentNum)},sortedOptions:w}}function I(l,n,u){e();const t=d(g),a=d(w),o=f((()=>{var e,n,u;return null!=(u=null!=(n=null==(e=l.urlConfig)?void 0:e.nameKey)?n:l.labelField)?u:"text"})),r=f((()=>{var e,n,u;return null!=(u=null!=(n=null==(e=l.urlConfig)?void 0:e.valueKey)?n:l.valueField)?u:"value"})),s=f((()=>{var e,n;return null!=(n=null==(e=l.urlConfig)?void 0:e.showKey)?n:l.showField})),{searchContent:c,optionSearchFilter:m}=O(),R=y(null),{field:F,fieldKey:q}=k(),j=y(!1),I=async function(e,n){if(c.value=e||"",!l.urlConfig)return R.value=null;try{j.value=!0;const e={field:F.value,labelKey:o.value,valueKey:r.value},u=await t.addAsync(await C({config:{...l.urlConfig,payload:e,params:{...l.urlConfig.params,...n}},cache:l.requestCache,field:F.value}));h(R.value)!==u&&(R.value=u,a("afterOptionInit",[q.value,R.value,e]))}catch(e){v(e)&&b(e)}finally{j.value=!1}},x=f((()=>R.value?m(R.value,o.value):Array.isArray(l.options)?m(l.options,o.value):[])),D=f((()=>R.value||l.options||[])),A=d(K);return p((()=>l.urlConfig),((e,t)=>{if(i(e,t))return;if(R.value=null,!e)return R.value=null;const a={fetchData:I,labelKey:o.value,valueKey:r.value},{onRequestConfigChange:v,onDepsChange:s}=u||{};A.setDeps(q.value,e.dependKey||[],(async()=>{R.value=null,n.value=null,l.lazyRequest||(s?s(a):I())})),!n.value&&l.lazyRequest||(v?v(a):I())}),{immediate:!0}),{labelKey:o,loading:j,showKey:s,valueKey:r,remoteOptions:R,filterOptions:x,fullOptions:D,fetchData:I,searchContent:c}}function x(n,u,a){e();const o=d(g),r=d(w),s=t(),c=f((()=>{var e;const u=l(null==(e=n.wordbook)?void 0:e.show_key)[0];return v(u)?u:null})),m=f((()=>{var e,l,u,t;const a=null==(l=null==(e=n.wordbook)?void 0:e.render_key)?void 0:l[0];return v(a)?a:null!=(t=null!=(u=c.value)?u:n.labelField)?t:"text"})),C=f((()=>{var e,l,u;return null!=(u=null!=(l=null==(e=n.wordbook)?void 0:e.value_key)?l:n.valueField)?u:"value"})),F=f((()=>{var e;return(null==(e=n.wordbook)?void 0:e.search_key)||[]})),q=f((()=>{var e;return null!=(e=c.value)?e:n.showField})),{searchContent:j,optionSearchFilter:I}=O(),x=y(null),{fieldKey:D,field:A}=k(),{getSearchRequestInfo:S}=R(),N=y(!1),_=async function(e,l){if(j.value=e||"",!n.autograph||!n.wordbook)return x.value=null;try{N.value=!0;const e={field:A.value,labelKey:m.value,valueKey:C.value},u=await o.addAsync(function(e,l,u,t,a){var o,r,i;const v={autograph:l,wordbookId:e.id,wordbookType:e.type,fieldKeys:e.search_key,keyword:"",page:1,...a};if(null==(o=e.queryParams)?void 0:o.length){const l=null!=(i=null==(r=s.value)?void 0:r.getFormState().values)?i:{};e.queryParams.forEach((e=>{v[e]=l[e]}))}return{...S(),params:v,key:u,cache:n.requestCache,payload:t}}(n.wordbook,n.autograph,D.value,e,l));h(x.value)!==u&&(x.value=u,r("afterOptionInit",[D.value,x.value,e]))}catch(e){v(e)&&b(e)}finally{N.value=!1}},z=f((()=>x.value?I(x.value,m.value,F.value):Array.isArray(n.options)?I(n.options,m.value):[])),P=f((()=>x.value||n.options||[])),$=d(K);return p((()=>n.wordbook),((e,l)=>{if(i(e,l))return;if(x.value=null,!e)return x.value=null;const t={fetchData:_,labelKey:m.value,valueKey:C.value},{onRequestConfigChange:o,onDepsChange:r}=a||{};$.setDeps(D.value,e.queryParams||[],(async()=>{x.value=null,r?r(t):_()})),!u.value&&n.lazyRequest||(o?o(t):_())}),{immediate:!0}),{labelKey:m,showKey:q,loading:N,remoteOptions:x,valueKey:C,filterOptions:z,fullOptions:P,fetchData:_,searchContent:j}}export{q as searchContentMatcher,x as useAutographOptions,j as useRecommendOptions,I as useUrlConfigOptions};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{arrayed as e}from"../../../../shared/utils/index.js";import{once as
|
|
1
|
+
import{arrayed as e}from"../../../../shared/utils/index.js";import{once as i,isNumber as a,isString as m}from"lodash-es";import"vue";import{registerValidateLocale as r,registerValidateRules as s}from"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import{isFunction as l}from"@vueuse/core";import"naive-ui";import"../../index.js";import{isIdCard as n}from"../utils/business.js";function o(){const i=new Map([["mobile",({validate:e})=>({format:"phone",message:null==e?void 0:e.message})],["integer",({validate:e})=>({format:"integer",message:null==e?void 0:e.message})],["number",({validate:e})=>({format:"number",message:null==e?void 0:e.message})],["id_card",({validate:e})=>({validator(i){var a;if(null!=i&&""!==i)return m(i)&&n(i)?void 0:null!=(a=null==e?void 0:e.message)?a:"该字段不是合法的身份证格式"}})],["regular",({validate:e,regular_expression:i,regular_error_tip:a})=>({pattern:i||(null==e?void 0:e.regular_expression)||"",message:a||(null==e?void 0:e.regular_error_tip)||(null==e?void 0:e.message)||"格式错误"})]]),a={triggerType:"onBlur"};return{createValidatorSchema:function(m){const r=[],{validate:{vali_obj:s,max_length:n,min_length:o,message:u,max_value:t,min_value:g,decimal_length:d}={},validator:v}=m;if(v&&e(v).forEach((e=>{l(e)&&r.push({validator:i=>e(i,m)})})),n&&r.push({max:n,message:u}),o&&r.push({min:o,message:u}),t&&r.push({maximum:t,message:u}),g&&r.push({minimum:g,message:u}),null!=d&&r.push(((e,i)=>{const a=null!=i?i:`小数位数最多${e}位`;return{validator(i){var m;return(null==(m=String(i).split(".")[1])?void 0:m.length)>e?a:""}}})(+d,u)),s){const e=i.get(s)||(({validate:e})=>({format:s,message:null==e?void 0:e.message}));r.push(Object.assign({},a,e(m)))}return r}}}const u=i((()=>{r({"zh-CN":{required:"${alias||name}为必填"}}),s({maximum:(e,i)=>a(Number(i.maximum))&&null!=e&&""!==e&&"/"!==e?(m(e)&&(e=+e),!a(e)||isNaN(e)?"":e>Number(i.maximum)&&i.message||""):"",minimum:(e,i)=>a(Number(i.minimum))&&null!=e&&""!==e&&"/"!==e?(m(e)&&(e=+e),!a(e)||isNaN(e)?"":e<Number(i.minimum)&&i.message||""):""})}));export{o as useFormValidator,u as validateMessageLocale};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { FormLowCodeReactions } from '../../../../../es/shared/types';
|
|
1
2
|
import { Form } from '@formily/core';
|
|
2
3
|
import { MaybeRef } from '@vueuse/core';
|
|
3
|
-
import { FormLowCodeReactions } from '../../../../../es/components/form-render';
|
|
4
4
|
export declare function useLowCodeReactions(configListRef: MaybeRef<FormLowCodeReactions.Config[] | undefined>, formModel: Form): {
|
|
5
5
|
lowCodeReactionsHandler: (field: string) => void;
|
|
6
6
|
triggerAllReactionsHandler: () => void;
|
|
@@ -149,9 +149,10 @@ export declare type FieldItem = {
|
|
|
149
149
|
allow_check_mid_level: '1' | '2' | '3' | '4';
|
|
150
150
|
prefix: string | AnyObject | (() => any);
|
|
151
151
|
suffix: string | AnyObject | (() => any);
|
|
152
|
-
allowSlash: boolean;
|
|
152
|
+
allowSlash: boolean | string;
|
|
153
153
|
allowModify: '0' | '1';
|
|
154
154
|
show_key: string;
|
|
155
|
+
whiteList: string[];
|
|
155
156
|
bordered: boolean | string;
|
|
156
157
|
fieldType: SchemaTypes;
|
|
157
158
|
content: string | FormRenderer | Record<string, FormRenderer>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AsyncQueue } from '../../../../../es/shared/hooks';
|
|
2
|
-
import { AnyObject,
|
|
2
|
+
import { AnyObject, FormLowCodeReactions, FormOperationalConfig, UndefinedAble } from '../../../../../es/shared/types';
|
|
3
3
|
import { DataField, Field, Form } from '@formily/core';
|
|
4
4
|
import { ISchema } from '@formily/json-schema/esm/types';
|
|
5
5
|
import { Component, FunctionalComponent } from 'vue';
|
|
@@ -152,21 +152,3 @@ export declare type FormBusinessFormatter = (payload: {
|
|
|
152
152
|
type: FIELD_BUSINESS_TYPE;
|
|
153
153
|
from: FIELD_BUSINESS_TYPE;
|
|
154
154
|
}) => unknown;
|
|
155
|
-
export declare namespace FormLowCodeReactions {
|
|
156
|
-
type ConObj = {
|
|
157
|
-
con: LOW_CODE_VALUE_RELATION;
|
|
158
|
-
field_key: string;
|
|
159
|
-
value: unknown;
|
|
160
|
-
};
|
|
161
|
-
type Config = {
|
|
162
|
-
conObj: ConObj[];
|
|
163
|
-
} & Partial<{
|
|
164
|
-
sqlExpression: string;
|
|
165
|
-
showField: string[];
|
|
166
|
-
hideField: string[];
|
|
167
|
-
requiredField: string[];
|
|
168
|
-
notRequiredField: string[];
|
|
169
|
-
enabledField: string[];
|
|
170
|
-
disabledField: string[];
|
|
171
|
-
}>;
|
|
172
|
-
}
|
package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createVNode as e,mergeProps as
|
|
1
|
+
import{createVNode as e,mergeProps as o,defineComponent as l,computed as n}from"vue";import r from"../../../../../../shared/components/InputNumberSlash/InputNumberSlash.js";import{isNumber as t}from"lodash-es";import{NInputNumber as u}from"naive-ui";import"../../../../index.js";import{EDITABLE_WIDGET_TYPE as a}from"../../../constants/index.js";import{useAutoFocus as s}from"./hooks/useAutoFocus.js";import{createIhoTableClearActivedInterceptor as p,IhoTableRenderHelper as i}from"../../../utils/index.js";import{defineTablePlugin as m}from"../../../hooks/useTablePlugin.js";const d=l({name:"IhoTableInputNumber",props:{value:[String,Number]},emits:["update:value"],setup(o,{emit:l}){const r=n({get:()=>t(o.value)?o.value:o.value&&t(+o.value)?+o.value:null,set(e){l("update:value",e)}});return()=>e(u,{value:r.value,"onUpdate:value":e=>r.value=e},null)}});function c(){const l="numberRendererPlugin";return m({name:l,vxe(l){l.interceptor.add("event.clearActived",p(a.NUMBER,(e=>e.classList.contains("iho-table_numberInputSlashPopper")))),l.renderer.add(a.NUMBER,{renderCell:i.createDefaultRenderCell(),renderEdit:i.createRenderEdit((({row:l,column:n,fieldItem:t,emitFormClick:u,emitFormChangeWithParams:a})=>{var s;const{placeholder:p="请输入"}=t.componentProps||{};function i(e){const o=l[n.field];l[n.field]=e,a({oldValue:o})}const m={clearable:!0,placeholder:p,onBlur:()=>a({type:"blur",oldValue:l[n.field]}),onClick:u};return!0===t.allowSlash||"1"===t.allowSlash?e(r,o({value:l[n.field],onChange:i},m,{whiteList:t.whiteList},t.componentProps,{popperProps:{...null==(s=t.componentProps)?void 0:s.popperProps,class:"iho-table_numberInputSlashPopper"}}),null):e(d,o({value:l[n.field],"onUpdate:value":i},m,t.componentProps),null)}))})},apply(e){s(e).bindAutoFocusConfig(l,a.NUMBER,".n-input__input-el",{focusType:"class"})}})}export{c as numberRendererPlugin};
|
|
@@ -115,8 +115,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
115
115
|
labelField: string;
|
|
116
116
|
valueField: string;
|
|
117
117
|
placeholder: string;
|
|
118
|
+
shouldSave: boolean;
|
|
118
119
|
consistentMenuWidth: boolean;
|
|
119
120
|
allowCreate: boolean;
|
|
120
|
-
shouldSave: boolean;
|
|
121
121
|
}>;
|
|
122
122
|
export default _default;
|
|
@@ -131,7 +131,8 @@ export declare type LowCodeTableFieldItem = {
|
|
|
131
131
|
variableHeight: boolean | '0' | '1';
|
|
132
132
|
filterSetting: IhoTableLowCodeField.FilterSetting;
|
|
133
133
|
bindEventSetting: BindEventSettingItem[];
|
|
134
|
-
allowSlash: boolean;
|
|
134
|
+
allowSlash: boolean | string;
|
|
135
|
+
whiteList: string[];
|
|
135
136
|
}> & Partial<VxeTableDefines.ColumnInfo>;
|
|
136
137
|
export declare type IhoTableFormChangePayload = {
|
|
137
138
|
column: IhoTableFieldItem;
|