cnhis-design-vue 3.1.51-release.4 → 3.1.51-release.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components/annotation-edit/src/type.d.ts +1 -1
- package/es/components/base-search/index.d.ts +3 -0
- package/es/components/base-search/src/index.vue.d.ts +3 -0
- package/es/components/base-search/src/index.vue2.js +1 -1
- package/es/components/callback/src/components/render/popupMaps.d.ts +3 -3
- package/es/components/card-reader-sdk/src/cardReaderSDK.js +1 -1
- package/es/components/field-set/index.d.ts +33 -0
- package/es/components/field-set/src/FieldSet.vue.d.ts +33 -0
- package/es/components/field-set/src/FieldSet.vue2.js +1 -1
- package/es/components/field-set/src/components/Row.vue.d.ts +2 -1
- package/es/components/field-set/src/components/Row.vue2.js +1 -1
- package/es/components/field-set/src/types/index.d.ts +1 -0
- package/es/components/form-render/src/FormRender.vue2.js +1 -1
- package/es/components/form-render/src/components/renderer/levelSearchCascader.js +1 -1
- package/es/components/form-render/src/types/index.d.ts +1 -0
- package/es/components/iho-table/index.d.ts +3 -3
- package/es/components/iho-table/src/IhoTable.vue.d.ts +4 -3
- package/es/components/iho-table/src/IhoTable.vue2.js +1 -1
- package/es/components/iho-table/src/constants/index.d.ts +7 -6
- package/es/components/iho-table/src/hooks/useColumnConfigAdaptor.js +1 -1
- package/es/components/iho-table/src/plugins/defaultValuePlugin.d.ts +1 -0
- package/es/components/iho-table/src/plugins/defaultValuePlugin.js +1 -0
- package/es/components/iho-table/src/plugins/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/index.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/separateRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +15 -0
- package/es/components/iho-table/src/utils/index.d.ts +1 -1
- package/es/components/iho-table/src/utils/index.js +1 -1
- package/es/components/quick-search/index.d.ts +3 -0
- package/es/components/quick-search/src/index.vue.d.ts +3 -0
- package/es/components/quick-search/src/index.vue2.js +1 -1
- package/es/components/slider-tree/index.d.ts +16 -9
- package/es/components/slider-tree/src/index.vue.d.ts +16 -9
- package/es/components/slider-tree/src/index.vue2.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/es/shared/utils/index.js +1 -1
- package/package.json +2 -2
|
@@ -137,6 +137,7 @@ declare const CBaseSearch: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
137
137
|
accurateSearch?: any;
|
|
138
138
|
isAccurateSearchVal?: boolean | undefined;
|
|
139
139
|
}[]>;
|
|
140
|
+
filterChangeFnList: import("vue").Ref<any[]>;
|
|
140
141
|
showQuickSearch: import("vue").ComputedRef<boolean>;
|
|
141
142
|
showResetBtn: import("vue").ComputedRef<boolean>;
|
|
142
143
|
initOutSearchFieldList: () => void;
|
|
@@ -150,6 +151,8 @@ declare const CBaseSearch: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
150
151
|
resetFunc: (arr: import("..").ISearchType[]) => void;
|
|
151
152
|
getFilterParams: () => {};
|
|
152
153
|
setFilterParams: (params?: any) => void;
|
|
154
|
+
getOriginalConfig: () => import("..").IApiServerType[];
|
|
155
|
+
onFilterChange: (fn: any) => void;
|
|
153
156
|
RenderWidget: import("vue").DefineComponent<{
|
|
154
157
|
cfg: {
|
|
155
158
|
type: ObjectConstructor;
|
|
@@ -138,6 +138,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
138
138
|
accurateSearch?: any;
|
|
139
139
|
isAccurateSearchVal?: boolean | undefined;
|
|
140
140
|
}[]>;
|
|
141
|
+
filterChangeFnList: import("vue").Ref<any[]>;
|
|
141
142
|
showQuickSearch: import("vue").ComputedRef<boolean>;
|
|
142
143
|
showResetBtn: import("vue").ComputedRef<boolean>;
|
|
143
144
|
initOutSearchFieldList: () => void;
|
|
@@ -151,6 +152,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
151
152
|
resetFunc: (arr: ISearchType[]) => void;
|
|
152
153
|
getFilterParams: () => {};
|
|
153
154
|
setFilterParams: (params?: any) => void;
|
|
155
|
+
getOriginalConfig: () => IApiServerType[];
|
|
156
|
+
onFilterChange: (fn: any) => void;
|
|
154
157
|
RenderWidget: import("vue").DefineComponent<{
|
|
155
158
|
cfg: {
|
|
156
159
|
type: ObjectConstructor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as t,provide as a,computed as
|
|
1
|
+
import{defineComponent as e,ref as t,provide as a,computed as i,watch as l,openBlock as n,createElementBlock as r,createElementVNode as s,createCommentVNode as o,renderSlot as c,unref as u,createVNode as f,withCtx as d,createTextVNode as m,toDisplayString as h,Fragment as p,renderList as v}from"vue";import g from"../../table-filter/src/components/render-widget/index.vue.js";import b from"../../table-filter/src/hooks/useMixins.js";import y from"../../table-filter/src/hooks/useAdvanced.js";import C from"../../table-filter/src/hooks/useRenderWidget.js";import{NButton as k,NIcon as j}from"naive-ui";import{Search as A}from"@vicons/ionicons5";import{isObject as S,cloneDeep as O}from"lodash-es";import{InjectionFilterApiConfig as x,InjectionFilterSearchConfig as F}from"../../table-filter/src/constants/index.js";const q={class:"base-search-block"},R={class:"base-container"},V={class:"bease-left"},Q={class:"base-ul"},N={key:0,class:"baseli showQuickBtn"},_=s("i",{class:"iconfont-table-filter icon-table-filter-shaixuan",style:{color:"inherit","margin-right":"6px"}},null,-1),w={key:0,class:"qqConObjCount"},E={key:1,class:"baseli"},I={key:2,class:"baseli"},P=s("i",{class:"iconfont-table-filter icon-table-filter-reset",style:{"margin-right":"6px"}},null,-1);var B=e({__name:"index",props:{showSettings:{type:Object,default:()=>({hideQuickSearch:0,hideResetBtn:0})},searchFieldList:{type:Array,default:()=>[]},qqConObjCount:{type:Number,default:0},filterApiConfig:{type:Object},appendValueConfig:{type:Object,default:()=>({})}},emits:["foldQuickSearch","onFilterSearch","handleReset","getFilterParam"],setup(e,{expose:B,emit:L}){const U=e,{outQuickSearchFn:D}=b(),{isRender:W,getRenderSearchConObj:$,isExistDefValByRenderWidget:z,resetRenderWidgetValue:M}=C(),{transformData:T,transformParams:G}=y(),H=t([]),J=t(!1),K=t([]),X=t([]);a(x,U.filterApiConfig),a(F,K);const Y=i((()=>ee("hideQuickSearch"))),Z=i((()=>ee("hideResetBtn")));function ee(e){return 0==U.showSettings[e]}function te(){L("foldQuickSearch",!0)}function ae(e={}){const t=ie()||[];!function(e,t,a=!1,i={}){let l=[];K.value.length>0&&(l=O(K.value));L("onFilterSearch",e,t,a,l,i)}(t,G(t),!0,e)}function ie(){return function(e){if(!Array.isArray(e))return[];let t=[];for(let a=0;a<e.length;a++){let i=e[a];const l=$(i);l&&t.push(l)}return t.filter((e=>e.value||Object.keys(e).includes("isAccurateSearch")))}(K.value)}function le(){!function(e){if(!Array.isArray(e))return;e.forEach((e=>{M(e)})),D.handlerInitSearchItem(e)}(K.value),L("handleReset",{targetType:"outQuickSearchReset"})}return l((()=>U.searchFieldList),(e=>{e&&e.length>0&&function(){K.value=[];let e=O(T(U.searchFieldList,{_filterApiConfig:U.filterApiConfig})).filter((e=>1==e.isShowSearch&&1==e.filterExplicit));K.value=e,D.handlerInitSearchItem(K.value),K.value.some((e=>W(e)?z(e):!!e.explicitDefaultVal))}()}),{immediate:!0,deep:!0}),l((()=>U.qqConObjCount),(e=>{const t=H.value.length||0;J.value=t+Number(e)>0&&Z.value}),{immediate:!0}),l((()=>K),(()=>{H.value=ie()||[];const e=G(H.value);J.value=H.value.length+Number(U.qqConObjCount)>0&&Z.value,L("getFilterParam",H.value,e),X.value.forEach((t=>t(e)))}),{immediate:!0,deep:!0}),l((()=>U.appendValueConfig),(e=>{if(S(e)&&Object.keys(e).length>0){const t=Object.keys(e);K.value.forEach((a=>{t.includes(a.columnName)&&(a.value=e[a.columnName])}))}}),{immediate:!0,deep:!0}),B({handleReset:le,getFilterParams:function(){const e=ie()||[];return G(e)},setFilterParams:function(e){const t=e?Object.keys(e):[];t.length>0&&K.value.forEach((a=>{var i;if(W(a)&&t.includes(a.columnName)){const t=e[a.columnName];a.value=Array.isArray(t)&&!1===(null==(i=a.widgetCfg)?void 0:i.multiple)?t[0]:t}}))},getOriginalConfig:function(){return U.searchFieldList},onFilterChange:function(e){X.value.push(e)}}),(t,a)=>(n(),r("div",q,[s("div",R,[s("div",V,[s("ul",Q,[o(" 筛选分类插槽 "),c(t.$slots,"classification"),u(Y)?(n(),r("li",N,[f(u(k),{class:"search-default",type:"default",onClick:te},{default:d((()=>[_,m(" 筛选"),e.qqConObjCount?(n(),r("span",w,"("+h(e.qqConObjCount)+")",1)):o("v-if",!0)])),_:1})])):o("v-if",!0),o(" start--筛选外显--start "),(n(!0),r(p,null,v(K.value,(e=>(n(),r(p,null,[e.isRender?(n(),r("li",{class:"baseli outQuickSearch-li",key:e._frontId},[f(g,{cfg:e,modelValue:e.value,"onUpdate:modelValue":t=>e.value=t,isAccurate:e.isAccurateSearchVal,"onUpdate:isAccurate":t=>e.isAccurateSearchVal=t,onOutFilterChange:ae},null,8,["cfg","modelValue","onUpdate:modelValue","isAccurate","onUpdate:isAccurate"])])):o("v-if",!0)],64)))),256)),o(" end--筛选外显--end "),o(" 查询按钮 "),K.value&&K.value.length>0?(n(),r("li",E,[f(u(k),{type:"primary",onClick:ae},{default:d((()=>[f(u(j),{component:u(A),size:"16",style:{"margin-right":"6px"}},null,8,["component"]),m(" 查询 ")])),_:1})])):o("v-if",!0),o(" 重置按钮 "),J.value?(n(),r("li",I,[f(u(k),{onClick:le},{default:d((()=>[P,m(" 重置 ")])),_:1})])):o("v-if",!0),o(" 业务按钮插槽 "),c(t.$slots,"buttons")])])])]))}});export{B as default};
|
|
@@ -910,7 +910,7 @@ export declare const CallbackMaps: Map<string, {
|
|
|
910
910
|
default: () => never[];
|
|
911
911
|
};
|
|
912
912
|
annotation: {
|
|
913
|
-
type: import("vue").PropType<import("
|
|
913
|
+
type: import("vue").PropType<Record<string, import("../../../../annotation-edit/src/type").AnnotationItem>>;
|
|
914
914
|
};
|
|
915
915
|
}, {
|
|
916
916
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -927,7 +927,7 @@ export declare const CallbackMaps: Map<string, {
|
|
|
927
927
|
default: () => never[];
|
|
928
928
|
};
|
|
929
929
|
annotation: {
|
|
930
|
-
type: import("vue").PropType<import("
|
|
930
|
+
type: import("vue").PropType<Record<string, import("../../../../annotation-edit/src/type").AnnotationItem>>;
|
|
931
931
|
};
|
|
932
932
|
}>> & {
|
|
933
933
|
onFormChange?: ((...args: any[]) => any) | undefined;
|
|
@@ -5548,7 +5548,7 @@ export declare const CallbackMaps: Map<string, {
|
|
|
5548
5548
|
default: () => never[];
|
|
5549
5549
|
};
|
|
5550
5550
|
annotation: {
|
|
5551
|
-
type: import("vue").PropType<import("
|
|
5551
|
+
type: import("vue").PropType<Record<string, import("../../../../annotation-edit/src/type").AnnotationItem>>;
|
|
5552
5552
|
};
|
|
5553
5553
|
}>> & {
|
|
5554
5554
|
onFormChange?: ((...args: any[]) => any) | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isFunction as a}from"lodash-es";import{TRANS_CMD as t}from"./constants/index.js";import e from"./insuranceSDK.js";import{ReadHealthCard as
|
|
1
|
+
import{isFunction as a}from"lodash-es";import{TRANS_CMD as t}from"./constants/index.js";import e from"./insuranceSDK.js";import{ReadHealthCard as s}from"./utils/readHealthCard.js";let r=null;const n=class{constructor(a){if(this.options=a,this.loading=!1,this.readHealthCardDialog=new s,r)return r;r=this,this.insurance=new e}get basicParamsRes(){return a(this.options.basicParams)?this.options.basicParams():this.options.basicParams}static create(a={}){return new n(a)}static destroy(){null==r||r.destroy(),r=null}destroy(){this.insurance.destroy()}createParams(a,t){return{transcmd:a,...this.basicParamsRes,...t}}checkLoading(){if(this.loading)return Promise.reject("请勿重复操作")}async checkResCodeAndLoading(a){try{this.loading=!0;const t=await a;return 3===t.returncode||"3"===t.returncode?Promise.reject(`${t.returnmsg||"操作失败"}`):t.returndata}finally{this.loading=!1}}async readHealthCard(a,t){return await this.checkLoading(),this.readHealthCardDialog.show({instance:a,...t})}async readIdCard(a={}){await this.checkLoading();const e=this.createParams(t.ID_CARD_READ,{transtype:"IDCARD",interfaceid:"0",...a,transdata:{readtype:"2",...a.transdata}});return this.checkResCodeAndLoading(this.insurance.getInsuranceInfoPromise(e))}async readMemberCard(a={}){await this.checkLoading();const e=this.createParams(t.MEMBER_CARD_READ,{transsystem:"10",transtype:"IDCARD",interfaceid:"0",...a,transdata:{readtype:"1",...a.transdata}});return this.checkResCodeAndLoading(this.insurance.getInsuranceInfoPromise(e))}async writeMemberCard(a={}){await this.checkLoading();const e=this.createParams(t.MEMBER_CARD_WRITE,{transsystem:"10",transtype:"IDCARD",interfaceid:"0",...a,transdata:{readtype:"1",...a.transdata}});return this.checkResCodeAndLoading(this.insurance.getInsuranceInfoPromise(e))}async readInsuranceCard(a={}){var e,s;await this.checkLoading();const r=this.createParams(t.NS_GETPERSONALINFO,{transchannel:"101",interfaceid:a.interfaceid,transtype:"YB0000",transdata:{...a.transdata,iar1:{acf01:"0",iak22:"0",...null==(e=a.transdata)?void 0:e.iar1},personinfo:{location:0,ownpay:"0",...null==(s=a.transdata)?void 0:s.iar1}}});return this.checkResCodeAndLoading(this.insurance.getInsuranceInfoPromise(r))}async generalRequest(a={}){await this.checkLoading();const e=this.createParams(t.NS_GETPERSONALINFO,a);return this.checkResCodeAndLoading(this.insurance.getInsuranceInfoPromise(e))}};let i=n;i.version=1,i.TRANS_CMD=t;export{i as default};
|
|
@@ -57,6 +57,10 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
57
57
|
type: BooleanConstructor;
|
|
58
58
|
default: boolean;
|
|
59
59
|
};
|
|
60
|
+
showHeadFilter: {
|
|
61
|
+
type: BooleanConstructor;
|
|
62
|
+
default: boolean;
|
|
63
|
+
};
|
|
60
64
|
}, {
|
|
61
65
|
fieldsMapping: Record<string, string>;
|
|
62
66
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -115,6 +119,10 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
115
119
|
type: BooleanConstructor;
|
|
116
120
|
default: boolean;
|
|
117
121
|
};
|
|
122
|
+
showHeadFilter: {
|
|
123
|
+
type: BooleanConstructor;
|
|
124
|
+
default: boolean;
|
|
125
|
+
};
|
|
118
126
|
}>> & {
|
|
119
127
|
onReset?: ((...args: any[]) => any) | undefined;
|
|
120
128
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
@@ -132,6 +140,7 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
132
140
|
field: string;
|
|
133
141
|
checkedAll?: boolean | undefined;
|
|
134
142
|
disabledAll?: boolean | undefined;
|
|
143
|
+
isHeadCheckHide?: boolean | undefined;
|
|
135
144
|
isShow?: boolean | undefined;
|
|
136
145
|
}[]>;
|
|
137
146
|
fieldList: import("vue").ComputedRef<import("../../../es/shared/types").AnyObject[]>;
|
|
@@ -142,6 +151,7 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
142
151
|
field: string;
|
|
143
152
|
checkedAll?: boolean | undefined;
|
|
144
153
|
disabledAll?: boolean | undefined;
|
|
154
|
+
isHeadCheckHide?: boolean | undefined;
|
|
145
155
|
isShow?: boolean | undefined;
|
|
146
156
|
}[];
|
|
147
157
|
fieldList: import("../../../es/shared/types").AnyObject[];
|
|
@@ -388,6 +398,24 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
388
398
|
onUpdateChecked?: ((...args: any[]) => any) | undefined;
|
|
389
399
|
}>>;
|
|
390
400
|
emit: (event: "updateChecked", ...args: any[]) => void;
|
|
401
|
+
isCheckboxShow: (item: Partial<{
|
|
402
|
+
[key: string]: any;
|
|
403
|
+
id: string;
|
|
404
|
+
name: string;
|
|
405
|
+
show: boolean;
|
|
406
|
+
sort: boolean;
|
|
407
|
+
sortDirection: "NONE" | "ASC" | "DESC";
|
|
408
|
+
title: string;
|
|
409
|
+
alias: string;
|
|
410
|
+
fixedShow: boolean;
|
|
411
|
+
fixedWay: "NONE" | "LEFT" | "RIGHT";
|
|
412
|
+
columnWidth: number | null;
|
|
413
|
+
editable: boolean;
|
|
414
|
+
editableDisable: boolean;
|
|
415
|
+
required: boolean;
|
|
416
|
+
requiredDisable: boolean;
|
|
417
|
+
hide: boolean;
|
|
418
|
+
}>, key: string) => any;
|
|
391
419
|
getSortPriorityOptions: () => {
|
|
392
420
|
label: string;
|
|
393
421
|
value: number;
|
|
@@ -570,6 +598,10 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
570
598
|
type: BooleanConstructor;
|
|
571
599
|
default: boolean;
|
|
572
600
|
};
|
|
601
|
+
showHeadFilter: {
|
|
602
|
+
type: BooleanConstructor;
|
|
603
|
+
default: boolean;
|
|
604
|
+
};
|
|
573
605
|
}>> & {
|
|
574
606
|
onReset?: ((...args: any[]) => any) | undefined;
|
|
575
607
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
@@ -600,5 +632,6 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
600
632
|
customColumns: import("./src/types").FieldSetColumnItem[];
|
|
601
633
|
showSearch: boolean;
|
|
602
634
|
showSortPriority: boolean;
|
|
635
|
+
showHeadFilter: boolean;
|
|
603
636
|
}>>;
|
|
604
637
|
export default FieldSet;
|
|
@@ -59,6 +59,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
59
59
|
type: BooleanConstructor;
|
|
60
60
|
default: boolean;
|
|
61
61
|
};
|
|
62
|
+
showHeadFilter: {
|
|
63
|
+
type: BooleanConstructor;
|
|
64
|
+
default: boolean;
|
|
65
|
+
};
|
|
62
66
|
}, {
|
|
63
67
|
fieldsMapping: Record<string, string>;
|
|
64
68
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -117,6 +121,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
117
121
|
type: BooleanConstructor;
|
|
118
122
|
default: boolean;
|
|
119
123
|
};
|
|
124
|
+
showHeadFilter: {
|
|
125
|
+
type: BooleanConstructor;
|
|
126
|
+
default: boolean;
|
|
127
|
+
};
|
|
120
128
|
}>> & {
|
|
121
129
|
onReset?: ((...args: any[]) => any) | undefined;
|
|
122
130
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
@@ -134,6 +142,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
134
142
|
field: string;
|
|
135
143
|
checkedAll?: boolean | undefined;
|
|
136
144
|
disabledAll?: boolean | undefined;
|
|
145
|
+
isHeadCheckHide?: boolean | undefined;
|
|
137
146
|
isShow?: boolean | undefined;
|
|
138
147
|
}[]>;
|
|
139
148
|
fieldList: import("vue").ComputedRef<AnyObject[]>;
|
|
@@ -144,6 +153,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
144
153
|
field: string;
|
|
145
154
|
checkedAll?: boolean | undefined;
|
|
146
155
|
disabledAll?: boolean | undefined;
|
|
156
|
+
isHeadCheckHide?: boolean | undefined;
|
|
147
157
|
isShow?: boolean | undefined;
|
|
148
158
|
}[];
|
|
149
159
|
fieldList: AnyObject[];
|
|
@@ -373,6 +383,24 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
373
383
|
onUpdateChecked?: ((...args: any[]) => any) | undefined;
|
|
374
384
|
}>>;
|
|
375
385
|
emit: (event: "updateChecked", ...args: any[]) => void;
|
|
386
|
+
isCheckboxShow: (item: Partial<{
|
|
387
|
+
[key: string]: any;
|
|
388
|
+
id: string;
|
|
389
|
+
name: string;
|
|
390
|
+
show: boolean;
|
|
391
|
+
sort: boolean;
|
|
392
|
+
sortDirection: "NONE" | "ASC" | "DESC";
|
|
393
|
+
title: string;
|
|
394
|
+
alias: string;
|
|
395
|
+
fixedShow: boolean;
|
|
396
|
+
fixedWay: "NONE" | "LEFT" | "RIGHT";
|
|
397
|
+
columnWidth: number | null;
|
|
398
|
+
editable: boolean;
|
|
399
|
+
editableDisable: boolean;
|
|
400
|
+
required: boolean;
|
|
401
|
+
requiredDisable: boolean;
|
|
402
|
+
hide: boolean;
|
|
403
|
+
}>, key: string) => any;
|
|
376
404
|
getSortPriorityOptions: () => {
|
|
377
405
|
label: string;
|
|
378
406
|
value: number;
|
|
@@ -555,6 +583,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
555
583
|
type: BooleanConstructor;
|
|
556
584
|
default: boolean;
|
|
557
585
|
};
|
|
586
|
+
showHeadFilter: {
|
|
587
|
+
type: BooleanConstructor;
|
|
588
|
+
default: boolean;
|
|
589
|
+
};
|
|
558
590
|
}>> & {
|
|
559
591
|
onReset?: ((...args: any[]) => any) | undefined;
|
|
560
592
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
@@ -585,5 +617,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
585
617
|
customColumns: FieldSetColumnItem[];
|
|
586
618
|
showSearch: boolean;
|
|
587
619
|
showSortPriority: boolean;
|
|
620
|
+
showHeadFilter: boolean;
|
|
588
621
|
}>;
|
|
589
622
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as l,computed as t,reactive as i,watch as o,openBlock as d,createElementBlock as a,normalizeStyle as r,createBlock as s,unref as n,withKeys as u,withModifiers as c,createCommentVNode as f,createElementVNode as h,Fragment as p,renderList as m,withCtx as y,createTextVNode as v,toDisplayString as b,createVNode as k,mergeProps as g,renderSlot as x}from"vue";import{useThemeVars as w,NInput as
|
|
1
|
+
import{defineComponent as e,ref as l,computed as t,reactive as i,watch as o,openBlock as d,createElementBlock as a,normalizeStyle as r,createBlock as s,unref as n,withKeys as u,withModifiers as c,createCommentVNode as f,createElementVNode as h,Fragment as p,renderList as m,withCtx as y,createTextVNode as v,toDisplayString as b,createVNode as k,mergeProps as g,renderSlot as x}from"vue";import{useThemeVars as w,NInput as S,NCheckbox as A,NTooltip as _,NIcon as C,NPopconfirm as F,NButton as W}from"naive-ui";import E from"../../../shared/components/VueDraggable/src/vuedraggable.js";import H from"./components/Row.vue.js";import{isArray as P,cloneDeep as q,isString as N,omit as R}from"lodash-es";import{isDisable as j,setStyle as B,getGroupTree as I}from"./utils/index.js";import{uuidGenerator as U}from"../../../shared/utils/index.js";import{HelpCircleSharp as D}from"@vicons/ionicons5";const O={class:"c-field-set__table-header"},T=h("span",null,"数值越小,优先级越高",-1),V=["tabindex"],K={key:1,class:"c-field-set__table-footer"};var L=e({__name:"FieldSet",props:{fields:{type:Array,default:()=>[]},footerFlag:{type:Boolean,default:!0},type:{type:String,default:"old"},isEdit:{type:Boolean,default:!1},showColumnNames:{type:Array},groupSetting:{type:Object},customColumns:{type:Array,default:()=>[]},showSeq:{type:Boolean,default:!1},showSearch:{type:Boolean,default:!1},showSortPriority:{type:Boolean,default:!1},showHeadFilter:{type:Boolean,default:!1}},emits:["save","close","reset"],setup(e,{expose:L,emit:G}){const M=e,$={sid:"id",columnName:"name",isShow:"show",isSort:"sort",isFixed:"fixedWay",colWidth:"columnWidth"},z=l(w().value.primaryColor),J=l(""),Q=l(),X=l([]),Y=l([{title:"所有字段",type:"text",field:"title"},{title:"显示",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"show"},{title:"编辑",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"editable"},{title:"必填",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"required"},{title:"排序",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"sort"},{title:"加粗",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"bold"},{title:"默认排序",type:"select",field:"sortDirection"},{title:"排序优先级",type:"select",field:"sortPriority"},{title:"固定",type:"select",field:"fixedWay"},{title:"自定义标题",type:"input",field:"alias"},{title:"列宽",type:"inputNumber",field:"columnWidth"},{title:"表头筛选",type:"checkbox",isHeadCheckHide:!0,field:"isShowHeaderFilter"}]),Z=t((()=>X.value.flat())),ee=i({columns:Y,fieldList:Z,onUpdateChecked:function({checked:e,column:l}){const t=!e||ue(l.field);l.checkedAll=!t}}),le={keyword:J.value,idx:0,startIdx:0},te=()=>{G("save",{tableFields:ae()})},ie=()=>{G("close")};function oe(){X.value=de(),ne(),G("reset")}function de(){const e=q(M.fields).map((e=>({...e,uuid:U()})));return Object.keys($).forEach((l=>{e.forEach((e=>{"old"==M.type&&Reflect.has(e,l)&&("isFixed"==l?e.fixedWay=1==e[l]?"LEFT":2==e[l]?"RIGHT":"NONE":["isShow","isSort"].includes(l)&&"boolean"!=typeof l?e[$[l]]=1==e[l]:e[$[l]]=e[l],Reflect.deleteProperty(e,l)),e.columnWidth=+e.columnWidth||null,Reflect.has(e,"alias")||(e.alias=""),Reflect.has(e,"bold")||(e.bold=!1)}))})),function(e){if(M.groupSetting){return I(M.groupSetting,e).reduce(((t,i)=>{const o=N(i)?e.find((e=>e.name===i)):l(i.children);return o&&t.push(o),t}),[])}return e;function l(t){const i=[];return t.forEach((t=>{if(t.children)i.push(...l(t.children));else{const l=e.find((e=>e.name===t));l&&i.push(l)}})),i}}(e)}function ae(){let e=[];return e="old"==M.type?Z.value.map(((e,l)=>({id:e.id,field:e.name,visible:e.show,sequence:l,sortable:e.sort,title:e.alias,fixed:e.fixedWay,minWidth:e.columnWidth,bold:e.bold,sortDirection:e.sortDirection,sortPriority:e.sortPriority,...M.isEdit?{required:e.required,editable:e.editable}:{}}))):Z.value,e.map((e=>R(e,["uuid"])))}function re(){const e=le.keyword!==J.value;let l=J.value?Z.value.findIndex(((l,t)=>{var i;if(null==(i=l.title)?void 0:i.includes(J.value))return!!e||t>le.idx})):0;-1!==l||e||(l=le.startIdx),Q.value.scrollTop=52*l,Object.assign(le,{keyword:J.value,idx:l},e?{startIdx:l}:{})}function se(e){var l;return!!J.value&&(null==(l=e.title)?void 0:l.includes(J.value))}function ne(){var e,l;(null==(e=M.showColumnNames)?void 0:e.length)&&(Y.value=Y.value.filter((e=>{var l,t;return"title"===e.field||(null==(t=null==(l=M.showColumnNames)?void 0:l.includes)?void 0:t.call(l,e.field))}))),(null==(l=M.customColumns)?void 0:l.length)&&Y.value.push(...M.customColumns),M.showSeq&&Y.value.splice(1,0,{title:"排序",type:"text",field:"seq"}),Y.value.forEach((e=>{if(e.isShow=function(e){return!(["editable","required"].includes(e.field)&&!M.isEdit||"sortPriority"===e.field&&!M.showSortPriority||"isShowHeaderFilter"===e.field&&!M.showHeadFilter)}(e),"checkbox"===e.type){const l=X.value.flat().every((l=>!Reflect.has(l,e.field)));e.checkedAll=!ue(e.field)&&!l}}))}function ue(e){return X.value.flat().some((l=>!j(l,e)&&!l[e]&&"0001"!=l.id))}return o([()=>M.fields,()=>{var e;return null==(e=M.showColumnNames)?void 0:e.length}],(([e,l])=>{e.length>0&&(X.value=de(),ne())}),{immediate:!0,deep:!0}),L({getTableFields:ae}),(l,t)=>(d(),a("div",{class:"c-field-set",style:r({"--row-height":"52px","--primary-color":z.value})},[e.showSearch?(d(),s(n(S),{key:0,class:"c-field-set__search-wrapper",value:J.value,"onUpdate:value":t[0]||(t[0]=e=>J.value=e),valueModifiers:{trim:!0},placeholder:"请输入字段标题",onKeydown:u(c(re,["prevent"]),["enter"])},null,8,["value","onKeydown"])):f("v-if",!0),h("div",O,[(d(!0),a(p,null,m(Y.value,((e,l)=>(d(),a(p,{key:l},[e.isShow?(d(),a("span",{key:0,class:"table-cell",style:r(n(B)(e))},["checkbox"!==e.type||e.isHeadCheckHide?(d(),a(p,{key:1},[v(b(e.title),1)],64)):(d(),s(n(A),{key:0,checked:e.checkedAll,"onUpdate:checked":[l=>e.checkedAll=l,l=>{return t=l,i=e.field,void Z.value.forEach((e=>{j(e,i)||(e[i]=t)}));var t,i}],disabled:e.disabledAll},{default:y((()=>[v(b(e.title),1)])),_:2},1032,["checked","onUpdate:checked","disabled"])),"sortPriority"===e.field?(d(),s(n(_),{key:2,trigger:"hover"},{trigger:y((()=>[k(n(C),{component:n(D),style:{top:"2px"}},null,8,["component"])])),default:y((()=>[T])),_:1})):f("v-if",!0)],4)):f("v-if",!0)],64)))),128))]),h("div",{class:"c-field-set__table-body",ref_key:"tableBodyRef",ref:Q},[k(n(E),{modelValue:X.value,"onUpdate:modelValue":t[1]||(t[1]=e=>X.value=e),animation:"150","item-key":"id",draggable:".item"},{item:y((({element:e,index:l})=>[e.hide?f("v-if",!0):(d(),a("div",{key:0,class:"item",tabindex:l},[n(P)(e)?(d(!0),a(p,{key:0},m(e,((e,t)=>(d(),s(H,g(ee,{key:t,element:e,idx:l+1,"is-highlight":se(e)}),null,16,["element","idx","is-highlight"])))),128)):(d(),s(H,g({key:1},ee,{element:e,idx:l+1,"is-highlight":se(e)}),null,16,["element","idx","is-highlight"]))],8,V))])),_:1},8,["modelValue"])],512),e.footerFlag?(d(),a("div",K,[f(" 底部按钮插槽 "),x(l.$slots,"footer",{},(()=>[k(n(F),{onPositiveClick:oe},{trigger:y((()=>[k(n(W),{style:{"margin-right":"8px"}},{default:y((()=>[v("恢复默认设置")])),_:1})])),default:y((()=>[v(" 确认要恢复系统默认设置吗? ")])),_:1}),k(n(W),{style:{"margin-right":"8px"},onClick:ie},{default:y((()=>[v("取消")])),_:1}),k(n(W),{type:"primary",onClick:te},{default:y((()=>[v("保存")])),_:1})]))])):f("v-if",!0)],4))}});export{L as default};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
2
|
import { AnyObject } from '../../../../../es/shared/types';
|
|
3
|
-
import { FieldSetColumnItem } from '../../../../../es/components/field-set';
|
|
3
|
+
import { FieldSetItem, FieldSetColumnItem } from '../../../../../es/components/field-set';
|
|
4
4
|
import { setStyle, isDisable } from '../utils';
|
|
5
5
|
declare const _default: import("vue").DefineComponent<{
|
|
6
6
|
element: {
|
|
@@ -123,6 +123,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
123
123
|
onUpdateChecked?: ((...args: any[]) => any) | undefined;
|
|
124
124
|
}>>;
|
|
125
125
|
emit: (event: "updateChecked", ...args: any[]) => void;
|
|
126
|
+
isCheckboxShow: (item: FieldSetItem, key: string) => any;
|
|
126
127
|
getSortPriorityOptions: () => {
|
|
127
128
|
label: string;
|
|
128
129
|
value: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,openBlock as l,createElementBlock as t,Fragment as i,renderList as n,normalizeStyle as a,unref as
|
|
1
|
+
import{defineComponent as e,openBlock as l,createElementBlock as t,Fragment as i,renderList as n,normalizeStyle as a,unref as r,createBlock as o,withCtx as d,createVNode as u,createCommentVNode as s,createElementVNode as f,normalizeClass as c,toDisplayString as m,withDirectives as p,vShow as v}from"vue";import{NTooltip as y,NIcon as h,NCheckbox as b,NSelect as k,NInput as g,NInputNumber as x}from"naive-ui";import{setStyle as N,isDisable as U}from"../utils/index.js";import{ReorderTwoOutline as E}from"@vicons/ionicons5";import{range as w}from"lodash-es";const C={class:"row"},H=["title"],O=f("span",null,"拖拽调整顺序",-1);var P=e({__name:"Row",props:{element:{type:Object,default:()=>({})},columns:{type:Array,default:()=>[]},idx:{type:Number,default:1},fieldList:{type:Array,default:()=>[]},isHighlight:{type:Boolean}},emits:["updateChecked"],setup(e,{emit:P}){const S=e,D=[{label:"不固定",value:"NONE"},{label:"左固定",value:"LEFT"},{label:"右固定",value:"RIGHT"}],L=[{label:"不排序",value:"NONE"},{label:"升序",value:"ASC"},{label:"降序",value:"DESC"}];function A(e){switch(e.field){case"fixedWay":return D;case"sortDirection":return L;case"sortPriority":return function(){const e=w(1,S.fieldList.length+1).map((e=>({label:e.toString(),value:e}))),l=S.fieldList.filter((e=>!!e.sortPriority&&e.uuid!==S.element.uuid)).map((e=>e.sortPriority));return e.filter((e=>!l.includes(e.value)))}();default:return[]}}function F(e){if("sortPriority"!==e.field)return!1;const{sortDirection:l}=S.element;return!l||"NONE"===l}return(w,D)=>(l(),t("div",C,[(l(!0),t(i,null,n(e.columns,((n,w)=>{return l(),t(i,{key:w},[n.isShow?(l(),t("span",{key:0,class:"table-cell",title:e.element[n.field],style:a(r(N)(n))},["text"===n.type?(l(),t(i,{key:0},[0===w?(l(),o(r(y),{key:0,trigger:"hover"},{trigger:d((()=>[u(r(h),{style:{"margin-right":"5px",top:"2px"},component:r(E)},null,8,["component"])])),default:d((()=>[O])),_:1})):s("v-if",!0),f("span",{class:c([e.isHighlight&&"title"===n.field?"highlight":""])},m("seq"===n.field?e.idx:e.element[n.field]),3)],64)):s("v-if",!0),"checkbox"===n.type?p((l(),o(r(b),{key:1,disabled:r(U)(e.element,n.field),checked:e.element[n.field],"onUpdate:checked":[l=>e.element[n.field]=l,e=>function(e,l){P("updateChecked",{checked:e,column:l})}(e,n)]},null,8,["disabled","checked","onUpdate:checked"])),[[v,(C=e.element,D=n.field,"isShowHeaderFilter"===D?C.isConfiguredHeaderFilter&&"0001"!=S.element.id:"0001"!=S.element.id)]]):s("v-if",!0),"select"===n.type?p((l(),o(r(k),{key:2,clearable:"",disabled:F(n),value:e.element[n.field],"onUpdate:value":[l=>e.element[n.field]=l,e=>function(e,l){"sortDirection"===l.field&&"NONE"===e&&(S.element.sortPriority=null)}(e,n)],options:A(n)},null,8,["disabled","value","onUpdate:value","options"])),[[v,"fixedWay"===n.field||"0001"!=e.element.id]]):s("v-if",!0),"input"===n.type?p((l(),o(r(g),{key:3,value:e.element[n.field],"onUpdate:value":l=>e.element[n.field]=l,clearable:""},null,8,["value","onUpdate:value"])),[[v,"0001"!=e.element.id]]):s("v-if",!0),"inputNumber"===n.type?(l(),o(r(x),{key:4,value:e.element[n.field],"onUpdate:value":l=>e.element[n.field]=l},null,8,["value","onUpdate:value"])):s("v-if",!0)],12,H)):s("v-if",!0)],64);var C,D})),128))]))}});export{P as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as o,computed as t,provide as r,onMounted as s,onUnmounted as a,nextTick as i,openBlock as l,createBlock as n,unref as m,normalizeClass as d,normalizeStyle as p,withCtx as u,createElementBlock as c,createVNode as f,isRef as h,Fragment as y,renderList as g,createCommentVNode as j,createElementVNode as b,withKeys as
|
|
1
|
+
import{defineComponent as e,ref as o,computed as t,provide as r,onMounted as s,onUnmounted as a,nextTick as i,openBlock as l,createBlock as n,unref as m,normalizeClass as d,normalizeStyle as p,withCtx as u,createElementBlock as c,createVNode as f,isRef as h,Fragment as y,renderList as g,createCommentVNode as j,createElementVNode as b,withKeys as v,toDisplayString as k,renderSlot as F}from"vue";import{useTheme as C}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{isNumber as S,cloneDeep as H,isObject as x,isBoolean as A}from"lodash-es";import{createForm as L,onFormMount as O,onFieldValueChange as B,onFieldMount as R,onFieldUnmount as w,onFieldReact as _}from"@formily/core";import{Path as D}from"@formily/path";import{FormProvider as V,FormConsumer as I}from"@formily/vue";import{NForm as N,NTabs as q,NTabPane as W,NConfigProvider as E}from"naive-ui";import{InjectionFormLifeCycleCaller as K,InjectionFormGraph as T}from"./constants/index.js";import{useAutoHidden as U}from"./hooks/useAutoHidden.js";import{useComplexOptionsSpan as G}from"./hooks/useComplexOptions.js";import{useFormDomEvent as M,useFormExposeEvent as P}from"./hooks/useFormEvent.js";import{useFormGraph as J}from"./hooks/useFormGraph.js";import{useFormRenderLifeCycle as $}from"./hooks/useFormRenderLifeCycle.js";import{useLowCodeEvent as z}from"./hooks/useLowCodeEvent.js";import{useLowCodeReactions as Q}from"./hooks/useLowCodeReactions.js";import{useNuiThemeOverrides as X}from"./hooks/useNuiThemeOverrides.js";import{useOperationalForm as Y}from"./hooks/useOperationalForm.js";import{useWordbookSetting as Z}from"./hooks/useWordbookSetting.js";import"../../../shared/utils/index.js";import"@vicons/ionicons5";import"@vue/shared";import"../index.js";import{createObjSchema as ee}from"./utils/schema.js";import{useFieldListAdaptor as oe}from"./hooks/useFieldListAdaptor.js";import{useFieldVisitor as te}from"./hooks/useFieldVisitor.js";import"../../../shared/utils/tapable/SyncHook.js";import"../../../shared/utils/tapable/SyncBailHook.js";import"../../../shared/utils/tapable/SyncWaterfallHook.js";import"../../../shared/utils/tapable/SyncLoopHook.js";import"../../../shared/utils/tapable/AsyncParallelHook.js";import"../../../shared/utils/tapable/AsyncParallelBailHook.js";import"../../../shared/utils/tapable/AsyncSeriesHook.js";import"../../../shared/utils/tapable/AsyncSeriesBailHook.js";import"../../../shared/utils/tapable/AsyncSeriesLoopHook.js";import"../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js";import{validateMessageLocale as re}from"./hooks/useFormValidator.js";import{useAnchor as se}from"./hooks/useAnchor.js";import{useFormContext as ae}from"./hooks/useFormContext.js";import"./hooks/useFormRenderOptions.js";const ie={key:0,style:{height:"54px"}},le={style:{"white-space":"pre"}};var ne=e({__name:"FormRender",props:{fieldList:{type:Array},initialData:{type:Object,default:()=>({})},fieldVisitor:{type:Object},column:{type:Number,default:24},maxHeight:{type:[Number,String],default:""},anchor:{type:Boolean,default:!1},parallelism:{type:Number,default:3},businessFormatter:{type:Function},schema:{type:Object},components:{type:Object,default:()=>({})},scope:{type:Object,default:()=>({})},annotation:{type:Object},consumer:{type:Boolean,default:!1},uuid:{type:String},lifeCycle:{type:Object},requestInstance:{type:Object},enterToNextWidget:{type:[Boolean,Function],default:!0},lowCodeReactions:{type:Array},operationalForm:{type:Object},linebarAutoHidden:{type:Boolean},bordered:{type:[Boolean,String],default:!0},outBordered:{type:Boolean,default:!1},uniqueCacheData:{type:Boolean,default:!1},forceClearable:Boolean},emits:["formChange","annotationChange","scroll"],setup(e,{expose:ne,emit:me}){const de=e,pe=C(),{nuiThemeOverrides:ue}=X();re();const ce=o(),fe=t((()=>S(de.maxHeight)?de.maxHeight+"px":de.maxHeight)),{SchemaField:he,businessCollector:ye,formItemDepsCollector:ge,changeContextCollector:je,formUUID:be}=ae(de,me),{anchorBarRef:ve,currentAnchor:ke,updateAnchorList:Fe,anchorIdList:Ce,onScroll:Se}=se(de,me,ce,ge),{callLifeCycle:He}=$(de);r(K,He),He("onSetup");const{trigger:xe}=U(),{observeFormGraph:Ae,setGraph:Le,removeGraph:Oe}=J();r(T,Ae);const{lowCodeEventTrigger:Be}=z(),Re=L({initialValues:de.initialData,effects(e){const o={};O((()=>{Object.assign(o,H(e.values))})),B("*",(t=>{const r=D.getIn(o,t.path);D.setIn(o,t.path,t.value);const s=t.props.name.toString();ye.trigger(e,s),ge.trigger(s),me("formChange",{fieldInstance:t,fieldKey:s,oldValue:r,fieldName:t.title,value:t.value,context:je.getContext(s,t.value)}),Be(t),we(s),De(s),Ie(s,t.value)})),R("*",Le),w("*",Oe),de.linebarAutoHidden&&(_("*",xe),O((e=>e.query("*").forEach(xe)))),de.anchor&&_("*",Fe)}}),{lowCodeReactionsHandler:we,triggerAllReactionsHandler:_e}=Q(t((()=>de.lowCodeReactions)),Re),{operationalFormHandler:De,triggerAllOperationalFormHandler:Ve}=Y(t((()=>de.operationalForm)),Re),{wordbookSettingHandler:Ie}=Z(Re,je);s(_e),s(Ve);const{schemaAdaptor:Ne}=oe(ye);let qe=de.fieldList||[];const We=t((()=>de.schema?de.schema:de.fieldList?(qe=te().traverse(H(de.fieldList),de.fieldVisitor),ee(Ne(qe,de))):ee({}))),{onKeydown:Ee}=M({formModel:Re,formRenderRef:ce,props:de}),{clearSpan:Ke}=G();a((()=>Ke(be)));const Te=P({formModel:Re,formRenderRef:ce,formItemDepsCollector:ge,getFieldList:()=>qe,formUUID:be});return ne({formModel:Re,validate:(e="*",o={})=>Te.validate(e,o),getFormValues:(e=!0)=>Te.getFormValues(e),async setFormValues(e,o={},t=!1,r=!0){var s,a,l,n;let m=!0,d=!0;x(o)?(d=null==(s=o.needSplitExtendKey)||s,m=null==(a=o.avoidDependKeyConnection)||a,t=null!=(l=o.avoidBusinessConnection)&&l,r=null==(n=o.overwrite)||n):A(o)&&(d=o),t&&(ye.triggerLock=!0),m&&(ge.triggerDisabled=!0),Te.setFormValues(e,d,r),await i(),ye.triggerLock=!1,ge.triggerDisabled=!1},setFieldState(e,o){Te.setFieldState(e,o)},resetFields(e="*"){Te.resetFields(e)},queryWidget:async e=>Te.queryWidget(e),getFieldList:()=>qe,async reload(){console.error("reload function is abstract,it should be overwrite!")}}),(o,t)=>(l(),n(m(N),{class:d(["form-render",{"form-render--out-border":e.outBordered}]),"require-mark-placement":"left",style:p(m(pe))},{default:u((()=>[e.anchor?(l(),c("section",ie,[f(m(q),{value:m(ke),"onUpdate:value":t[0]||(t[0]=e=>h(ke)?ke.value=e:null),type:"line",ref_key:"anchorBarRef",ref:ve},{default:u((()=>[(l(!0),c(y,null,g(m(Ce),(e=>(l(),n(m(W),{name:e.name,tab:e.title,key:e.name},null,8,["name","tab"])))),128))])),_:1},8,["value"])])):j("v-if",!0),f(m(E),{"theme-overrides":m(ue)},{default:u((()=>[b("section",{class:"form-render__wrapper",style:p({"--column":e.column,"--form-height":m(fe)}),ref_key:"formRenderRef",ref:ce,onScroll:t[1]||(t[1]=(...e)=>m(Se)&&m(Se)(...e)),onKeydownCapture:t[2]||(t[2]=v(((...e)=>m(Ee)&&m(Ee)(...e)),["enter"]))},[f(m(V),{form:m(Re)},{default:u((()=>[f(m(he),{schema:m(We)},null,8,["schema"]),e.consumer?(l(),n(m(I),{key:0},{default:u((({form:e})=>[b("div",le,k(JSON.stringify(e.values,null,2)),1)])),_:1})):j("v-if",!0),F(o.$slots,"default")])),_:3},8,["form"])],36)])),_:3},8,["theme-overrides"])])),_:3},8,["class","style"]))}});export{ne as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,
|
|
1
|
+
import{defineComponent as e,computed as r,ref as t,inject as a,watch as l,createVNode as o}from"vue";import{isEqual as n,isArray as u,isEmpty as i,isString as s,isNumber as v,isFunction as d,omit as c,cloneDeep as p}from"lodash-es";import"../../../index.js";import{InjectionAsyncQueue as f}from"../../constants/index.js";import{useCommonInjection as y}from"../../hooks/useCommonInjection.js";import{formRenderLog as m}from"../../utils/index.js";import{connect as h,mapProps as k}from"@formily/vue";import g from"../../../../search-cascader/index.js";import j from"../../../../../shared/components/no-data/NoData.vue.js";import{assignUpdateValue as w}from"../../utils/schema.js";import{useFormField as _}from"../../hooks/useFormField.js";import{useFormRequest as b}from"../../hooks/useFormRequest.js";const K=h(e({name:"FormSearchCascade",props:{options:{type:Array,default:()=>[]},labelField:{type:String,default:"text"},valueField:{type:String,default:"value"},autograph:{type:String,required:!0},lazyRequest:{type:Boolean,default:!0},requestCache:{type:Boolean,default:!0},wordbook:{type:Object,required:!0},onChange:{},value:{type:[String,Array]}},emits:["update:value"],setup(e,{emit:h}){const k=r({get:()=>e.value,set(r){n(r,e.value)||h("update:value",r)}}),w=t(!1),K=t([]),{field:F,fieldKey:O}=_(),q=r((()=>{var r,t,a;return null!=(a=null==(t=null==(r=e.wordbook)?void 0:r.show_key)?void 0:t[0])?a:e.labelField})),S=r((()=>{var r,t;return null!=(t=null==(r=e.wordbook)?void 0:r.value_key)?t:e.valueField})),x=r((()=>{var r,t;return null==(t=null==(r=e.wordbook)?void 0:r.render_key)?void 0:t[0]})),C=r((()=>{var r;return(null==(r=e.wordbook)?void 0:r.level_num)||1/0})),L=a(f),{getSearchRequestInfo:P}=b(),A=t(150),I=t();async function R(r,t,a=!0){var l,o,n,f;if(A.value=t&&(null==(l=I.value)?void 0:l.getWidth())||150,u(e.value)&&!i(e.value)&&e.value.every((e=>e[S.value]))&&!r&&!t){const r=1===e.value.length,t=null==(o=K.value)?void 0:o.length,[a,l]=function(e){if(!e.length)return[];const r=[(e=p(e))[0]];let t=e[0];for(let r=1;r<e.length;r++){const a=e[r];a&&(t.children=[a],a.parent=t,t=a)}return[e,r]}(e.value),n=a[Math.max(0,a.length-2)];if(!r){K.value=l;const e=a[Math.max(0,a.length-2)];return await R(e,void 0),e}if(t)return n}try{if(r&&!r.__keyword&&r.isLeaf)return y(r);if(!(null==r?void 0:r.__keyword)){const l=await L.addAsync(function(r,a,l,o,n){const u={autograph:()=>a,wordbookId:"id",wordbookType:"type",fieldKeys:()=>r.search_key?JSON.stringify(r.search_key):void 0,conObj:()=>JSON.stringify(function(e,r,t){return r?e.conObj||[]:t?[{con:"EQ",is_compare_field:!1,field_key:e.level_key,value:t[S.value]}]:e.conObjFirstLevel||[]}(r,t,o)),primaryKey:"primary_key",levelKey:"level_key",keyword:()=>t,page:()=>1},i=Object.entries(u).reduce(((e,[t,a])=>(e[t]=s(a)?r[a]:d(a)?a():void 0,e)),{});return{...P(),params:i,key:n,cache:e.requestCache}}(e.wordbook,e.autograph,F.value,r,O.value));if(r){if(!l.length)return a?y(r):Promise.reject();r.children=l.map((e=>function(e,r,t){return{...e,parent:r,isLeaf:h(r)+1>=t}}(e,r,C.value)))}else K.value=l.map((e=>function(e,r){e.__keyword=!!r,e.isLeaf=!!r,r&&(e[q.value]=e[x.value||q.value]||e[q.value]);return e}(e,t))),t&&(null==(n=I.value)||n.setCursor(K.value[0]));return}if(!s(r.id_link))return Promise.reject();const l=r.id_link.split("_").filter((e=>e));v(C.value)&&C.value!==1/0&&l.splice(C.value);const o=await async function(r){if(!P().primaryKeyUrl)return[];try{return await L.addAsync(t(e.wordbook,e.autograph,r,O.value))}catch(e){s(e)&&m(e)}function t(r,t,a,l){const o=P();return{key:l,params:{autograph:t,tableId:r.id,primaryKeyValue:a.join(","),page:1},...o,url:o.primaryKeyUrl,cache:e.requestCache,payload:{field:F.value,labelKey:q.value,valueKey:S.value}}}}(l);if(!o)return Promise.reject();const{lastOption:u,options:c}=function(e,r){let t=e[0];return{options:r.reduce(((r,l,o)=>{const n=a(e,l);return 0===o?(t=n,[n]):(Object.assign(n,{parent:t,isLeaf:o+1>=C.value}),t.children=[n],t=n,r)}),[]),lastOption:t};function a(e,r){return e.find((e=>e[S.value]===r))}}(o,l);return c.length<C.value&&(await R(u),i(u.children))?(k.value=function(e,r){return r.map((r=>e.find((e=>e[S.value]===r))))}(o,l),w.value=!1,Promise.reject()):(K.value=c,null==(f=I.value)||f.setCursor(u),u)}catch(e){s(e)&&m(e)}function y(e){return k.value=function(e){const r=[];let t=e;for(;t;)r.unshift(c(t,["parent","isLeaf","__keyword","children"])),t=t.parent;return r}(e),w.value=!1,Promise.reject()}function h(e){let r=1,t=e.parent;for(;t;)r++,t=t.parent;return r}}function U(){A.value=150}l((()=>e.wordbook),((r,t)=>{n(r,t)||(K.value=[],r&&(k.value||!e.lazyRequest)&&R())}),{immediate:!0});const{injectValueValidate:V,injectValueBindKey:B}=y();V(k);const N=B(k);return()=>o(g,{ref:I,value:k.value,"onUpdate:value":e=>k.value=e,show:w.value,"onUpdate:show":e=>w.value=e,options:K.value,key:N.value,labelKey:q.value,valueKey:S.value,search:R,onFocus:U,menuWidth:A.value},{empty:()=>o(j,null,null)})}}),k({dataSource:"options"},w));export{K as LEVEL_SEARCH_CASCADER};
|
|
@@ -17,7 +17,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
17
17
|
default: () => never[];
|
|
18
18
|
};
|
|
19
19
|
annotation: {
|
|
20
|
-
type: import("vue").PropType<import("
|
|
20
|
+
type: import("vue").PropType<Record<string, import("../annotation-edit/src/type").AnnotationItem>>;
|
|
21
21
|
};
|
|
22
22
|
}, {
|
|
23
23
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -34,7 +34,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
34
34
|
default: () => never[];
|
|
35
35
|
};
|
|
36
36
|
annotation: {
|
|
37
|
-
type: import("vue").PropType<import("
|
|
37
|
+
type: import("vue").PropType<Record<string, import("../annotation-edit/src/type").AnnotationItem>>;
|
|
38
38
|
};
|
|
39
39
|
}>> & {
|
|
40
40
|
onFormChange?: ((...args: any[]) => any) | undefined;
|
|
@@ -4655,7 +4655,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
4655
4655
|
default: () => never[];
|
|
4656
4656
|
};
|
|
4657
4657
|
annotation: {
|
|
4658
|
-
type: import("vue").PropType<import("
|
|
4658
|
+
type: import("vue").PropType<Record<string, import("../annotation-edit/src/type").AnnotationItem>>;
|
|
4659
4659
|
};
|
|
4660
4660
|
}>> & {
|
|
4661
4661
|
onFormChange?: ((...args: any[]) => any) | undefined;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AnyObject } from '../../../../es/shared/types';
|
|
2
2
|
import { PropType } from 'vue';
|
|
3
3
|
import { VxeTableInstance } from 'vxe-table';
|
|
4
|
+
import { AnnotationItem } from '../../../../es/components/annotation-edit/src/type';
|
|
4
5
|
import { IhoTableConfig, IhoTableHandler, LowCodeTableFieldItem } from '../../../../es/components/iho-table/src/types';
|
|
5
6
|
declare const _default: import("vue").DefineComponent<{
|
|
6
7
|
tableConfig: {
|
|
@@ -16,7 +17,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
16
17
|
default: () => never[];
|
|
17
18
|
};
|
|
18
19
|
annotation: {
|
|
19
|
-
type: PropType<
|
|
20
|
+
type: PropType<Record<string, AnnotationItem>>;
|
|
20
21
|
};
|
|
21
22
|
}, {
|
|
22
23
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -33,7 +34,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
33
34
|
default: () => never[];
|
|
34
35
|
};
|
|
35
36
|
annotation: {
|
|
36
|
-
type: PropType<
|
|
37
|
+
type: PropType<Record<string, AnnotationItem>>;
|
|
37
38
|
};
|
|
38
39
|
}>> & {
|
|
39
40
|
onFormChange?: ((...args: any[]) => any) | undefined;
|
|
@@ -4654,7 +4655,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4654
4655
|
default: () => never[];
|
|
4655
4656
|
};
|
|
4656
4657
|
annotation: {
|
|
4657
|
-
type: PropType<
|
|
4658
|
+
type: PropType<Record<string, AnnotationItem>>;
|
|
4658
4659
|
};
|
|
4659
4660
|
}>> & {
|
|
4660
4661
|
onFormChange?: ((...args: any[]) => any) | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,computed as t,provide as a,ref as o,
|
|
1
|
+
import{defineComponent as e,computed as t,provide as a,ref as o,toRaw as l,watch as n,resolveComponent as r,openBlock as s,createElementBlock as i,unref as u,normalizeStyle as d,createBlock as c,resolveDynamicComponent as f,createElementVNode as v,createVNode as m,mergeProps as p,createSlots as b,renderList as g,withCtx as h,createCommentVNode as x,renderSlot as k,normalizeProps as y,guardReactiveProps as D}from"vue";import{useTheme as C}from"../../../shared/hooks/useTheme.js";import{useDebounceFn as $}from"@vueuse/core";import"date-fns";import{isString as j,isEqualWith as w,isFunction as I,pick as H}from"lodash-es";import{widthAppend as T,uuidGenerator as _}from"../../../shared/utils/index.js";import{promiseTimeout as A}from"@vueuse/shared";import{VxeTableEventNameList as L,InjectionIhoTableEmits as R,InjectionIhoTableAnnotation as S,InjectionIhoTableUUID as E,InjectionIhoTableInstance as F,InjectionIhoTableConfig as O,InjectionIhoTableFieldList as B,InjectionIhoTableHandler as W}from"./constants/index.js";import{createTableHooks as q,applyTableConfigHooks as z,applyTableFieldHooks as G,createTableEventHandlers as J,createDomInsertComponent as K,createDataTransfer as M}from"./hooks/tapHooks/index.js";import{provideIhoTableEventListener as N}from"./hooks/tapHooks/useEventHooks.js";import{eventName2EventListener as P}from"./utils/index.js";const Q=["id"];var U=e({__name:"IhoTable",props:{tableConfig:{type:Object,default:()=>({})},fieldList:{type:Array,default:()=>[]},tableData:{type:Array,default:()=>[]},annotation:{type:Object}},emits:["formChange","settingClick","formClick","keyboard","rowDrag",...L],setup(e,{expose:L,emit:U}){var V,X;const Y=e,Z=C({"--c-border-color":"#e2e2e2","--c-head-bg-color":"#f2f2f2","--c-hover-color":"#f7f7f7"}),ee=t((()=>{var e,t;const a=null!=(t=null==(e=Y.tableConfig)?void 0:e.height)?t:"100%";return{height:"auto"===a?"100%":j(a)&&(a.includes("calc")||a.endsWith("%"))?a:T(a)}})),te=N(),ae=function(e,...t){U(e,...t);const a=u(re)[P(e)];I(a)&&a(...t),te.trigger(e,...t)};a(R,ae);const oe=q();a(S,t((()=>Y.annotation)));const le=_();a(E,le);const ne=o();a(F,ne);const re=o({uuid:null!=(X=null==(V=Y.tableConfig)?void 0:V.uuid)?X:le});a(O,re);const se=$(ie,10);function ie(){re.value=z(oe,Y.tableConfig,{$table:ne,emits:ae}),re.value.uuid=le}const ue=o([]);a(B,ue);const de=$(ce,10);function ce(){const e=G(oe,Y.fieldList,re.value,{$table:ne,emits:ae});w(e,l(ue.value),((e,t)=>{if(I(e)&&I(t))return e.toString()===t.toString()}))||(ue.value=e)}const fe=M(oe,re,ne),ve=o([]);async function me(){var e,t;const a=await fe(Y.tableData),o=null==(e=ne.value)?void 0:e.getTableData().fullData;if(o){let e=0;if(!(o.some((t=>{var o;if(!(null==(o=ne.value)?void 0:o.isInsertByRow(t))){if(t!==a[e])return!0;e++}}))||e!==a.length))return}ve.value=a,null==(t=ne.value)||t.recalculate(!0)}const pe={updateTableDataRef:$(me,10),updateConfigRef:se,updateFieldListRef:de};a(W,pe);const be=J({hooks:oe,config:re,$table:ne,context:pe,emits:ae}),ge=t((()=>({...re.value,...be})));let he=!1,xe=!1,ke=!1;const ye=$((()=>{he&&ie(),xe&&ce(),ke&&me(),he=!1,xe=!1,ke=!1}),10);n((()=>Y.tableConfig),(()=>{he=!0,xe=!0,ke=!0,ye()}),{deep:!0}),n((()=>Y.fieldList),(()=>{xe=!0,ke=!0,ye()}),{deep:!0}),n([()=>[...Y.tableData],()=>{var e;return null==(e=Y.tableData)?void 0:e.length}],(()=>{ke=!0,ye()})),n([()=>Y.tableData,()=>{var e;return null==(e=Y.tableData)?void 0:e.length}],(async()=>{var e,t;(null==(e=re.value.treeConfig)?void 0:e.expandAll)&&(await A(11),null==(t=ne.value)||t.setAllTreeExpand(!0))})),ie(),ce(),me();const{header:De,footer:Ce}=K(oe);function $e(e){return H(e,["row","rowIndex","$rowIndex","column","columnIndex","$columnIndex","_columnIndex","checked","disabled","indeterminate"])}return L({$table:ne,async loadData(e){var t;null==(t=ne.value)||t.loadData(await fe(e))},setSort:(e,t)=>({field:e,value:t}),setFilter:(e,t)=>({field:e,value:t}),reload(){var e,t;null==(e=ne.value)||e.loadColumn([]),null==(t=ne.value)||t.loadData([]),ie(),ce(),me()},...oe.exposeHooks.expose.call({},re,{$table:ne,emits:ae})}),oe.setupHooks.setup.call(re,ue,{$table:ne,emits:ae}),(e,t)=>{const a=r("vxe-grid");return s(),i("section",{class:"iho-table",id:u(le),style:d(u(Z))},[(s(),c(f(u(De)))),v("section",{style:d(u(ee))},[m(a,p({ref_key:"$table",ref:ne},u(ge),{columns:ue.value,data:ve.value}),b({_:2},[g(e.$slots,((t,a)=>({name:a,fn:h((t=>[x(" 实际上所有的vxe-grid插槽都支持 "),k(e.$slots,a,y(D($e(t))))]))})))]),1040,["columns","data"])],4),(s(),c(f(u(Ce))))],12,Q)}}});export{U as default};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Nullable, UndefinedAble } from '../../../../../es/shared/types';
|
|
2
2
|
import { ComputedRef, InjectionKey, Ref } from 'vue';
|
|
3
3
|
import { VxeTableInstance } from 'vxe-table';
|
|
4
|
-
import {
|
|
4
|
+
import { AnnotationItem } from '../../../../../es/components/annotation-edit/src/type';
|
|
5
|
+
import { IhoTableConfig, IhoTableEmits, IhoTableFieldItem, IhoTableHandler } from '../../../../../es/components/iho-table';
|
|
5
6
|
import { IhoTableEventListener } from '../../../../../es/components/iho-table/src/hooks/tapHooks/useEventHooks';
|
|
6
7
|
export declare enum WIDGET_TYPE {
|
|
7
8
|
DEFAULT = "DEFAULT",
|
|
@@ -37,8 +38,8 @@ export declare enum WIDGET_TYPE {
|
|
|
37
38
|
BANK_CARD = "BANK_CARD",
|
|
38
39
|
SEQUENCE = "SEQUENCE"
|
|
39
40
|
}
|
|
40
|
-
export declare const VxeEventListenerNameList:
|
|
41
|
-
export declare const VxeTableEventNameList:
|
|
41
|
+
export declare const VxeEventListenerNameList: readonly ["onKeydownStart", "onKeydown", "onKeydownEnd", "onPaste", "onCopy", "onCut", "onCurrentChange", "onRadioChange", "onCheckboxChange", "onCheckboxAll", "onCheckboxRangeStart", "onCheckboxRangeChange", "onCheckboxRangeEnd", "onCellClick", "onCellDblclick", "onCellMenu", "onCellMouseenter", "onCellMouseleave", "onHeaderCellClick", "onHeaderCellDblclick", "onHeaderCellMenu", "onFooterCellClick", "onFooterCellDblclick", "onFooterCellMenu", "onSortChange", "onFilterChange", "onFilterVisible", "onResizableChange", "onToggleRowExpand", "onToggleTreeExpand", "onMenuClick", "onEditClosed", "onEditActived", "onEditDisabled", "onValidError", "onScroll", "onCustom", "onOpenFnr", "onFnrChange", "onFnrFind", "onFnrFindAll", "onFnrReplace", "onFnrReplaceAll", "onCellAreaCopy", "onCellAreaCut", "onCellAreaPaste", "onCellAreaMerge", "onClearCellAreaMerge", "onHeaderCellAreaSelection", "onCellAreaSelectionStart", "onCellAreaSelectionDrag", "onCellAreaSelectionEnd", "onCellAreaExtensionStart", "onCellAreaExtensionDrag", "onCellAreaExtensionEnd", "onCellAreaArrowsStart", "onCellAreaArrowsEnd", "onActiveCellChangeStart", "onActiveCellChangeEnd", "onPageChange"];
|
|
42
|
+
export declare const VxeTableEventNameList: ["toggleRowExpand", "toggleTreeExpand", "copy", "scroll", "cut", "paste", "keydown", "keydownStart", "keydownEnd", "currentChange", "radioChange", "checkboxChange", "checkboxAll", "checkboxRangeStart", "checkboxRangeChange", "checkboxRangeEnd", "cellClick", "cellDblclick", "cellMenu", "cellMouseenter", "cellMouseleave", "headerCellClick", "headerCellDblclick", "headerCellMenu", "footerCellClick", "footerCellDblclick", "footerCellMenu", "sortChange", "filterChange", "filterVisible", "resizableChange", "menuClick", "editClosed", "editActived", "editDisabled", "validError", "custom", "openFnr", "fnrChange", "fnrFind", "fnrFindAll", "fnrReplace", "fnrReplaceAll", "cellAreaCopy", "cellAreaCut", "cellAreaPaste", "cellAreaMerge", "clearCellAreaMerge", "headerCellAreaSelection", "cellAreaSelectionStart", "cellAreaSelectionDrag", "cellAreaSelectionEnd", "cellAreaExtensionStart", "cellAreaExtensionDrag", "cellAreaExtensionEnd", "cellAreaArrowsStart", "cellAreaArrowsEnd", "activeCellChangeStart", "activeCellChangeEnd", "pageChange"];
|
|
42
43
|
export declare const IhoTableRowGroupSequence: readonly ["firstRowGroup", "secondRowGroup", "thirdRowGroup", "fourthRowGroup", "fifthRowGroup", "sixthRowGroup", "seventhRowGroup", "eighthRowGroup", "ninthRowGroup", "tenthRowGroup"];
|
|
43
44
|
export declare const HIGHEST_PRIORITY: number;
|
|
44
45
|
export declare const LOWEST_PRIORITY: number;
|
|
@@ -71,11 +72,11 @@ export declare enum IHO_TABLE_FIXED_STATUS {
|
|
|
71
72
|
right = 2
|
|
72
73
|
}
|
|
73
74
|
export declare const IhoTableCustomEventNameTuple: readonly ["formChange", "settingClick", "formClick", "keyboard", "rowDrag"];
|
|
74
|
-
export declare const IhoTableEventNameTuple: readonly ["formChange", "settingClick", "formClick", "keyboard", "rowDrag",
|
|
75
|
+
export declare const IhoTableEventNameTuple: readonly ["formChange", "settingClick", "formClick", "keyboard", "rowDrag", "toggleRowExpand", "toggleTreeExpand", "copy", "scroll", "cut", "paste", "keydown", "keydownStart", "keydownEnd", "currentChange", "radioChange", "checkboxChange", "checkboxAll", "checkboxRangeStart", "checkboxRangeChange", "checkboxRangeEnd", "cellClick", "cellDblclick", "cellMenu", "cellMouseenter", "cellMouseleave", "headerCellClick", "headerCellDblclick", "headerCellMenu", "footerCellClick", "footerCellDblclick", "footerCellMenu", "sortChange", "filterChange", "filterVisible", "resizableChange", "menuClick", "editClosed", "editActived", "editDisabled", "validError", "custom", "openFnr", "fnrChange", "fnrFind", "fnrFindAll", "fnrReplace", "fnrReplaceAll", "cellAreaCopy", "cellAreaCut", "cellAreaPaste", "cellAreaMerge", "clearCellAreaMerge", "headerCellAreaSelection", "cellAreaSelectionStart", "cellAreaSelectionDrag", "cellAreaSelectionEnd", "cellAreaExtensionStart", "cellAreaExtensionDrag", "cellAreaExtensionEnd", "cellAreaArrowsStart", "cellAreaArrowsEnd", "activeCellChangeStart", "activeCellChangeEnd", "pageChange"];
|
|
75
76
|
export declare const InjectionIhoTableConfig: InjectionKey<Ref<IhoTableConfig>>;
|
|
76
77
|
export declare const InjectionIhoTableFieldList: InjectionKey<Ref<IhoTableFieldItem[]>>;
|
|
77
78
|
export declare const InjectionIhoTableEmits: InjectionKey<IhoTableEmits>;
|
|
78
|
-
export declare const InjectionIhoTableAnnotation: InjectionKey<ComputedRef<Nullable<
|
|
79
|
+
export declare const InjectionIhoTableAnnotation: InjectionKey<ComputedRef<Nullable<Record<string, AnnotationItem>>>>;
|
|
79
80
|
export declare const InjectionIhoTableUUID: InjectionKey<string>;
|
|
80
81
|
export declare const InjectionIhoTableInstance: InjectionKey<Ref<UndefinedAble<VxeTableInstance>>>;
|
|
81
82
|
export declare const InjectionIhoTableHandler: InjectionKey<IhoTableHandler>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cloneDeep as e,isString as t,isFunction as n,pick as o,isArray as a,isNumber as i}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=a(t.options)?[...t.options,n]:[n]},f=(e,n)=>{0!==e&&"0"!==e&&e&&(t(e)||i(e))&&(
|
|
1
|
+
import{cloneDeep as e,isString as t,isFunction as n,pick as o,isArray as a,isNumber as i}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=a(t.options)?[...t.options,n]:[n]},f=(e,n)=>{0!==e&&"0"!==e&&e&&(t(e)||i(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.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)),{}),...t.componentProps}}],["dateValidate",(e,t)=>{r(e)&&(t.isDateDisabled=(t,n)=>{if(!r(n))return;const{startDate:o,endDate:a}=e;let i=!1;return o&&(i=new Date(n[o]).getTime()>t),a&&(i=i||new Date(n[a]).getTime()<t),i})}],["default_val","defaultValue"],["date_format","valueFormat"],...["open","close"].map((e=>[e,d])),["is_edit",{property:"isEdit",valueMap:u}],["free_entry",(e,t,n)=>{t.componentProps={...t.componentProps,allowCreate:"1"===e||1===e,shouldSave:"1"===n.save_free_entry||1===n.save_free_entry}}],["html_type",(e,n,o)=>{var a;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!=(a=c.get(e))?a:e;const i="SEARCH"!==e&&("SEARCH_MORE"===e||("SELECT"===e?"0"===o.multi_select:null));i&&(n.componentProps={multiple:i,...n.componentProps})}],["option",{property:"options",fieldMap:new Map([["text","label"]])}],...["alias","name"].map((e=>[e,(e,t,n)=>{var o;t.title=`${null!=(o=n.alias)?o:n.name}${n.suffix?`(${n.suffix})`:""}`}]))]),v=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,v)));function E(i,l,p){if(!p)return e(i);const m={};return Object.entries(i).forEach((([e,o])=>{const a=p.get(e);return a?a!==s?t(a)?m[a]=o:n(a)?a(o,m,i,l):void(r(a)&&(a.assign?Object.assign(m,u(o,a)):m[a.property||e]=u(o,a))):void 0:m[e]=o})),m.componentProps=Object.assign({},m.componentProps,o(m,["options","isDateDisabled"])),m;function u(e,t){var o,i;return!r(t)||n(t)?e:a(e)?e.map((e=>u(e,t))):r(e)?E(e,l,t.fieldMap):null!=(i=null==(o=t.valueMap)?void 0:o.get(e))?i:e}}}(l.fieldList),editRules:p}:{fieldList:[],editRules:p}}}}export{l as useColumnConfigAdaptor};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function defaultValuePlugin(): import("../../../../../es/components/iho-table").TablePlugin;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{format as e}from"date-fns";import"../../index.js";import{EDITABLE_WIDGET_TYPE as t}from"../constants/index.js";import{getLowCodeFieldFromField as a}from"../utils/index.js";import{defineTablePlugin as n}from"../hooks/useTablePlugin.js";function o(){const o="defaultValuePlugin",l=new Map([[[t.TIME],({defaultValue:t,valueFormat:a="HH:mm"})=>"current"===t?e(Date.now(),a):t],[[t.DATE],({defaultValue:t,valueFormat:a="yyyy-MM-dd HH:mm:ss"})=>"current"===t?e(Date.now(),a):t]]);return n({name:o,apply(e){let t=[];e.fieldHooks.fieldList.tap(o,(e=>(t=e,e))),e.dataHooks.data.tap(o,(e=>{t.length&&t.forEach((t=>{var n;const o=a(t);if(null==(null==o?void 0:o.defaultValue))return;const d=null==(n=t.editRender)?void 0:n.name,[,u]=[...l.entries()].find((([e])=>e.includes(d)))||[];e[t.field]=u?u(o):o.defaultValue}))})),e.dataHooks.dataEnd.tap(o,(()=>{t=[]}))}})}export{o as defaultValuePlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"./anchorPlugin/index.js";import*as r from"./bindEventSettingPlugin/index.js";import*as i from"./defaultConfigPlugin/index.js";import*as n from"./filterDaterangeRenderPlugin/index.js";import*as
|
|
1
|
+
import*as e from"./anchorPlugin/index.js";import*as r from"./bindEventSettingPlugin/index.js";import*as i from"./defaultConfigPlugin/index.js";import*as n from"./defaultValuePlugin.js";import*as s from"./filterDaterangeRenderPlugin/index.js";import*as t from"./filterRenderPlugin/index.js";import*as d from"./filterVisibleEventPlugin.js";import*as l from"./highLightSetPlugin.js";import*as g from"./keyboardEventPlugin/index.js";import*as u from"./lowCodeFieldAdaptorPlugin/index.js";import*as o from"./maxCheckSizePlugin.js";import*as a from"./operationalFormPlugin/index.js";import*as P from"./rendererPlugins/editableWidgets/dateRendererPlugin/index.js";import*as m from"./rendererPlugins/editableWidgets/inputRendererPlugin.js";import*as x from"./rendererPlugins/editableWidgets/numberRendererPlugin.js";import*as f from"./rendererPlugins/editableWidgets/radioRendererPlugin.js";import*as p from"./rendererPlugins/editableWidgets/selectRendererPlugin/index.js";import*as j from"./rendererPlugins/editableWidgets/separateRendererPlugin/index.js";import*as R from"./rendererPlugins/editableWidgets/timeRendererPlugin/index.js";import*as b from"./rendererPlugins/widgets/checkRendererPlugin.js";import*as w from"./rendererPlugins/widgets/colorRendererPlugin.js";import*as c from"./rendererPlugins/widgets/defaultRendererPlugin.js";import*as h from"./rendererPlugins/widgets/htmlRendererPlugin.js";import*as W from"./rendererPlugins/widgets/labelRendererPlugin.js";import*as v from"./rendererPlugins/widgets/pictureRendererPlugin.js";import*as k from"./rendererPlugins/widgets/seqRendererPlugin.js";import*as C from"./rowClickPlugin/index.js";import*as S from"./rowDragPlugin/index.js";import*as E from"./rowGroupSettingPlugin/index.js";import*as D from"./varialbleHeightPlugin/index.js";import*as F from"./virtualTreePlugin/index.js";import{separateMetaModule as V}from"../../../../shared/utils/index.js";var q=V(Object.assign({"./anchorPlugin/index.tsx":e,"./bindEventSettingPlugin/index.ts":r,"./defaultConfigPlugin/index.ts":i,"./defaultValuePlugin.ts":n,"./filterDaterangeRenderPlugin/index.tsx":s,"./filterRenderPlugin/index.tsx":t,"./filterVisibleEventPlugin.ts":d,"./highLightSetPlugin.tsx":l,"./keyboardEventPlugin/index.ts":g,"./lowCodeFieldAdaptorPlugin/index.tsx":u,"./maxCheckSizePlugin.ts":o,"./operationalFormPlugin/index.ts":a,"./rendererPlugins/editableWidgets/dateRendererPlugin/index.tsx":P,"./rendererPlugins/editableWidgets/inputRendererPlugin.tsx":m,"./rendererPlugins/editableWidgets/numberRendererPlugin.tsx":x,"./rendererPlugins/editableWidgets/radioRendererPlugin.tsx":f,"./rendererPlugins/editableWidgets/selectRendererPlugin/index.tsx":p,"./rendererPlugins/editableWidgets/separateRendererPlugin/index.tsx":j,"./rendererPlugins/editableWidgets/timeRendererPlugin/index.tsx":R,"./rendererPlugins/widgets/checkRendererPlugin.tsx":b,"./rendererPlugins/widgets/colorRendererPlugin.tsx":w,"./rendererPlugins/widgets/defaultRendererPlugin.tsx":c,"./rendererPlugins/widgets/htmlRendererPlugin.tsx":h,"./rendererPlugins/widgets/labelRendererPlugin.tsx":W,"./rendererPlugins/widgets/pictureRendererPlugin.tsx":v,"./rendererPlugins/widgets/seqRendererPlugin.tsx":k,"./rowClickPlugin/index.ts":C,"./rowDragPlugin/index.ts":S,"./rowGroupSettingPlugin/index.ts":E,"./varialbleHeightPlugin/index.tsx":D,"./virtualTreePlugin/index.ts":F}));export{q as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createVNode as e,mergeProps as t}from"vue";import"../../../../../index.js";import{EDITABLE_WIDGET_TYPE as
|
|
1
|
+
import{createVNode as e,mergeProps as t}from"vue";import"../../../../../index.js";import{EDITABLE_WIDGET_TYPE as r}from"../../../../constants/index.js";import{createIhoTableClearActivedInterceptor as n,IhoTableRenderHelper as o}from"../../../../utils/index.js";import i from"./editDate.vue.js";import{defineTablePlugin as d}from"../../../../hooks/useTablePlugin.js";function a(){return d({name:"dateRendererPlugin",vxe(d){d.interceptor.add("event.clearActived",n(r.DATE,(e=>e.classList.contains("n-date-panel")))),d.renderer.add(r.DATE,{renderCell:o.createDefaultRenderCell(),renderEdit:o.createRenderEdit((({fieldItem:r,emitFormClick:n,row:o,column:d,$rowIndex:a})=>[e(i,t({value:o[d.field],"onUpdate:value":e=>o[d.field]=e,isStartDate:r.isStartDate,isEndDate:r.isEndDate,connectField:r.connectField,valueFormat:r.valueFormat},r.componentProps,{column:d,row:o,"row-index":a,onClick:n}),null)]))})}})}export{a as dateRendererPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{reactive as e,inject as o,createVNode as t,mergeProps as n,onBeforeUnmount as l}from"vue";import{arrayed as i}from"../../../../../../../shared/utils/index.js";import"../../../../../index.js";import{EDITABLE_WIDGET_TYPE as r,InjectionIhoTableUUID as s}from"../../../../constants/index.js";import{useAutoFocus as d}from"../hooks/useAutoFocus.js";import{createIhoTableClearActivedInterceptor as u,getTitle as c,IhoTableRenderHelper as a,IhoTableUtils as p}from"../../../../utils/index.js";import f from"./editSelect.js";import{getDefaultValue as m,isConnectField as v,getArray as E}from"./selectUtils.js";import{getSelectOptions as g,selectOptionsMap as w}from"../hooks/useSelectOption.js";import{cloneDeep as C,isEqual as b}from"lodash-es";import{defineTablePlugin as h}from"../../../../hooks/useTablePlugin.js";function x(){const x="selectRendererPlugin",k=e(new Map);return h({name:x,vxe(e){e.interceptor.add("event.clearActived",u(r.SELECT,(e=>e.classList.contains("iho-table__selectMenu")))),e.renderer.add(r.SELECT,{renderCell({props:e},{row:n,column:l,$table:r}){var d;const u=o(s),a=g(u,l.field,n,r),p=m(n,e,a),f=i(p).join(","),v=e&&(!0===(E=e.variableHeight)||"1"===E||(null==(d=e.componentProps)?void 0:d.indexedText));var E;return[t("span",{title:c(l,f)},[v?i(p).filter((e=>null!=e)).map(((e,o)=>[o+1,".",e,";",t("br",null,null)])):f])]},renderEdit:a.createRenderEdit((({fieldItem:e,emitFormClick:l,row:i,column:r,$rowIndex:d,$table:u})=>{const c=o(s),a=g(c,r.field,i,u);return[t(f,n({queryOptions:e.queryOptions},e.componentProps,{options:a,column:r,row:i,"row-index":d,value:i[r.field],"onUpdate:value":e=>i[r.field]=e,onClick:l}),null)]}))})},apply(e){async function o(e,o={}){var t,n,l;const i=null==(t=e.editRender)?void 0:t.props;if(!i)return[];let r=E(i.options)||E(null==(n=i.componentProps)?void 0:n.options)||[];if(i.queryOptions)try{const t={column:e,isFullData:!0,...o};r=await(null==(l=i.queryOptions)?void 0:l.call(i,t))}catch(e){console.log(`获取${i.field}_options错误`)}return r}d(e).bindAutoFocusConfig(x,r.SELECT,".n-base-selection-input"),e.fieldHooks.fieldList.tap(x,((e,{uuid:o})=>(o&&(w.get(o)||w.set(o,{}),k.set(o,C(e))),e))),e.dataHooks.data.tap(x,((e,{uuid:t},n)=>{if(!t)return;const l=k.get(t);if(!l||!l.length)return;const i=w.get(t);l.forEach((async t=>{var n;const r=null==(n=t.editRender)?void 0:n.props;if(t.field&&r&&"SELECT"===p.getCellType(r)){if(null==r?void 0:r.connectField){const n=r.connectField.split(","),s=e[r.columnName];n.forEach((async n=>{const d=null==l?void 0:l.find((e=>e.field===n));if(!d)return;const u=s?`${n}__${r.columnName}-${s}`:n;i[u]||(i[u]=[],i[u]=await o(d,{row:e,connectColumn:t}))}))}i[t.field]||v(l,t.field)||(i[t.field]=[],i[t.field]=await o(t,{row:e}))}}))})),e.setupHooks.setup.tap(x,(e=>{l((()=>{var o;const t=null==(o=e.value)?void 0:o.uuid;t&&(w.delete(t),k.delete(t))}))})),e.eventHooks.onCellDblclick.tap(x,(({$table:e},o,{emits:t})=>{var n;const{column:l,row:i}=e.reactData.editStore.actived
|
|
1
|
+
import{reactive as e,inject as o,createVNode as t,mergeProps as n,onBeforeUnmount as l}from"vue";import{arrayed as i}from"../../../../../../../shared/utils/index.js";import"../../../../../index.js";import{EDITABLE_WIDGET_TYPE as r,InjectionIhoTableUUID as s}from"../../../../constants/index.js";import{useAutoFocus as d}from"../hooks/useAutoFocus.js";import{createIhoTableClearActivedInterceptor as u,getTitle as c,IhoTableRenderHelper as a,IhoTableUtils as p}from"../../../../utils/index.js";import f from"./editSelect.js";import{getDefaultValue as m,isConnectField as v,getArray as E}from"./selectUtils.js";import{getSelectOptions as g,selectOptionsMap as w}from"../hooks/useSelectOption.js";import{cloneDeep as C,isEqual as b}from"lodash-es";import{defineTablePlugin as h}from"../../../../hooks/useTablePlugin.js";function x(){const x="selectRendererPlugin",k=e(new Map);return h({name:x,vxe(e){e.interceptor.add("event.clearActived",u(r.SELECT,(e=>e.classList.contains("iho-table__selectMenu")))),e.renderer.add(r.SELECT,{renderCell({props:e},{row:n,column:l,$table:r}){var d;const u=o(s),a=g(u,l.field,n,r),p=m(n,e,a),f=i(p).join(","),v=e&&(!0===(E=e.variableHeight)||"1"===E||(null==(d=e.componentProps)?void 0:d.indexedText));var E;return[t("span",{title:c(l,f)},[v?i(p).filter((e=>null!=e)).map(((e,o)=>[o+1,".",e,";",t("br",null,null)])):f])]},renderEdit:a.createRenderEdit((({fieldItem:e,emitFormClick:l,row:i,column:r,$rowIndex:d,$table:u})=>{const c=o(s),a=g(c,r.field,i,u);return[t(f,n({queryOptions:e.queryOptions},e.componentProps,{options:a,column:r,row:i,"row-index":d,value:i[r.field],"onUpdate:value":e=>i[r.field]=e,onClick:l}),null)]}))})},apply(e){async function o(e,o={}){var t,n,l;const i=null==(t=e.editRender)?void 0:t.props;if(!i)return[];let r=E(i.options)||E(null==(n=i.componentProps)?void 0:n.options)||[];if(i.queryOptions)try{const t={column:e,isFullData:!0,...o};r=await(null==(l=i.queryOptions)?void 0:l.call(i,t))}catch(e){console.log(`获取${i.field}_options错误`)}return r}d(e).bindAutoFocusConfig(x,r.SELECT,".n-base-selection-input"),e.fieldHooks.fieldList.tap(x,((e,{uuid:o})=>(o&&(w.get(o)||w.set(o,{}),k.set(o,C(e))),e))),e.dataHooks.data.tap(x,((e,{uuid:t},n)=>{if(!t)return;const l=k.get(t);if(!l||!l.length)return;const i=w.get(t);l.forEach((async t=>{var n;const r=null==(n=t.editRender)?void 0:n.props;if(t.field&&r&&"SELECT"===p.getCellType(r)){if(null==r?void 0:r.connectField){const n=r.connectField.split(","),s=e[r.columnName];n.forEach((async n=>{const d=null==l?void 0:l.find((e=>e.field===n));if(!d)return;const u=s?`${n}__${r.columnName}-${s}`:n;i[u]||(i[u]=[],i[u]=await o(d,{row:e,connectColumn:t}))}))}i[t.field]||v(l,t.field)||(i[t.field]=[],i[t.field]=await o(t,{row:e}))}}))})),e.setupHooks.setup.tap(x,(e=>{l((()=>{var o;const t=null==(o=e.value)?void 0:o.uuid;t&&(w.delete(t),k.delete(t))}))})),e.eventHooks.onCellDblclick.tap(x,(({$table:e},o,{emits:t})=>{var n;const{column:l,row:i}=e.reactData.editStore.actived;if(!l||!i)return;const s=null==(n=l.editRender)?void 0:n.props,{cellDblclickSelectable:d=!1,multiple:u=!1,valueField:c="value"}=s.componentProps||{};if(!d||!function(e){return e&&p.getCellType(e)===r.SELECT}(s))return;const a=o.uuid&&g(o.uuid,l.field,i,e);if(1!==(null==a?void 0:a.length))return;const f=u?[a[0][c]]:a[0][c],m=i[l.field];e.clearEdit(),b(f,m)||(i[l.field]=f,t("formChange",{column:l,row:i,oldValue:m,value:f,index:e.getRowIndex(i),$table:e,option:a[0]}))}))}})}export{x as selectRendererPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{reactive as e,inject as t,createVNode as a,toRaw as o,h as r,onBeforeUnmount as n}from"vue";import{traverse as i,arrayed as
|
|
1
|
+
import{reactive as e,inject as t,createVNode as a,toRaw as o,h as r,onBeforeUnmount as n}from"vue";import{traverse as i,arrayed as u}from"../../../../../../../shared/utils/index.js";import{isFunction as l,isObject as s,isArray as d,compact as p,range as c,uniq as f,flatten as _}from"lodash-es";import{NInput as m}from"naive-ui";import"../../../../../index.js";import{EDITABLE_WIDGET_TYPE as E,InjectionIhoTableUUID as A,InjectionIhoTableHandler as h}from"../../../../constants/index.js";import{useAutoFocus as v}from"../hooks/useAutoFocus.js";import{createIhoTableClearActivedInterceptor as R,getLowCodeFieldFromField as g,IhoTableRenderHelper as T,getRowHeight as D,getColumnRenderWidth as w,parseMergeField as b}from"../../../../utils/index.js";import P from"./editSeparate.vue.js";import{contentSeparate as $,getLengthDiffArray as x,getColumnInfoMaxLength as C,generateSeparateRowData as S,isSeparateColumn as k}from"./separateUtils.js";import{getSeparateInfo as H,setSeparateInfo as j,deleteSeparateInfo as M}from"../../../../utils/separateMap.js";import{defineTablePlugin as O}from"../../../../hooks/useTablePlugin.js";function I(){const I="separateRendererPlugins",F=e(new Map);return O({name:I,vxe(e){e.interceptor.add("event.clearActived",R(E.SEPARATE,(e=>e.classList.contains("v-binder-follower-content")))),e.renderer.add(E.SEPARATE,{renderCell(e,{column:o,row:r}){var n,i;const u=t(A),l=null!=(i=null==(n=H(u,r))?void 0:n.separateData)?i:{},s=g(o),d=(null==s?void 0:s.separateFormatter)?s.separateFormatter(l[o.field]):l[o.field];return a("section",{class:"iho-table__ellipsis",title:d},[d])},renderEdit:T.createRenderEdit((({fieldItem:e,column:n,row:i,emitFormClick:u})=>{var d,p;const c=t(A),f=H(c,i),_=D(),E={};let v=null!=(p=null==(d=e.componentProps)?void 0:d.separateSlot)?p:e.separateSlot;return v&&(v=o(v),E.menu=l(v)?v:s(v)?e=>r(v,e):void 0),e.separateRowEdit?function(){if(!f)return[];if(f.ihoTableHandler=t(h),f.separateData["__"+n.field]=f.separateData["__"+n.field]||f.separateData[n.field],E.menu){const e=E.menu;return a(e,{column:n,col:n,row:i,value:f.separateData["__"+n.field],"onUpdate:value":e=>f.separateData["__"+n.field]=e},null)}return a(m,{value:f.separateData["__"+n.field],"onUpdate:value":e=>f.separateData["__"+n.field]=e},null)}():[a(P,{value:i[n.field],"onUpdate:value":e=>i[n.field]=e,"row-index":null==f?void 0:f.index,height:_,column:n,row:i,"display-content":null==(R=null==f?void 0:f.separateData)?void 0:R[n.field],onClick:u},E)];var R}))})},apply(e){function t(e){return(...t)=>{var a;return!(null==(a=t[0].row)?void 0:a.$__SEPARATE)&&(!l(e)||e(...t))}}v(e).bindAutoFocusConfig(I,E.SEPARATE,".iho-table__separateText"),e.eventHooks.onEditClosed.tap(I,(({row:e,column:t,$table:a},o,{emits:r})=>{if(!e.$__uuid)return;const n=g(t);if(!n||!n.separateRowEdit)return;const i=H(e.$__uuid,e);if(!i)return;const{separateData:u,originalData:l,ihoTableHandler:s,index:p}=i,{field:c}=t;if(u["__"+c]&&u["__"+c]!==u[c]&&d(l.$__SEPARATE_DATA)){const e=l.$__SEPARATE_DATA.map((e=>{var t;return null!=(t=e["__"+c])?t:e[c]})),o=l[c];l[c]=d(l[c])?e:e.join(""),r("formChange",{value:l[c],oldValue:o,row:l,column:t,index:p,$table:a}),null==s||s.updateTableDataRef()}})),e.fieldHooks.fieldList.tap(I,((e,{uuid:t})=>(t&&F.set(t,e.reduce(((e,t)=>(i(t,(t=>{k(t)&&(e.push(o(t)),t.showOverflow="ellipsis")})),e)),[])),e))),e.dataHooks.data.tapPromise(I,(async(e,t,{insertAfter:a,index:o,$table:r})=>{var n;if(!t.uuid)return;const i=F.get(t.uuid);if(!i||!i.length)return;const l=[];for(const t of i){if(!t.field)continue;const a=await w(t,e,o,r),i={field:t.field,column:t,data:$(b(e,t),t,a,null==(n=g(t))?void 0:n.separateDeep)};l.push(i)}function s(e){return l.find((t=>t.field===e))}l.forEach((e=>{const{column:t}=e,a=g(t);if(!a)return;if(!a.separateDeep||!a.separateBinder)return;const o=p(u(a.separateBinder).map(s));if(!o.length)return;const r=o.concat(e),n=Math.max(...r.map((e=>e.data.length)));c(n).forEach((e=>{const t=r.map((t=>({item:t.data[e],data:t.data}))),a=t.map((({item:e})=>n(e)));if(1===f(a).length)return;const o=Math.max(...a);function n(e){return d(e)?e.length:1}t.forEach((({item:t,data:a})=>{const r=n(t);r!==o&&(d(t)?t.push(...x(o,r)):a[e]=c(o).map(((e,a)=>0===a?t:"")))}))}))})),l.forEach((e=>{e.data=_(e.data)})),c(C(l)).forEach(((r,n,i)=>{var u;const s=S(l,n),d={index:o,originalData:e,separateData:s,separateIndex:n,separateLength:i.length,isOriginRow:0===n,isLastRow:n===i.length-1};if(0===n)return e.$__SEPARATE_DATA=[s],e.$__SEPARATE_ROW_CACHE=e.$__SEPARATE_ROW_CACHE||[],e.$__uuid=t.uuid,void j(t.uuid,e,d);const p=null!=(u=e.$__SEPARATE_ROW_CACHE[n-1])?u:e.$__SEPARATE_ROW_CACHE[n-1]={$__SEPARATE:!0,$__uuid:t.uuid,$__SEPARATE_INDEX:n};p.$__ORIGIN_INDEX=o,j(t.uuid,p,d),e.$__SEPARATE_DATA.push(s),a(p)}))})),e.eventHooks.onResizableChange.tap(I,(async({column:e},t,a)=>{k(e)&&a.updateTableDataRef()})),e.configHooks.editConfig.tap(I,((e={},t)=>{const a=e.beforeEditMethod;return e.beforeEditMethod=(...e)=>{var o;if(!t.uuid)return c();const r=F.get(t.uuid);if(!r||!r.length)return c();const{row:n,column:i}=e[0],u=H(t.uuid,n);if(!u)return c();const s=null==(o=i.editRender)?void 0:o.props;if(!s||s.separateRowEdit)return c();const{isOriginRow:d,isLastRow:p}=u;return("bottom"===s.separatePlacement?p:d)&&c();function c(){return!l(a)||a(...e)}},e})),e.configHooks.checkboxConfig.tap(I,((e={},a)=>(e.checkMethod=t(e.checkMethod),e.visibleMethod=t(e.visibleMethod),e))),e.setupHooks.setup.tap(I,(e=>{n((()=>{e.value.uuid&&(F.delete(e.value.uuid),M(e.value.uuid))}))}))}})}export{I as separateRendererPlugins};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createVNode as e,mergeProps as o}from"vue";import"../../../../../index.js";import{EDITABLE_WIDGET_TYPE as t}from"../../../../constants/index.js";import{useAutoFocus as r}from"../hooks/useAutoFocus.js";import{createIhoTableClearActivedInterceptor as n,IhoTableRenderHelper as i}from"../../../../utils/index.js";import d from"./editTime.vue.js";import{defineTablePlugin as l}from"../../../../hooks/useTablePlugin.js";function m(){const m="timeRendererPlugin";return l({name:m,vxe(r){r.interceptor.add("event.clearActived",n(t.TIME,(e=>e.classList.contains("n-popover")))),r.renderer.add(t.TIME,{renderCell:i.createDefaultRenderCell(),renderEdit:i.createRenderEdit((({fieldItem:t,emitFormClick:r,row:n,column:i,$rowIndex:l})=>[e(d,o({formattedValue:n[i.field],"onUpdate:formattedValue":e=>n[i.field]=e,column:i,row:n,"row-index":l},t.componentProps,{onClick:r}),null)]))})},apply(e){r(e).bindAutoFocusConfig(m,t.TIME,".n-input__input-el",{after:e=>(Reflect.set(e.editRender,"autoselect",!0),e)})}})}export{m as timeRendererPlugin};
|
|
1
|
+
import{createVNode as e,mergeProps as o}from"vue";import"../../../../../index.js";import{EDITABLE_WIDGET_TYPE as t}from"../../../../constants/index.js";import{useAutoFocus as r}from"../hooks/useAutoFocus.js";import{createIhoTableClearActivedInterceptor as n,IhoTableRenderHelper as i}from"../../../../utils/index.js";import d from"./editTime.vue.js";import{defineTablePlugin as l}from"../../../../hooks/useTablePlugin.js";function m(){const m="timeRendererPlugin";return l({name:m,vxe(r){r.interceptor.add("event.clearActived",n(t.TIME,(e=>e.classList.contains("n-popover")))),r.renderer.add(t.TIME,{renderCell:i.createDefaultRenderCell(),renderEdit:i.createRenderEdit((({fieldItem:t,emitFormClick:r,row:n,column:i,$rowIndex:l})=>[e(d,o({formattedValue:n[i.field],"onUpdate:formattedValue":e=>n[i.field]=e,column:i,row:n,"row-index":l,valueFormat:t.valueFormat},t.componentProps,{onClick:r}),null)]))})},apply(e){r(e).bindAutoFocusConfig(m,t.TIME,".n-input__input-el",{after:e=>(Reflect.set(e.editRender,"autoselect",!0),e)})}})}export{m as timeRendererPlugin};
|
|
@@ -2,6 +2,7 @@ import { AnyObject, ArrayAble, BindEventSettingItem, FormOperationalConfig, Func
|
|
|
2
2
|
import { VxeTableProps, VxeTableDefines, VxeTableInstance, VxeColumnPropTypes, VxeTablePropTypes, VxeTableConstructor } from 'vxe-table';
|
|
3
3
|
import { VxePagerEventProps } from 'vxe-table/types/pager';
|
|
4
4
|
import { VxeTableEventProps, VxeTableListeners, VxeTablePrivateMethods } from 'vxe-table/types/table';
|
|
5
|
+
import { AnnotationItem } from '../../../../../es/components/annotation-edit/src/type';
|
|
5
6
|
import { IHO_TABLE_STRING_STATUS, IhoTableEventNameTuple, IhoTableRowGroupSequence } from '../../../../../es/components/iho-table/src/constants';
|
|
6
7
|
import Sortable from 'sortablejs';
|
|
7
8
|
export * from './pluginType';
|
|
@@ -128,6 +129,13 @@ export declare type LowCodeTableFieldItem = {
|
|
|
128
129
|
separateDeep: boolean;
|
|
129
130
|
separateBinder: ArrayAble<string>;
|
|
130
131
|
separateRowEdit: boolean;
|
|
132
|
+
separatePlacement: 'bottom';
|
|
133
|
+
separateWidth: ((payload: {
|
|
134
|
+
column: VxeTableDefines.ColumnInfo;
|
|
135
|
+
row: AnyObject;
|
|
136
|
+
rowIndex: number;
|
|
137
|
+
$table: VxeTableInstance;
|
|
138
|
+
}) => number) | number;
|
|
131
139
|
/**
|
|
132
140
|
* 即将被废弃,请使用表格外层的beforeEditMethod属性
|
|
133
141
|
* @deprecated
|
|
@@ -139,6 +147,7 @@ export declare type LowCodeTableFieldItem = {
|
|
|
139
147
|
bindEventSetting: BindEventSettingItem[];
|
|
140
148
|
allowSlash: boolean | string;
|
|
141
149
|
whiteList: string[];
|
|
150
|
+
defaultValue: any;
|
|
142
151
|
}> & Partial<VxeTableDefines.ColumnInfo>;
|
|
143
152
|
export declare type IhoTableFormChangePayload = {
|
|
144
153
|
column: IhoTableFieldItem;
|
|
@@ -182,3 +191,9 @@ export declare type IhoTableSeparateInfo = {
|
|
|
182
191
|
separateLength: number;
|
|
183
192
|
ihoTableHandler?: IhoTableHandler;
|
|
184
193
|
};
|
|
194
|
+
export declare type IhoTableProps = Partial<{
|
|
195
|
+
tableConfig: IhoTableConfig;
|
|
196
|
+
fieldList: IhoTableFieldItem[];
|
|
197
|
+
tableData: AnyObject[];
|
|
198
|
+
annotation: Record<string, AnnotationItem>;
|
|
199
|
+
}>;
|
|
@@ -18,7 +18,7 @@ export declare function useUUIDMap<T>(creator: () => T, isReactive?: boolean): {
|
|
|
18
18
|
setItemFromUUID: (uuid: string, value: T) => void;
|
|
19
19
|
removeItemFromUUID: (uuid: string) => void;
|
|
20
20
|
};
|
|
21
|
-
export declare function getColumnRenderWidth(column: AnyObject, $table: MaybeRef<Nullable<VxeTableInstance>>): Promise<number>;
|
|
21
|
+
export declare function getColumnRenderWidth(column: AnyObject, row: AnyObject, rowIndex: number, $table: MaybeRef<Nullable<VxeTableInstance>>): Promise<number>;
|
|
22
22
|
export declare function useIhoTableFormEvent(payloadRef: MaybeRef<Pick<VxeGlobalRendererHandles.RenderEditParams, 'row' | 'rowIndex' | 'column' | '$table'> & {
|
|
23
23
|
$rowIndex?: number;
|
|
24
24
|
}>): {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{reactive as e,inject as
|
|
1
|
+
import{reactive as e,inject as t,unref as n,toRaw as r,createVNode as o}from"vue";import{jsonParse as i,arrayed as u,findAncestor as l}from"../../../../shared/utils/index.js";import{promiseTimeout as a}from"@vueuse/shared";import{isFunction as c,isNumber as s,isString as d,isObject as f,isArray as p}from"lodash-es";import{InjectionIhoTableConfig as m,InjectionIhoTableEmits as v,IHO_TABLE_STRING_STATUS as I,IHO_TABLE_NUMBER_STATUS as g,IHO_TABLE_TREE_TYPE as h,InjectionIhoTableUUID as E}from"../constants/index.js";import{getSeparateInfo as T}from"./separateMap.js";export{deleteSeparateInfo,getSeparateInfo,setSeparateInfo}from"./separateMap.js";function w(e){return console.warn(`[IhoTable]: ${e}`)}const C=Object.freeze({getCellType(e){var t;return((null==(t=e.settingObj)?void 0:t.attr)||e.formType||"DEFAULT").toUpperCase()}});function R(){var e,n,r;const o=t(m);return o||w("this function(getRowHeight) only can be used in setup environment"),null!=(r=null==(n=null==(e=null==o?void 0:o.value)?void 0:e.rowConfig)?void 0:n.height)?r:32}function S(e){const t=e.slice(2);return`${t[0].toLowerCase()}${t.slice(1)}`}function O(e){return`on${e[0].toUpperCase()}${e.slice(1)}`}function P(t,n=!0){const r=n?e(new Map):new Map;return{getItemFromUUID:function(e){return r.set(e,r.get(e)||t()).get(e)},setItemFromUUID:function(e,t){r.set(e,t)},removeItemFromUUID:function(e){r.delete(e)}}}async function F(e,t,r,o){return i()||await a(0),i()||function(){const t=+e.colWidth;return s(t)?t:64}();function i(){var i;const u=null==(i=n(o))?void 0:i.getColumnByField(e.field);if(!u)return;const l=$(u);return l?c(l.separateWidth)?l.separateWidth({column:u,row:t,rowIndex:r,$table:n(o)}):s(l.separateWidth)?l.separateWidth:u.renderWidth:u.renderWidth}}function A(e){const o=t(v);function i(){var t;const r=n(e);return{$table:r.$table,value:r.row[r.column.field],row:r.row,column:{...r.column,...null==(t=r.column.editRender)?void 0:t.props},index:r.rowIndex>-1?r.rowIndex:r.$rowIndex}}function u(e={}){o("formChange",{...i(),...r(e)})}function l(e={}){o("formClick",{...i(),...r(e)})}return{emitFormChange:function(){u()},emitFormClick:function(){l()},emitFormChangeWithParams:u,emitFormClickWithParams:l}}function $(e){var t;return null==(t=e.editRender)?void 0:t.props}const b=Object.freeze({createDefaultRenderCell:function(){return function({props:e},{row:n,column:r}){if("bottom"!==(null==e?void 0:e.separatePlacement))return c(n[r.field]);const i=t(E),u=T(i,n);if(!u)return c(n[r.field]);const{originalData:l=n,isLastRow:a}=u;return c(a?l[r.field]:null);function c(e){return[o("span",{title:_(r,e)},[e])]}}},createRenderEdit:function(e){return function({props:t},n){return e({...n,fieldItem:t||{},...A(n)})}},isEditableColumn(e,t){var n;return!1!==(null==(n=e.editConfig)?void 0:n.showIcon)&&t.editRender&&!1!==t.editRender.enabled},hasFilter(e){if(y(e))return!0;let t=e.fieldSetting;return d(t)&&(t=i(t||"")),f(t)&&((n=t).notParticipatingSearch!==I.POSITIVE&&"manual"===(null==(r=n.mapping)?void 0:r.type));var n,r},hasDateFiler(e){var t;return null==(t=null==e?void 0:e.filterSetting)?void 0:t.daterange}}),x=Object.freeze({isPositive:e=>e===g.POSITIVE||e===I.POSITIVE,isNegative:e=>e===g.NEGATIVE||e===I.NEGATIVE,notPositive:e=>e!==g.POSITIVE&&e!==I.POSITIVE,notNegative:e=>e!==g.NEGATIVE&&e!==I.NEGATIVE}),N=(e,t)=>({$event:n,column:r})=>{var o;if(!u(e).includes(null==(o=r.editRender)?void 0:o.name))return!0;const i=null==n?void 0:n.target;return!f(i)||!l(i,t)};function V(e){return[h.TRANSFORM_WITH_SPAN_METHOD,h.TRANSFORM_TREE_TYPE].includes(`${e.isTree}`)}function W(e){return d(e)&&!!e.match(/^###\{[^{}]+}$/)}function D(e){try{return JSON.parse(e.replace(/^###/,""))}catch(e){return{}}}function U(e,t){if(e.$__SEPARATE||!t.editRender||!t.editRender.props)return e[t.field];const{fieldSetting:n}=t.editRender.props;if(!d(n))return e[t.field];const{mergedFeildExpression:r}=i(n);return r&&d(r)?r.replace(/#{(.+?)}/g,(function(t,n){let r=n?e[n.trim()]:null;W(r)&&(r=D(r).change_text);return r||(null==r?"--":r)})):e[t.field]}const j=["SEARCH","SELECT","RADIO","CHECKBOX"];function y(e){return e.notParticipatingSearch===g.NEGATIVE&&j.includes(C.getCellType(e))&&p(e.options)&&e.options.length}function _(e,t=""){return"tooltip"===e.showOverflow?"":t}export{b as IhoTableRenderHelper,x as IhoTableStatusHelper,C as IhoTableUtils,w as IhoTableWarn,N as createIhoTableClearActivedInterceptor,S as eventListener2EventName,O as eventName2EventListener,F as getColumnRenderWidth,$ as getLowCodeFieldFromField,R as getRowHeight,_ as getTitle,y as isCompatibleColumn,W as isRichContent,V as isTransformTreeType,U as parseMergeField,D as parseRichContent,A as useIhoTableFormEvent,P as useUUIDMap};
|
|
@@ -135,6 +135,7 @@ declare const CQuickSearch: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
135
135
|
}[]>;
|
|
136
136
|
showAdd: import("vue").Ref<boolean>;
|
|
137
137
|
addVal: import("vue").Ref<string>;
|
|
138
|
+
filterChangeFnList: import("vue").Ref<any[]>;
|
|
138
139
|
parentNamesHasAdd: import("vue").ComputedRef<boolean>;
|
|
139
140
|
handleName: import("vue").ComputedRef<(item: import("..").ISearchType, key?: string) => any>;
|
|
140
141
|
init: () => void;
|
|
@@ -186,6 +187,8 @@ declare const CQuickSearch: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
186
187
|
setDefaultCon: (widgetArr: import("..").ISearchParamsType[]) => void;
|
|
187
188
|
getFilterParams: () => {};
|
|
188
189
|
setFilterParams: (params?: any) => void;
|
|
190
|
+
getOriginalConfig: () => import("..").IApiServerType[];
|
|
191
|
+
onFilterChange: (fn: any) => void;
|
|
189
192
|
NForm: any;
|
|
190
193
|
NFormItem: import("vue").DefineComponent<{
|
|
191
194
|
readonly label: StringConstructor;
|
|
@@ -137,6 +137,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
137
137
|
}[]>;
|
|
138
138
|
showAdd: import("vue").Ref<boolean>;
|
|
139
139
|
addVal: import("vue").Ref<string>;
|
|
140
|
+
filterChangeFnList: import("vue").Ref<any[]>;
|
|
140
141
|
parentNamesHasAdd: import("vue").ComputedRef<boolean>;
|
|
141
142
|
handleName: import("vue").ComputedRef<(item: ISearchType, key?: string) => any>;
|
|
142
143
|
init: () => void;
|
|
@@ -188,6 +189,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
188
189
|
setDefaultCon: (widgetArr: ISearchParamsType[]) => void;
|
|
189
190
|
getFilterParams: () => {};
|
|
190
191
|
setFilterParams: (params?: any) => void;
|
|
192
|
+
getOriginalConfig: () => IApiServerType[];
|
|
193
|
+
onFilterChange: (fn: any) => void;
|
|
191
194
|
NForm: any;
|
|
192
195
|
NFormItem: import("vue").DefineComponent<{
|
|
193
196
|
readonly label: StringConstructor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as l,provide as t,computed as a,watch as i,onMounted as n,openBlock as o,createElementBlock as r,createElementVNode as s,Fragment as u,renderList as c,unref as d,normalizeClass as f,createCommentVNode as v,createVNode as m,withCtx as p,createTextVNode as h,toDisplayString as g,createBlock as k,withDirectives as b,vShow as y,isRef as C}from"vue";import{useMessage as S,NPopover as x,NModal as A,NCard as _,NIcon as
|
|
1
|
+
import{defineComponent as e,ref as l,provide as t,computed as a,watch as i,onMounted as n,openBlock as o,createElementBlock as r,createElementVNode as s,Fragment as u,renderList as c,unref as d,normalizeClass as f,createCommentVNode as v,createVNode as m,withCtx as p,createTextVNode as h,toDisplayString as g,createBlock as k,withDirectives as b,vShow as y,isRef as C}from"vue";import{useMessage as S,NPopover as x,NModal as A,NCard as _,NIcon as F,NButton as q,NForm as w,NFormItem as j,NInput as E}from"naive-ui";import{CloseOutline as U,AddOutline as I}from"@vicons/ionicons5";import L from"../../table-filter/src/hooks/useMixins.js";import N from"../../table-filter/src/hooks/useRenderWidget.js";import O from"../../table-filter/src/hooks/useAdvanced.js";import P from"../../table-filter/src/components/render-widget/index.vue.js";import"moment/locale/zh-cn";import{cloneDeep as R}from"lodash-es";import{InjectionFilterApiConfig as V,InjectionFilterSearchConfig as z}from"../../table-filter/src/constants/index.js";const D={class:"quick-search-block quick-search-table"},T={class:"quick-row"},B={class:"quick-item-title"},Q={class:"quick-item-col"},M={class:"svg-wrap"},W={class:"flex_right"},G={class:"class-filter-content"},J={class:"quickSearch-content"},H=s("span",{class:"label"},"父类名称:",-1),K=["onDblclick","onClick"],X={key:0,class:"s-content"};var Y=e({__name:"index",props:{searchFieldList:{type:Array,default:()=>[]},quickSearchConfig:{type:Array,default:()=>[]},tableId:{type:String,default:""},filterApiConfig:{type:Object}},emits:["getFilterParam","onFilterSearch","clearQuickSearchConfig"],setup(e,{expose:Y,emit:Z}){const $=e,ee={classname:{required:!0,message:"请输入分类名称",trigger:["input","blur"]}},le=S(),{handleGetConfigApi:te,outQuickSearchFn:ae}=L(),{getRenderSearchConObj:ie,resetRenderWidgetValue:ne,isRender:oe}=N(),{transformData:re,getCacheDef:se,transformParams:ue}=O(),ce=l(null),de=l({classname:""});let fe=l(!1),ve=l([]),me=l([]),pe=l(!1),he=l("");const ge=l([]);t(V,$.filterApiConfig),t(z,ve);let ke=a((()=>!!me.value.length&&me.value.some((e=>e.isAdd)))),be=a((()=>(e,l="name")=>e.alias||e[l]));function ye(){return function(e){if(!Array.isArray(e))return[];let l=[];for(let t=0;t<e.length;t++){let a=e[t];const i=ie(a);!l.find((e=>e.field_key===i.field_key))&&i&&l.push(i)}return l.filter((e=>e.value))}(ve.value)||[]}function Ce(){var e;null==(e=ce.value)||e.validate((e=>{var l;if(e)return;let t=ye();t.length||(t=[]);let a=null==(l=me.value.filter((e=>e.selected))[0])?void 0:l.value;!async function(e){var l;try{if(!await te(e,"requestSaveTableCondiTion",{},$.filterApiConfig))return;fe.value=!1,null==(l=ce.value)||l.restoreValidation(),de.value.classname="",me.value=[],Fe()}catch(e){console.log(e)}}({tableId:$.tableId||"",setting:JSON.stringify({displayCategory:a,name:de.value.classname,conObj:t}),conditionList:"[]"})}))}function Se(e){var l;const t=null==(l=null==e?void 0:e.target)?void 0:l.nextElementSibling;setTimeout((()=>{t&&t.focus()})),pe.value=!0}function xe(){pe.value=!1,he.value&&(me.value.forEach((e=>e.selected=!1)),me.value.push({disabled:!0,value:he.value,selected:!0,isAdd:!0}),he.value="")}function Ae(e){!function(e){me.value.splice(e,1)}(e)}function _e(){fe.value=!1}function Fe(){qe(ve.value),Z("clearQuickSearchConfig")}function qe(e){Array.isArray(e)&&(e.forEach((e=>{ne(e)})),ae.handlerInitSearchItem(ve.value))}return i((()=>$.searchFieldList),(e=>{e&&e.length>0&&function(){let e=R(re($.searchFieldList,{_filterApiConfig:$.filterApiConfig})).filter((e=>1==e.isShowSearch&&1!=e.filterExplicit))||[];ve.value=e||[],ae.handlerInitSearchItem(ve.value)}()}),{immediate:!0,deep:!0}),i((()=>ve),(()=>{const e=ye()||[],l=ue(e);Z("getFilterParam",e,l),ge.value.forEach((e=>e(l)))}),{deep:!0}),n((()=>{const e=$.quickSearchConfig;if(e&&e.length>0)return l=e,void ve.value.forEach((e=>{var t,a;if(oe(e)){const i=l.find((l=>l.field_key===e.columnName));i&&(null==(t=i.value)?void 0:t.length)>0&&(e.value=se(e,i.value),e.unit=null!=(a=i.unit)?a:"")}}));var l;qe(ve.value)})),Y({openSaveToCalss:function(){let e=ye();e&&(e.length>0?fe.value=!0:le.warning("请设置搜索条件"))},clearData:Fe,onFilterSearch:function(){let e=ye()||[];const l=ue(e);return Z("onFilterSearch",e,l,!1),ve.value},getFilterParams:function(){const e=ye()||[];return ue(e)},setFilterParams:function(e){const l=e?Object.keys(e):[];l.length>0&&ve.value.forEach((t=>{var a;if(oe(t)&&l.includes(t.columnName)){const l=e[t.columnName];t.value=Array.isArray(l)&&!1===(null==(a=t.widgetCfg)?void 0:a.multiple)?l[0]:l}}))},getOriginalConfig:function(){return $.searchFieldList},onFilterChange:function(e){ge.value.push(e)}}),(e,l)=>(o(),r("div",null,[s("div",D,[(o(!0),r(u,null,c(d(ve),(e=>(o(),r("div",{class:f(["quick-item",{"quick-block":e._isBlock}]),key:e.sid||e.columnName},[s("div",T,[v(" title "),s("div",B,[m(d(x),{trigger:"hover"},{trigger:p((()=>[h(g(d(be)(e,"title")),1)])),default:p((()=>[s("span",null,g(d(be)(e,"title")),1)])),_:2},1024)]),v(" content "),s("div",Q,[v(" 直接渲染组件 "),e.isRender?(o(),k(P,{key:0,cfg:e,modelValue:e.value,"onUpdate:modelValue":l=>e.value=l,unit:e.unit,"onUpdate:unit":l=>e.unit=l},null,8,["cfg","modelValue","onUpdate:modelValue","unit","onUpdate:unit"])):v("v-if",!0)])])],2)))),128))]),v(" 保存到分类的弹窗 "),m(d(A),{show:d(fe),maskClosable:!1,"positive-text":"确认","negative-text":"取消",onPositiveClick:Ce,onNegativeClick:_e,class:"classification-modal-block"},{default:p((()=>[m(d(_),{title:"设置筛选分类",style:{width:"520px"},bordered:!1,size:"huge",role:"dialog","aria-modal":"true"},{"header-extra":p((()=>[s("div",M,[m(d(F),{component:d(U),size:"24",onClick:_e},null,8,["component"])])])),footer:p((()=>[s("div",W,[m(d(q),{onClick:_e},{default:p((()=>[h("取消")])),_:1}),m(d(q),{type:"info",onClick:Ce},{default:p((()=>[h("确认")])),_:1})])])),default:p((()=>[s("div",G,[m(d(w),{ref_key:"formRef",ref:ce,"label-placement":"left",rules:ee,model:de.value},{default:p((()=>[m(d(j),{label:"筛选集名称",path:"classname"},{default:p((()=>[m(d(E),{value:de.value.classname,"onUpdate:value":l[0]||(l[0]=e=>de.value.classname=e),placeholder:"请输入分类名称",clearable:""},null,8,["value"])])),_:1})])),_:1},8,["model"]),s("div",J,[H,(o(!0),r(u,null,c(d(me),((e,l)=>(o(),r("div",{class:f(["edit-tag",{"edit-tag-select":e.selected&&e.disabled}]),key:l,onDblclick:l=>function(e,l){l.disabled=!1,setTimeout((()=>{var l;null==(l=e.target)||l.focus()}),0)}(l,e),onClick:t=>function(e,l){e.disabled&&(me.value.forEach(((e,t)=>{t!==l&&(e.selected=!1)})),e.selected=!e.selected)}(e,l)},[e.disabled?(o(),r("div",X,[s("span",null,g(e.value),1)])):(o(),k(d(E),{key:1,style:{width:"100px"},value:e.value,"onUpdate:value":l=>e.value=l,disabled:e.disabled,onBlur:()=>e.disabled=!0,maxLength:10},null,8,["value","onUpdate:value","disabled","onBlur"])),m(d(F),{component:d(U),class:"anticon-close",size:"20",onClick:e=>Ae(l)},null,8,["component","onClick"])],42,K)))),128)),d(ke)?v("v-if",!0):(o(),r(u,{key:0},[b(m(d(q),{dashed:"",icon:"plus",class:"ant-btn",onClick:Se},{default:p((()=>[m(d(F),{component:d(I),size:"20"},null,8,["component"]),h("添加分类 ")])),_:1},512),[[y,!d(pe)]]),b(m(d(E),{style:{width:"100px"},class:"edit-tag",value:d(he),"onUpdate:value":l[1]||(l[1]=e=>C(he)?he.value=e:he=e),valueModifiers:{trim:!0},onBlur:xe,maxLength:10},null,8,["value"]),[[y,d(pe)]])],64))])])])),_:1})])),_:1},8,["show"])]))}});export{Y as default};
|
|
@@ -10,13 +10,11 @@ declare const CSliderTree: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
10
10
|
default: () => {};
|
|
11
11
|
};
|
|
12
12
|
}, {
|
|
13
|
-
$message: import("naive-ui").MessageApi;
|
|
14
13
|
$attr: {
|
|
15
14
|
[x: string]: unknown;
|
|
16
15
|
};
|
|
17
16
|
getChildrenByOrgPartenId: (params: any, filterApiConfig: any) => Promise<any>;
|
|
18
17
|
searchEmpTreeData: (params: any, filterApiConfig: any) => Promise<any>;
|
|
19
|
-
updateDeptSort: (params: any, filterApiConfig: any) => Promise<any>;
|
|
20
18
|
getDeptList: (params: any, filterApiConfig: any) => Promise<any>;
|
|
21
19
|
isMatchFn: (node: any, keyword: string) => boolean;
|
|
22
20
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -29,24 +27,33 @@ declare const CSliderTree: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
29
27
|
default: () => {};
|
|
30
28
|
};
|
|
31
29
|
}>> & {
|
|
32
|
-
|
|
30
|
+
onSelectNode?: ((...args: any[]) => any) | undefined;
|
|
33
31
|
onSaveWidth?: ((...args: any[]) => any) | undefined;
|
|
34
32
|
}>>;
|
|
35
|
-
emit: (event: "
|
|
33
|
+
emit: (event: "selectNode" | "saveWidth", ...args: any[]) => void;
|
|
36
34
|
flexWidth: import("vue").Ref<number>;
|
|
37
35
|
searchValue: import("vue").Ref<string>;
|
|
38
36
|
treeData: import("vue").Ref<any[]>;
|
|
39
37
|
expandedKeys: import("vue").Ref<string[]>;
|
|
40
38
|
selectedKeys: import("vue").Ref<string[]>;
|
|
41
39
|
selectNode: import("vue").Ref<{}>;
|
|
42
|
-
|
|
40
|
+
treeProperty: import("vue").ComputedRef<{
|
|
41
|
+
virtualScroll: boolean;
|
|
42
|
+
selectable: boolean;
|
|
43
|
+
data: any[];
|
|
44
|
+
expandedKeys: string[];
|
|
45
|
+
selectedKeys: string[];
|
|
46
|
+
renderLabel: ({ option }: any) => any;
|
|
47
|
+
onUpdateExpandedKeys: (expandedKeyVals: string[]) => void;
|
|
48
|
+
onUpdateSelectedKeys: (selectedKeyVals: never[] | undefined, [node]: any[]) => void;
|
|
49
|
+
onLoad: (treeNode: any) => any;
|
|
50
|
+
}>;
|
|
43
51
|
handleRenderLabel: ({ option }: any) => any;
|
|
44
52
|
init: () => Promise<void>;
|
|
45
53
|
onExpand: (expandedKeyVals: string[]) => void;
|
|
46
54
|
onNodeSelect: (selectedKeyVals: never[] | undefined, [node]: any[]) => void;
|
|
47
55
|
onSearch: () => Promise<void>;
|
|
48
|
-
|
|
49
|
-
onDrop: (info: any) => Promise<void>;
|
|
56
|
+
refreshNode: (selectOrgId?: string | undefined) => Promise<void>;
|
|
50
57
|
getDeptData: (orgId: string) => Promise<any>;
|
|
51
58
|
getChildrenByOrgPartenIdFn: () => Promise<void>;
|
|
52
59
|
onLoadData: (treeNode: any) => any;
|
|
@@ -60,7 +67,7 @@ declare const CSliderTree: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
60
67
|
mounted(el: any, { value }: any): void;
|
|
61
68
|
beforeUnmount(el: any): void;
|
|
62
69
|
};
|
|
63
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
|
70
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("selectNode" | "saveWidth")[], "selectNode" | "saveWidth", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
64
71
|
sliderInitialWidth: {
|
|
65
72
|
type: NumberConstructor;
|
|
66
73
|
default: number;
|
|
@@ -70,7 +77,7 @@ declare const CSliderTree: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
70
77
|
default: () => {};
|
|
71
78
|
};
|
|
72
79
|
}>> & {
|
|
73
|
-
|
|
80
|
+
onSelectNode?: ((...args: any[]) => any) | undefined;
|
|
74
81
|
onSaveWidth?: ((...args: any[]) => any) | undefined;
|
|
75
82
|
}, {
|
|
76
83
|
sliderInitialWidth: number;
|
|
@@ -8,13 +8,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
8
8
|
default: () => {};
|
|
9
9
|
};
|
|
10
10
|
}, {
|
|
11
|
-
$message: import("naive-ui").MessageApi;
|
|
12
11
|
$attr: {
|
|
13
12
|
[x: string]: unknown;
|
|
14
13
|
};
|
|
15
14
|
getChildrenByOrgPartenId: (params: any, filterApiConfig: any) => Promise<any>;
|
|
16
15
|
searchEmpTreeData: (params: any, filterApiConfig: any) => Promise<any>;
|
|
17
|
-
updateDeptSort: (params: any, filterApiConfig: any) => Promise<any>;
|
|
18
16
|
getDeptList: (params: any, filterApiConfig: any) => Promise<any>;
|
|
19
17
|
isMatchFn: (node: any, keyword: string) => boolean;
|
|
20
18
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -27,24 +25,33 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
27
25
|
default: () => {};
|
|
28
26
|
};
|
|
29
27
|
}>> & {
|
|
30
|
-
|
|
28
|
+
onSelectNode?: ((...args: any[]) => any) | undefined;
|
|
31
29
|
onSaveWidth?: ((...args: any[]) => any) | undefined;
|
|
32
30
|
}>>;
|
|
33
|
-
emit: (event: "
|
|
31
|
+
emit: (event: "selectNode" | "saveWidth", ...args: any[]) => void;
|
|
34
32
|
flexWidth: import("vue").Ref<number>;
|
|
35
33
|
searchValue: import("vue").Ref<string>;
|
|
36
34
|
treeData: import("vue").Ref<any[]>;
|
|
37
35
|
expandedKeys: import("vue").Ref<string[]>;
|
|
38
36
|
selectedKeys: import("vue").Ref<string[]>;
|
|
39
37
|
selectNode: import("vue").Ref<{}>;
|
|
40
|
-
|
|
38
|
+
treeProperty: import("vue").ComputedRef<{
|
|
39
|
+
virtualScroll: boolean;
|
|
40
|
+
selectable: boolean;
|
|
41
|
+
data: any[];
|
|
42
|
+
expandedKeys: string[];
|
|
43
|
+
selectedKeys: string[];
|
|
44
|
+
renderLabel: ({ option }: any) => any;
|
|
45
|
+
onUpdateExpandedKeys: (expandedKeyVals: string[]) => void;
|
|
46
|
+
onUpdateSelectedKeys: (selectedKeyVals: never[] | undefined, [node]: any[]) => void;
|
|
47
|
+
onLoad: (treeNode: any) => any;
|
|
48
|
+
}>;
|
|
41
49
|
handleRenderLabel: ({ option }: any) => any;
|
|
42
50
|
init: () => Promise<void>;
|
|
43
51
|
onExpand: (expandedKeyVals: string[]) => void;
|
|
44
52
|
onNodeSelect: (selectedKeyVals: never[] | undefined, [node]: any[]) => void;
|
|
45
53
|
onSearch: () => Promise<void>;
|
|
46
|
-
|
|
47
|
-
onDrop: (info: any) => Promise<void>;
|
|
54
|
+
refreshNode: (selectOrgId?: string) => Promise<void>;
|
|
48
55
|
getDeptData: (orgId: string) => Promise<any>;
|
|
49
56
|
getChildrenByOrgPartenIdFn: () => Promise<void>;
|
|
50
57
|
onLoadData: (treeNode: any) => any;
|
|
@@ -58,7 +65,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
58
65
|
mounted(el: any, { value }: any): void;
|
|
59
66
|
beforeUnmount(el: any): void;
|
|
60
67
|
};
|
|
61
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
|
68
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("selectNode" | "saveWidth")[], "selectNode" | "saveWidth", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
62
69
|
sliderInitialWidth: {
|
|
63
70
|
type: NumberConstructor;
|
|
64
71
|
default: number;
|
|
@@ -68,7 +75,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
68
75
|
default: () => {};
|
|
69
76
|
};
|
|
70
77
|
}>> & {
|
|
71
|
-
|
|
78
|
+
onSelectNode?: ((...args: any[]) => any) | undefined;
|
|
72
79
|
onSaveWidth?: ((...args: any[]) => any) | undefined;
|
|
73
80
|
}, {
|
|
74
81
|
sliderInitialWidth: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,useAttrs as t,ref as a,onMounted as
|
|
1
|
+
import{defineComponent as e,useAttrs as t,ref as a,computed as l,onMounted as n,h as s,withDirectives as o,openBlock as r,createElementBlock as i,normalizeStyle as u,createElementVNode as c,createVNode as d,unref as v,createCommentVNode as f,renderSlot as p,createBlock as m,normalizeProps as h,mergeProps as y}from"vue";import{NInput as g,NTree as b,NEmpty as w}from"naive-ui";import{vFlexibleResize as x}from"../../../shared/directive/flexibleResize.js";import O from"./hooks/useAsyncData.js";import{traversalData as C}from"./utils/tool.js";import{useDebounceFn as S}from"@vueuse/core";const I={class:"search-groups"},L={class:"tree-wrap"},k={key:1,class:"empty-container"},N={class:"table-footer-wrap"};var A=e({__name:"index",props:{sliderInitialWidth:{type:Number,default:300},treeSearchApiConfig:{type:Object,default:()=>({})}},emits:["selectNode","saveWidth"],setup(e,{expose:A,emit:j}){const K=e,U=t(),{getChildrenByOrgPartenId:W,searchEmpTreeData:D,getDeptList:E}=O(),M=(e,t)=>{var a,l;t=null==t?void 0:t.toLowerCase();let{label:n="",abbrp:s="",abbrw:o="",key:r,filterSearch:i=[]}=e;const u=(null==(a=null==n?void 0:n.toLowerCase())?void 0:a.indexOf(t))>-1,c=(null==(l=null==r?void 0:r.toLowerCase())?void 0:l.indexOf(t))>-1,d=i.some((e=>e.toLowerCase().indexOf(t)>-1));return!!(u||c||d)},R=a(K.sliderInitialWidth),$=a(""),J=a([]),P=a([]),_=a([]),z=a({}),B=l((()=>{let e={};for(let t in U)e[t]=U[t];return{virtualScroll:!0,selectable:!0,data:J.value,expandedKeys:P.value,selectedKeys:_.value,renderLabel:F,onUpdateExpandedKeys:T,onUpdateSelectedKeys:V,onLoad:X,...e}}));function F({option:e}){const t=e.label;if(t.includes($.value.trim())){const e=t.substr(0,t.indexOf($.value.trim())),a=t.substr(t.indexOf($.value.trim())+$.value.trim().length);return s("div",[s("span",{style:{marginRight:e?"2px":"0px"}},e),s("span",{style:{color:"#2563F4"}},$.value.trim()),s("span",{style:{marginLeft:a?"2px":"0px"}},a)])}return t}function T(e){P.value=e}function V(e=[],[t]){_.value=e,j("selectNode",t),z.value=t}n((()=>{!async function(){await Q(),J.value.length>0&&(P.value=[J.value[0].key],_.value=[J.value[0].key],z.value=J.value[0],j("selectNode",JSON.parse(JSON.stringify(J.value[0]))))}()}));const q=S((async()=>{const e=$.value.trim();if(e){const{data:t,success:a}=await D({search:e},K.treeSearchApiConfig);a&&(J.value=t,P.value=function(e){const t=[];for(const a of C(e,"children")){let e=!1;for(const t of C(a.children,"children"))M(t,$.value)&&(e=!0);e&&t.push(a.key)}return t}(t))}else G()}),800);async function G(e){await Q();let t=J.value[0].orgId;e&&(t=e);const a=await H(t);if(a){const e=J.value.map((e=>e.orgId===t?a:e));J.value=e}}async function H(e){const{data:t,success:a}=await E({orgId:e},K.treeSearchApiConfig);if(a){const a=J.value.find((t=>t.orgId===e));return a.children=t,a}}async function Q(){const{success:e,data:t}=await W(null,K.treeSearchApiConfig);e&&(J.value=t)}function X(e){return new Promise((async t=>{e.isOrg&&!e.children&&(await H(e.orgId),t(!0)),t(!0)}))}function Y({distance:e}){const t=R.value+e;R.value=Math.min(Math.max(t,50),1e3)}function Z(){j("saveWidth",R.value)}return A({refreshNode:G}),(e,t)=>o((r(),i("div",{class:"left-tree-wrap",ref:"left",style:u({width:R.value+"px"})},[c("div",I,[d(v(g),{clearable:"",placeholder:"搜索关键字",value:$.value,"onUpdate:value":[t[0]||(t[0]=e=>$.value=e),v(q)]},null,8,["value","onUpdate:value"]),f(" 按钮插槽 "),p(e.$slots,"buttons")]),f(" 标签tab插槽 "),p(e.$slots,"tabs"),c("div",L,[J.value.length>0?(r(),m(v(b),h(y({key:0},v(B))),null,16)):(r(),i("div",k,[d(v(w),{description:"暂无数据"})]))]),c("div",N,[f(" 导出数据插槽 "),p(e.$slots,"output")])],4)),[[v(x),{mode:"VR",onMove:Y,onEnd:Z}]])}});export{A as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e="@cnhis-design-vue/shared",s="3.1.51-release.
|
|
1
|
+
var e="@cnhis-design-vue/shared",s="3.1.51-release.5",i="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.1.51-release.5",private:!0,main:"index.ts",peerDependencies:n,dependencies:a};export{d as default,a as dependencies,i as main,e as name,n as peerDependencies,s as version};
|
package/es/shared/utils/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getCurrentInstance as t,defineComponent as e,provide as n,createVNode as r}from"vue";import{useMemoize as o}from"@vueuse/core";import{isString as i,isObject as
|
|
1
|
+
import{getCurrentInstance as t,defineComponent as e,provide as n,createVNode as r}from"vue";import{useMemoize as o}from"@vueuse/core";import{isString as i,isObject as u,isNumber as s,isArray as c,isFunction as f}from"lodash-es";import a from"../package.json.js";export{getBindEventSettingTrigger,getOperationalFormHandler,isMatchLowCodeCondition,isMatchLowCodeConditionsWithSqlExpression}from"./business.js";function l(t,e,n="children",r){let o=!1;function i(){o=!0}!function t(e,n,r="children",u){r=x(r),e=x(e);for(let s=0;s<e.length;s++){if(n(e[s],i,u),o)return;for(let i=0;i<r.length;i++){const u=e[s][r[i]];if(Array.isArray(u)&&t(u,n,r,e[s]),o)return}}}(t,e,n,r)}function d(t,e,n=e.name,r){if(!n)throw new Error(`[CUI]: invalid component name for ${e}`);const{components:o={}}=t._context;o[n]||(!Reflect.get(t,"__cnhis_version")&&u(a)&&Reflect.set(t,"__cnhis_version",a.version),r?r():t.component(n,e))}function p(t){if(!i(t))return;const e=t.match(/[Hms:]+/);return e?e[0]:void 0}function x(t){return Array.isArray(t)?t:[t]}function m(){return`key${"xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){const e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}))}`}const h=o((function(t){if(!t)return 0;let e="";return[...t].reduce(((t,n)=>{const r=e;return e=n,/[a-z]/.test(n)?t+8.05:/[A-Z]/.test(n)?t+9.13:/\d/.test(n)?t+8.9:/[.,]/.test(n)?t+4.03:/[)(]/.test(n)?t+5.17:/[\u4e00-\u9fa5():,。]/.test(n)?t+13.95:/[-+]/.test(n)?t+7.51:/[/\\]/.test(n)?t+4.11:/%/.test(n)?t+12.68:/‰/.test(n)?t+17.75:" "===n?" "===r?t:t+4:t+6}),0)})),g=Object.seal(Object.create(null));function v(t,e){return function t(e,n){return u(e)?c(e)?e.map((e=>t(e,n))):Object.entries(e).reduce(((e,[r,o])=>(n.includes(r)||(u(o)&&!f(o)?e[r]=t(o,n):e[r]=o),e)),{}):e}(t,e)}function y(t){return Object.values(t).reduce(((t,e)=>Object.assign(t,e)),{})}function b(t,e){if(!t)return t;if(e(t))return t;let n=t.parentElement;for(;n&&!e(n);)n=n.parentElement;return n}function j(t,e="px"){if(s(t))return`${t}${e}`;if(i(t))return t.endsWith(e)?t:`${t}${e}`;throw new Error(`invalid width value ${t}, it need to be a string or number!`)}const O=o((t=>{try{return JSON.parse(t)}catch(t){return{}}}),{getKey:t=>t});function w(t,e){if(!u(t))return t;const n={...t};for(let t=0;t<e.length;t++)Reflect.deleteProperty(n,e[t]);return n}function E(e){if(!t())throw new Error(e||"can't use this hook out of setup environment")}function $(t,e=1){const[n,r,o,i,u]=t.match(/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i)||[];if(!n)return[255,255,255,e];const c=u&&parseInt(u,16)/255;return[parseInt(r,16),parseInt(o,16),parseInt(i,16),+(s(c)?c.toFixed(2):e)]}function _(t){return e({setup(e,{slots:o}){let i=(null==t?void 0:t.parent)&&Reflect.get(t.parent,"provides");const u=[];for(;i;)Object.entries(i).forEach((([t,e])=>{u.includes(t)||(u.push(t),n(t,e))})),i=Object.getPrototypeOf(i);return()=>{var t;return r("div",null,[null==(t=o.default)?void 0:t.call(o)])}}})}const S=o((function(t,e){return!(!i(e)||!i(t))&&e.split(",").some((e=>e.trim().includes(t)))}),{getKey:(...t)=>t.reduce(((t,e)=>String(t)+"_"+String(e)),"")});export{g as DMZ,x as arrayed,E as checkInSetupEnv,_ as createProviderWrapper,v as deepOmit,b as findAncestor,p as generateTimeFormat,h as getStringWidth,$ as hex2rgba,O as jsonParse,S as keywordMatcher,d as safeComponentRegister,y as separateMetaModule,w as shallowOmit,l as traverse,m as uuidGenerator,j as widthAppend};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cnhis-design-vue",
|
|
3
|
-
"version": "3.1.51-release.
|
|
3
|
+
"version": "3.1.51-release.5",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"module": "./es/components/index.js",
|
|
6
6
|
"main": "./es/components/index.js",
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"iOS 7",
|
|
64
64
|
"last 3 iOS versions"
|
|
65
65
|
],
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "c24502e85771b7f580d21c950723d88f49ef978b"
|
|
67
67
|
}
|