cnhis-design-vue 3.1.42-beta.59 → 3.1.42-beta.60
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/form-render/src/components/renderer/dist/levelSearchCascader.d.ts +77 -0
- package/es/components/form-render/src/components/renderer/dist/searchCascade.d.ts +84 -0
- package/es/components/form-render/src/components/renderer/searchCascade.d.ts +9 -0
- package/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
- package/es/components/iho-table/index.d.ts +36 -36
- package/es/components/iho-table/src/IhoTable.vue.d.ts +36 -36
- package/es/components/iho-table/src/plugins/dist/highLightSetPlugin.d.ts +3 -0
- package/es/components/iho-table/src/plugins/filterRenderPlugin/dist/index.d.ts +3 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/dist/defaultRendererPlugin.d.ts +3 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/dist/seqRendererPlugin.d.ts +3 -0
- package/es/components/iho-table/src/plugins/varialbleHeightPlugin/index.js +1 -1
- package/es/components/scale-view/src/components/formitem/dist/r-address.d.ts +36 -0
- package/es/components/scale-view/src/components/formitem/dist/r-sign.d.ts +36 -0
- package/es/components/scale-view/src/components/formitem/dist/standard-modal.d.ts +82 -0
- package/es/components/search-cascader/src/components/dist/SearchMenu.d.ts +57 -0
- package/es/components/search-cascader/src/components/dist/SearchMenu1.d.ts +57 -0
- package/es/components/search-cascader/src/constants/index.d.ts +1 -1
- package/es/components/select-person/index.d.ts +27 -2
- package/es/components/select-person/src/SelectPerson.vue.d.ts +19 -2
- package/es/components/select-person/src/SelectPerson.vue2.js +1 -1
- package/es/components/select-person/src/utils/index.js +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
export const __esModule: true;
|
|
2
|
+
export const LEVEL_SEARCH_CASCADER: vue_2.DefineComponent<{
|
|
3
|
+
options: {
|
|
4
|
+
type: ArrayConstructor;
|
|
5
|
+
default: () => never[];
|
|
6
|
+
};
|
|
7
|
+
labelField: {
|
|
8
|
+
type: StringConstructor;
|
|
9
|
+
default: string;
|
|
10
|
+
};
|
|
11
|
+
valueField: {
|
|
12
|
+
type: StringConstructor;
|
|
13
|
+
default: string;
|
|
14
|
+
};
|
|
15
|
+
autograph: {
|
|
16
|
+
type: StringConstructor;
|
|
17
|
+
required: true;
|
|
18
|
+
};
|
|
19
|
+
lazyRequest: {
|
|
20
|
+
type: BooleanConstructor;
|
|
21
|
+
default: boolean;
|
|
22
|
+
};
|
|
23
|
+
requestCache: {
|
|
24
|
+
type: BooleanConstructor;
|
|
25
|
+
default: boolean;
|
|
26
|
+
};
|
|
27
|
+
wordbook: {
|
|
28
|
+
type: ObjectConstructor;
|
|
29
|
+
required: true;
|
|
30
|
+
};
|
|
31
|
+
onChange: {};
|
|
32
|
+
value: {
|
|
33
|
+
type: (ArrayConstructor | StringConstructor)[];
|
|
34
|
+
};
|
|
35
|
+
}, () => any, any, {}, {}, vue_2.ComponentOptionsMixin, vue_2.ComponentOptionsMixin, "update:value"[], "update:value", vue_2.VNodeProps & vue_2.AllowedComponentProps & vue_2.ComponentCustomProps, Readonly<vue_2.ExtractPropTypes<{
|
|
36
|
+
options: {
|
|
37
|
+
type: ArrayConstructor;
|
|
38
|
+
default: () => never[];
|
|
39
|
+
};
|
|
40
|
+
labelField: {
|
|
41
|
+
type: StringConstructor;
|
|
42
|
+
default: string;
|
|
43
|
+
};
|
|
44
|
+
valueField: {
|
|
45
|
+
type: StringConstructor;
|
|
46
|
+
default: string;
|
|
47
|
+
};
|
|
48
|
+
autograph: {
|
|
49
|
+
type: StringConstructor;
|
|
50
|
+
required: true;
|
|
51
|
+
};
|
|
52
|
+
lazyRequest: {
|
|
53
|
+
type: BooleanConstructor;
|
|
54
|
+
default: boolean;
|
|
55
|
+
};
|
|
56
|
+
requestCache: {
|
|
57
|
+
type: BooleanConstructor;
|
|
58
|
+
default: boolean;
|
|
59
|
+
};
|
|
60
|
+
wordbook: {
|
|
61
|
+
type: ObjectConstructor;
|
|
62
|
+
required: true;
|
|
63
|
+
};
|
|
64
|
+
onChange: {};
|
|
65
|
+
value: {
|
|
66
|
+
type: (ArrayConstructor | StringConstructor)[];
|
|
67
|
+
};
|
|
68
|
+
}>> & {
|
|
69
|
+
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
70
|
+
}, {
|
|
71
|
+
options: unknown[];
|
|
72
|
+
labelField: string;
|
|
73
|
+
valueField: string;
|
|
74
|
+
lazyRequest: boolean;
|
|
75
|
+
requestCache: boolean;
|
|
76
|
+
}>;
|
|
77
|
+
import vue_2 = require("vue");
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
export const __esModule: true;
|
|
2
|
+
export const SEARCH_CASCADER: vue_2.DefineComponent<{
|
|
3
|
+
options: {
|
|
4
|
+
type: ArrayConstructor;
|
|
5
|
+
default: () => never[];
|
|
6
|
+
};
|
|
7
|
+
depth: {
|
|
8
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
9
|
+
};
|
|
10
|
+
urlConfig: {
|
|
11
|
+
type: ObjectConstructor;
|
|
12
|
+
};
|
|
13
|
+
requestCache: {
|
|
14
|
+
type: BooleanConstructor;
|
|
15
|
+
default: boolean;
|
|
16
|
+
};
|
|
17
|
+
onFocus: {
|
|
18
|
+
type: FunctionConstructor;
|
|
19
|
+
};
|
|
20
|
+
filterable: {
|
|
21
|
+
type: BooleanConstructor;
|
|
22
|
+
default: boolean;
|
|
23
|
+
};
|
|
24
|
+
checkStrategy: {
|
|
25
|
+
type: StringConstructor;
|
|
26
|
+
default: string;
|
|
27
|
+
};
|
|
28
|
+
labelField: {
|
|
29
|
+
type: StringConstructor;
|
|
30
|
+
default: string;
|
|
31
|
+
};
|
|
32
|
+
valueField: {
|
|
33
|
+
type: StringConstructor;
|
|
34
|
+
default: string;
|
|
35
|
+
};
|
|
36
|
+
onChange: {};
|
|
37
|
+
value: {};
|
|
38
|
+
}, () => any, any, {}, {}, vue_2.ComponentOptionsMixin, vue_2.ComponentOptionsMixin, "update:value"[], "update:value", vue_2.VNodeProps & vue_2.AllowedComponentProps & vue_2.ComponentCustomProps, Readonly<vue_2.ExtractPropTypes<{
|
|
39
|
+
options: {
|
|
40
|
+
type: ArrayConstructor;
|
|
41
|
+
default: () => never[];
|
|
42
|
+
};
|
|
43
|
+
depth: {
|
|
44
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
45
|
+
};
|
|
46
|
+
urlConfig: {
|
|
47
|
+
type: ObjectConstructor;
|
|
48
|
+
};
|
|
49
|
+
requestCache: {
|
|
50
|
+
type: BooleanConstructor;
|
|
51
|
+
default: boolean;
|
|
52
|
+
};
|
|
53
|
+
onFocus: {
|
|
54
|
+
type: FunctionConstructor;
|
|
55
|
+
};
|
|
56
|
+
filterable: {
|
|
57
|
+
type: BooleanConstructor;
|
|
58
|
+
default: boolean;
|
|
59
|
+
};
|
|
60
|
+
checkStrategy: {
|
|
61
|
+
type: StringConstructor;
|
|
62
|
+
default: string;
|
|
63
|
+
};
|
|
64
|
+
labelField: {
|
|
65
|
+
type: StringConstructor;
|
|
66
|
+
default: string;
|
|
67
|
+
};
|
|
68
|
+
valueField: {
|
|
69
|
+
type: StringConstructor;
|
|
70
|
+
default: string;
|
|
71
|
+
};
|
|
72
|
+
onChange: {};
|
|
73
|
+
value: {};
|
|
74
|
+
}>> & {
|
|
75
|
+
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
76
|
+
}, {
|
|
77
|
+
options: unknown[];
|
|
78
|
+
labelField: string;
|
|
79
|
+
valueField: string;
|
|
80
|
+
requestCache: boolean;
|
|
81
|
+
filterable: boolean;
|
|
82
|
+
checkStrategy: string;
|
|
83
|
+
}>;
|
|
84
|
+
import vue_2 = require("vue");
|
|
@@ -23,6 +23,10 @@ export declare const SEARCH_CASCADER: import("vue").DefineComponent<{
|
|
|
23
23
|
type: BooleanConstructor;
|
|
24
24
|
default: boolean;
|
|
25
25
|
};
|
|
26
|
+
checkStrategy: {
|
|
27
|
+
type: StringConstructor;
|
|
28
|
+
default: string;
|
|
29
|
+
};
|
|
26
30
|
labelField: {
|
|
27
31
|
type: StringConstructor;
|
|
28
32
|
default: string;
|
|
@@ -55,6 +59,10 @@ export declare const SEARCH_CASCADER: import("vue").DefineComponent<{
|
|
|
55
59
|
type: BooleanConstructor;
|
|
56
60
|
default: boolean;
|
|
57
61
|
};
|
|
62
|
+
checkStrategy: {
|
|
63
|
+
type: StringConstructor;
|
|
64
|
+
default: string;
|
|
65
|
+
};
|
|
58
66
|
labelField: {
|
|
59
67
|
type: StringConstructor;
|
|
60
68
|
default: string;
|
|
@@ -73,4 +81,5 @@ export declare const SEARCH_CASCADER: import("vue").DefineComponent<{
|
|
|
73
81
|
valueField: string;
|
|
74
82
|
requestCache: boolean;
|
|
75
83
|
filterable: boolean;
|
|
84
|
+
checkStrategy: string;
|
|
76
85
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as t,computed as a,inject as l,watch as r,createVNode as o,nextTick as n}from"vue";import{isEqual as
|
|
1
|
+
import{defineComponent as e,ref as t,computed as a,inject as l,watch as r,createVNode as o,nextTick as n}from"vue";import{isEqual as u,isArray as i,isString as s}from"lodash-es";import"../../../index.js";import{useCommonInjection as c}from"../../hooks/useCommonInjection.js";import{InjectionAsyncQueue as p,InjectionFormUUID as d}from"../../constants/index.js";import"../../../../../shared/utils/index.js";import"../../utils/index.js";import{useFormField as m}from"../../hooks/useFormField.js";import{NCascader as v}from"naive-ui";import"@vueuse/core";import"date-fns";import"../../../../../shared/utils/tapable/SyncHook.js";import"../../../../../shared/utils/tapable/SyncBailHook.js";import"../../../../../shared/utils/tapable/SyncWaterfallHook.js";import"../../../../../shared/utils/tapable/SyncLoopHook.js";import"../../../../../shared/utils/tapable/AsyncParallelHook.js";import"../../../../../shared/utils/tapable/AsyncParallelBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesLoopHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js";import"../../hooks/useFormValidator.js";import"@formily/core";import"@formily/reactive";import{connect as f,mapProps as h}from"@formily/vue";import"@vue/shared";import"./index.js";import"../../hooks/useFormRenderOptions.js";import{createVisitedSetter as y,assignUpdateValue as j,traverseDependKey as k}from"../../utils/schema.js";const g=f(e({name:"FormCascader",props:{options:{type:Array,default:()=>[]},depth:{type:[Number,String]},urlConfig:{type:Object},requestCache:{type:Boolean,default:!0},onFocus:{type:Function},filterable:{type:Boolean,default:!1},checkStrategy:{type:String,default:"child"},labelField:{type:String,default:"text"},valueField:{type:String,default:"value"},onChange:{},value:{}},emits:["update:value"],setup(e,{slots:f,emit:h}){const j=t(),{field:g,title:b}=m(),S=t(1),C=a((()=>{var t,a,l;return null!=(l=null!=(a=null==(t=e.urlConfig)?void 0:t.nameKey)?a:e.labelField)?l:"text"})),F=a((()=>{var t,a,l;return null!=(l=null!=(a=null==(t=e.urlConfig)?void 0:t.valueKey)?a:e.valueField)?l:"value"})),w=a((()=>{try{const t=Array.isArray(e.value)?e.value:JSON.parse(e.value||"");return Array.isArray(t)&&t.length?t.map((e=>e[F.value])).slice(-1).join(""):null}catch(e){return null}}));function A(e,t,a){h("update:value",i(a)?a.map((function(e){return{...e,label:e[C.value],children:void 0,parent:void 0,mergeItemValue:void 0}})):null)}const H=l(p);async function x(t){e.filterable?await async function(){if(!e.urlConfig||j.value&&e.requestCache)return;const t=await H.addAsync({...e.urlConfig,params:{lvlnr:"1"},key:b.value,cache:e.requestCache});function a(e,t,r){const o=r+l(e),n={[C.value]:e[C.value],[F.value]:e[F.value],depth:t+1,isLeaf:!0,keyword:e.keyword,mergeItemValue:o};return i(e.children)&&(n.children=e.children.map((e=>a(e,t+1,o))),n.isLeaf=!e.children.length),S.value=Math.max(S.value,t+1),n}function l(e){let t="";return s(e[C.value])&&(t=`${t}${e[C.value]}`),s(e.keyword)&&(t=`${t} ${e.keyword}`),t}j.value=t.map((e=>a(e,0,"")))}():await async function(t){if(r(e,t))return;const a=await H.addAsync(o(s(t),i(e),b.value,t));if(!a.length&&t)return t.isLeaf=!0,A(0,0,n(t)),void(I.value=!1);const l=a.map((e=>u(e,s(t))));function r(e,t){return!i(e)||!t&&j.value&&e.requestCache||s(t)>=s(e)-1}function o(t,a,l,r){const o={lvlnr:t+1+""};return r&&a.dependKey&&k(a.dependKey,((e,t)=>{o[t]=r[e]})),{params:o,...a,key:l,cache:e.requestCache}}function n(e){let t=e;const a=[e];for(;t.parent;)a.unshift(t.parent),t=t.parent;return a}function u(a,l){return{[C.value]:a[C.value],[F.value]:a[F.value],depth:l+1,parent:t,isLeaf:l+2>=s(e)}}function i(e){return e.urlConfig}function s(e){var t;return null!=(t=null==e?void 0:e.depth)?t:-1}t?t.children=l:j.value=l}(t),await L()}const V=`form-render__cascade--menu-${l(d)}`;async function L(){await n();const e=document.querySelector(`.${V} .v-vl`);e&&e.dispatchEvent(new CustomEvent("scroll"))}function q(t,a){if(!t||!a)return!1;const{mergeItemValue:l}=a;if(e.checkStrategy.includes("child")&&a.depth<S.value)return!1;return s(l)&&l.includes(t)}const{injectValueValidate:B,injectValueWatchFromEmpty:$,injectValueBindKey:K}=c();$((()=>e.value),x),B((()=>e.value)),r((()=>e.urlConfig),(async(e,t)=>{u(e,t)||(j.value=null,await x())}));const I=t(!1);function E(e){I.value=!!e,e&&x()}const O=a((()=>j.value||e.options||[])),W=a((()=>!e.filterable)),N=K(w);return()=>o(v,{key:N.value,remote:W.value,filterable:e.filterable,"menu-props":{class:V,onClick:L},"check-strategy":e.checkStrategy,show:!!I.value,"onUpdate:show":E,value:w.value,filter:q,"onUpdate:value":A,labelField:C.value,valueField:F.value,options:O.value,onLoad:x,onFocus:y(g)},f)}}),h({dataSource:"options"},j));export{g as SEARCH_CASCADER};
|
|
@@ -282,9 +282,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
282
282
|
} | undefined;
|
|
283
283
|
autofocus?: string | undefined;
|
|
284
284
|
autoselect?: boolean | undefined;
|
|
285
|
-
defaultValue?: string | number | object | any[] |
|
|
286
|
-
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
287
|
-
}) => any) | {
|
|
285
|
+
defaultValue?: string | number | object | any[] | {
|
|
288
286
|
exec: (string: string) => RegExpExecArray | null;
|
|
289
287
|
test: (string: string) => boolean;
|
|
290
288
|
readonly source: string;
|
|
@@ -305,7 +303,9 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
305
303
|
[Symbol.search]: (string: string) => number;
|
|
306
304
|
[Symbol.split]: (string: string, limit?: number | undefined) => string[];
|
|
307
305
|
[Symbol.matchAll]: (str: string) => IterableIterator<RegExpMatchArray>;
|
|
308
|
-
} | {
|
|
306
|
+
} | ((params: {
|
|
307
|
+
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
308
|
+
}) => any) | {
|
|
309
309
|
toString: () => string;
|
|
310
310
|
toDateString: () => string;
|
|
311
311
|
toTimeString: () => string;
|
|
@@ -585,9 +585,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
585
585
|
} | undefined;
|
|
586
586
|
autofocus?: string | undefined;
|
|
587
587
|
autoselect?: boolean | undefined;
|
|
588
|
-
defaultValue?: string | number | object | any[] |
|
|
589
|
-
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
590
|
-
}) => any) | {
|
|
588
|
+
defaultValue?: string | number | object | any[] | {
|
|
591
589
|
exec: (string: string) => RegExpExecArray | null;
|
|
592
590
|
test: (string: string) => boolean;
|
|
593
591
|
readonly source: string;
|
|
@@ -608,7 +606,9 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
608
606
|
[Symbol.search]: (string: string) => number;
|
|
609
607
|
[Symbol.split]: (string: string, limit?: number | undefined) => string[];
|
|
610
608
|
[Symbol.matchAll]: (str: string) => IterableIterator<RegExpMatchArray>;
|
|
611
|
-
} | {
|
|
609
|
+
} | ((params: {
|
|
610
|
+
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
611
|
+
}) => any) | {
|
|
612
612
|
toString: () => string;
|
|
613
613
|
toDateString: () => string;
|
|
614
614
|
toTimeString: () => string;
|
|
@@ -1061,9 +1061,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1061
1061
|
} | undefined;
|
|
1062
1062
|
autofocus?: string | undefined;
|
|
1063
1063
|
autoselect?: boolean | undefined;
|
|
1064
|
-
defaultValue?: string | number | object | any[] |
|
|
1065
|
-
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
1066
|
-
}) => any) | {
|
|
1064
|
+
defaultValue?: string | number | object | any[] | {
|
|
1067
1065
|
exec: (string: string) => RegExpExecArray | null;
|
|
1068
1066
|
test: (string: string) => boolean;
|
|
1069
1067
|
readonly source: string;
|
|
@@ -1084,7 +1082,9 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1084
1082
|
[Symbol.search]: (string: string) => number;
|
|
1085
1083
|
[Symbol.split]: (string: string, limit?: number | undefined) => string[];
|
|
1086
1084
|
[Symbol.matchAll]: (str: string) => IterableIterator<RegExpMatchArray>;
|
|
1087
|
-
} | {
|
|
1085
|
+
} | ((params: {
|
|
1086
|
+
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
1087
|
+
}) => any) | {
|
|
1088
1088
|
toString: () => string;
|
|
1089
1089
|
toDateString: () => string;
|
|
1090
1090
|
toTimeString: () => string;
|
|
@@ -1420,9 +1420,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1420
1420
|
} | undefined;
|
|
1421
1421
|
autofocus?: string | undefined;
|
|
1422
1422
|
autoselect?: boolean | undefined;
|
|
1423
|
-
defaultValue?: string | number | object | any[] |
|
|
1424
|
-
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
1425
|
-
}) => any) | {
|
|
1423
|
+
defaultValue?: string | number | object | any[] | {
|
|
1426
1424
|
exec: (string: string) => RegExpExecArray | null;
|
|
1427
1425
|
test: (string: string) => boolean;
|
|
1428
1426
|
readonly source: string;
|
|
@@ -1443,7 +1441,9 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1443
1441
|
[Symbol.search]: (string: string) => number;
|
|
1444
1442
|
[Symbol.split]: (string: string, limit?: number | undefined) => string[];
|
|
1445
1443
|
[Symbol.matchAll]: (str: string) => IterableIterator<RegExpMatchArray>;
|
|
1446
|
-
} | {
|
|
1444
|
+
} | ((params: {
|
|
1445
|
+
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
1446
|
+
}) => any) | {
|
|
1447
1447
|
toString: () => string;
|
|
1448
1448
|
toDateString: () => string;
|
|
1449
1449
|
toTimeString: () => string;
|
|
@@ -2292,9 +2292,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2292
2292
|
} | undefined;
|
|
2293
2293
|
autofocus?: string | undefined;
|
|
2294
2294
|
autoselect?: boolean | undefined;
|
|
2295
|
-
defaultValue?: string | number | object | any[] |
|
|
2296
|
-
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
2297
|
-
}) => any) | {
|
|
2295
|
+
defaultValue?: string | number | object | any[] | {
|
|
2298
2296
|
exec: (string: string) => RegExpExecArray | null;
|
|
2299
2297
|
test: (string: string) => boolean;
|
|
2300
2298
|
readonly source: string;
|
|
@@ -2315,7 +2313,9 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2315
2313
|
[Symbol.search]: (string: string) => number;
|
|
2316
2314
|
[Symbol.split]: (string: string, limit?: number | undefined) => string[];
|
|
2317
2315
|
[Symbol.matchAll]: (str: string) => IterableIterator<RegExpMatchArray>;
|
|
2318
|
-
} | {
|
|
2316
|
+
} | ((params: {
|
|
2317
|
+
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
2318
|
+
}) => any) | {
|
|
2319
2319
|
toString: () => string;
|
|
2320
2320
|
toDateString: () => string;
|
|
2321
2321
|
toTimeString: () => string;
|
|
@@ -2754,9 +2754,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2754
2754
|
} | undefined;
|
|
2755
2755
|
autofocus?: string | undefined;
|
|
2756
2756
|
autoselect?: boolean | undefined;
|
|
2757
|
-
defaultValue?: string | number | object | any[] |
|
|
2758
|
-
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
2759
|
-
}) => any) | {
|
|
2757
|
+
defaultValue?: string | number | object | any[] | {
|
|
2760
2758
|
exec: (string: string) => RegExpExecArray | null;
|
|
2761
2759
|
test: (string: string) => boolean;
|
|
2762
2760
|
readonly source: string;
|
|
@@ -2777,7 +2775,9 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2777
2775
|
[Symbol.search]: (string: string) => number;
|
|
2778
2776
|
[Symbol.split]: (string: string, limit?: number | undefined) => string[];
|
|
2779
2777
|
[Symbol.matchAll]: (str: string) => IterableIterator<RegExpMatchArray>;
|
|
2780
|
-
} | {
|
|
2778
|
+
} | ((params: {
|
|
2779
|
+
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
2780
|
+
}) => any) | {
|
|
2781
2781
|
toString: () => string;
|
|
2782
2782
|
toDateString: () => string;
|
|
2783
2783
|
toTimeString: () => string;
|
|
@@ -3057,9 +3057,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
3057
3057
|
} | undefined;
|
|
3058
3058
|
autofocus?: string | undefined;
|
|
3059
3059
|
autoselect?: boolean | undefined;
|
|
3060
|
-
defaultValue?: string | number | object | any[] |
|
|
3061
|
-
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
3062
|
-
}) => any) | {
|
|
3060
|
+
defaultValue?: string | number | object | any[] | {
|
|
3063
3061
|
exec: (string: string) => RegExpExecArray | null;
|
|
3064
3062
|
test: (string: string) => boolean;
|
|
3065
3063
|
readonly source: string;
|
|
@@ -3080,7 +3078,9 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
3080
3078
|
[Symbol.search]: (string: string) => number;
|
|
3081
3079
|
[Symbol.split]: (string: string, limit?: number | undefined) => string[];
|
|
3082
3080
|
[Symbol.matchAll]: (str: string) => IterableIterator<RegExpMatchArray>;
|
|
3083
|
-
} | {
|
|
3081
|
+
} | ((params: {
|
|
3082
|
+
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
3083
|
+
}) => any) | {
|
|
3084
3084
|
toString: () => string;
|
|
3085
3085
|
toDateString: () => string;
|
|
3086
3086
|
toTimeString: () => string;
|
|
@@ -3533,9 +3533,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
3533
3533
|
} | undefined;
|
|
3534
3534
|
autofocus?: string | undefined;
|
|
3535
3535
|
autoselect?: boolean | undefined;
|
|
3536
|
-
defaultValue?: string | number | object | any[] |
|
|
3537
|
-
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
3538
|
-
}) => any) | {
|
|
3536
|
+
defaultValue?: string | number | object | any[] | {
|
|
3539
3537
|
exec: (string: string) => RegExpExecArray | null;
|
|
3540
3538
|
test: (string: string) => boolean;
|
|
3541
3539
|
readonly source: string;
|
|
@@ -3556,7 +3554,9 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
3556
3554
|
[Symbol.search]: (string: string) => number;
|
|
3557
3555
|
[Symbol.split]: (string: string, limit?: number | undefined) => string[];
|
|
3558
3556
|
[Symbol.matchAll]: (str: string) => IterableIterator<RegExpMatchArray>;
|
|
3559
|
-
} | {
|
|
3557
|
+
} | ((params: {
|
|
3558
|
+
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
3559
|
+
}) => any) | {
|
|
3560
3560
|
toString: () => string;
|
|
3561
3561
|
toDateString: () => string;
|
|
3562
3562
|
toTimeString: () => string;
|
|
@@ -3892,9 +3892,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
3892
3892
|
} | undefined;
|
|
3893
3893
|
autofocus?: string | undefined;
|
|
3894
3894
|
autoselect?: boolean | undefined;
|
|
3895
|
-
defaultValue?: string | number | object | any[] |
|
|
3896
|
-
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
3897
|
-
}) => any) | {
|
|
3895
|
+
defaultValue?: string | number | object | any[] | {
|
|
3898
3896
|
exec: (string: string) => RegExpExecArray | null;
|
|
3899
3897
|
test: (string: string) => boolean;
|
|
3900
3898
|
readonly source: string;
|
|
@@ -3915,7 +3913,9 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
3915
3913
|
[Symbol.search]: (string: string) => number;
|
|
3916
3914
|
[Symbol.split]: (string: string, limit?: number | undefined) => string[];
|
|
3917
3915
|
[Symbol.matchAll]: (str: string) => IterableIterator<RegExpMatchArray>;
|
|
3918
|
-
} | {
|
|
3916
|
+
} | ((params: {
|
|
3917
|
+
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
3918
|
+
}) => any) | {
|
|
3919
3919
|
toString: () => string;
|
|
3920
3920
|
toDateString: () => string;
|
|
3921
3921
|
toTimeString: () => string;
|
|
@@ -281,9 +281,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
281
281
|
} | undefined;
|
|
282
282
|
autofocus?: string | undefined;
|
|
283
283
|
autoselect?: boolean | undefined;
|
|
284
|
-
defaultValue?: string | number | object | any[] |
|
|
285
|
-
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
286
|
-
}) => any) | {
|
|
284
|
+
defaultValue?: string | number | object | any[] | {
|
|
287
285
|
exec: (string: string) => RegExpExecArray | null;
|
|
288
286
|
test: (string: string) => boolean;
|
|
289
287
|
readonly source: string;
|
|
@@ -304,7 +302,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
304
302
|
[Symbol.search]: (string: string) => number;
|
|
305
303
|
[Symbol.split]: (string: string, limit?: number | undefined) => string[];
|
|
306
304
|
[Symbol.matchAll]: (str: string) => IterableIterator<RegExpMatchArray>;
|
|
307
|
-
} | {
|
|
305
|
+
} | ((params: {
|
|
306
|
+
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
307
|
+
}) => any) | {
|
|
308
308
|
toString: () => string;
|
|
309
309
|
toDateString: () => string;
|
|
310
310
|
toTimeString: () => string;
|
|
@@ -584,9 +584,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
584
584
|
} | undefined;
|
|
585
585
|
autofocus?: string | undefined;
|
|
586
586
|
autoselect?: boolean | undefined;
|
|
587
|
-
defaultValue?: string | number | object | any[] |
|
|
588
|
-
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
589
|
-
}) => any) | {
|
|
587
|
+
defaultValue?: string | number | object | any[] | {
|
|
590
588
|
exec: (string: string) => RegExpExecArray | null;
|
|
591
589
|
test: (string: string) => boolean;
|
|
592
590
|
readonly source: string;
|
|
@@ -607,7 +605,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
607
605
|
[Symbol.search]: (string: string) => number;
|
|
608
606
|
[Symbol.split]: (string: string, limit?: number | undefined) => string[];
|
|
609
607
|
[Symbol.matchAll]: (str: string) => IterableIterator<RegExpMatchArray>;
|
|
610
|
-
} | {
|
|
608
|
+
} | ((params: {
|
|
609
|
+
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
610
|
+
}) => any) | {
|
|
611
611
|
toString: () => string;
|
|
612
612
|
toDateString: () => string;
|
|
613
613
|
toTimeString: () => string;
|
|
@@ -1060,9 +1060,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1060
1060
|
} | undefined;
|
|
1061
1061
|
autofocus?: string | undefined;
|
|
1062
1062
|
autoselect?: boolean | undefined;
|
|
1063
|
-
defaultValue?: string | number | object | any[] |
|
|
1064
|
-
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
1065
|
-
}) => any) | {
|
|
1063
|
+
defaultValue?: string | number | object | any[] | {
|
|
1066
1064
|
exec: (string: string) => RegExpExecArray | null;
|
|
1067
1065
|
test: (string: string) => boolean;
|
|
1068
1066
|
readonly source: string;
|
|
@@ -1083,7 +1081,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1083
1081
|
[Symbol.search]: (string: string) => number;
|
|
1084
1082
|
[Symbol.split]: (string: string, limit?: number | undefined) => string[];
|
|
1085
1083
|
[Symbol.matchAll]: (str: string) => IterableIterator<RegExpMatchArray>;
|
|
1086
|
-
} | {
|
|
1084
|
+
} | ((params: {
|
|
1085
|
+
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
1086
|
+
}) => any) | {
|
|
1087
1087
|
toString: () => string;
|
|
1088
1088
|
toDateString: () => string;
|
|
1089
1089
|
toTimeString: () => string;
|
|
@@ -1419,9 +1419,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1419
1419
|
} | undefined;
|
|
1420
1420
|
autofocus?: string | undefined;
|
|
1421
1421
|
autoselect?: boolean | undefined;
|
|
1422
|
-
defaultValue?: string | number | object | any[] |
|
|
1423
|
-
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
1424
|
-
}) => any) | {
|
|
1422
|
+
defaultValue?: string | number | object | any[] | {
|
|
1425
1423
|
exec: (string: string) => RegExpExecArray | null;
|
|
1426
1424
|
test: (string: string) => boolean;
|
|
1427
1425
|
readonly source: string;
|
|
@@ -1442,7 +1440,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1442
1440
|
[Symbol.search]: (string: string) => number;
|
|
1443
1441
|
[Symbol.split]: (string: string, limit?: number | undefined) => string[];
|
|
1444
1442
|
[Symbol.matchAll]: (str: string) => IterableIterator<RegExpMatchArray>;
|
|
1445
|
-
} | {
|
|
1443
|
+
} | ((params: {
|
|
1444
|
+
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
1445
|
+
}) => any) | {
|
|
1446
1446
|
toString: () => string;
|
|
1447
1447
|
toDateString: () => string;
|
|
1448
1448
|
toTimeString: () => string;
|
|
@@ -2291,9 +2291,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2291
2291
|
} | undefined;
|
|
2292
2292
|
autofocus?: string | undefined;
|
|
2293
2293
|
autoselect?: boolean | undefined;
|
|
2294
|
-
defaultValue?: string | number | object | any[] |
|
|
2295
|
-
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
2296
|
-
}) => any) | {
|
|
2294
|
+
defaultValue?: string | number | object | any[] | {
|
|
2297
2295
|
exec: (string: string) => RegExpExecArray | null;
|
|
2298
2296
|
test: (string: string) => boolean;
|
|
2299
2297
|
readonly source: string;
|
|
@@ -2314,7 +2312,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2314
2312
|
[Symbol.search]: (string: string) => number;
|
|
2315
2313
|
[Symbol.split]: (string: string, limit?: number | undefined) => string[];
|
|
2316
2314
|
[Symbol.matchAll]: (str: string) => IterableIterator<RegExpMatchArray>;
|
|
2317
|
-
} | {
|
|
2315
|
+
} | ((params: {
|
|
2316
|
+
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
2317
|
+
}) => any) | {
|
|
2318
2318
|
toString: () => string;
|
|
2319
2319
|
toDateString: () => string;
|
|
2320
2320
|
toTimeString: () => string;
|
|
@@ -2753,9 +2753,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2753
2753
|
} | undefined;
|
|
2754
2754
|
autofocus?: string | undefined;
|
|
2755
2755
|
autoselect?: boolean | undefined;
|
|
2756
|
-
defaultValue?: string | number | object | any[] |
|
|
2757
|
-
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
2758
|
-
}) => any) | {
|
|
2756
|
+
defaultValue?: string | number | object | any[] | {
|
|
2759
2757
|
exec: (string: string) => RegExpExecArray | null;
|
|
2760
2758
|
test: (string: string) => boolean;
|
|
2761
2759
|
readonly source: string;
|
|
@@ -2776,7 +2774,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2776
2774
|
[Symbol.search]: (string: string) => number;
|
|
2777
2775
|
[Symbol.split]: (string: string, limit?: number | undefined) => string[];
|
|
2778
2776
|
[Symbol.matchAll]: (str: string) => IterableIterator<RegExpMatchArray>;
|
|
2779
|
-
} | {
|
|
2777
|
+
} | ((params: {
|
|
2778
|
+
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
2779
|
+
}) => any) | {
|
|
2780
2780
|
toString: () => string;
|
|
2781
2781
|
toDateString: () => string;
|
|
2782
2782
|
toTimeString: () => string;
|
|
@@ -3056,9 +3056,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3056
3056
|
} | undefined;
|
|
3057
3057
|
autofocus?: string | undefined;
|
|
3058
3058
|
autoselect?: boolean | undefined;
|
|
3059
|
-
defaultValue?: string | number | object | any[] |
|
|
3060
|
-
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
3061
|
-
}) => any) | {
|
|
3059
|
+
defaultValue?: string | number | object | any[] | {
|
|
3062
3060
|
exec: (string: string) => RegExpExecArray | null;
|
|
3063
3061
|
test: (string: string) => boolean;
|
|
3064
3062
|
readonly source: string;
|
|
@@ -3079,7 +3077,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3079
3077
|
[Symbol.search]: (string: string) => number;
|
|
3080
3078
|
[Symbol.split]: (string: string, limit?: number | undefined) => string[];
|
|
3081
3079
|
[Symbol.matchAll]: (str: string) => IterableIterator<RegExpMatchArray>;
|
|
3082
|
-
} | {
|
|
3080
|
+
} | ((params: {
|
|
3081
|
+
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
3082
|
+
}) => any) | {
|
|
3083
3083
|
toString: () => string;
|
|
3084
3084
|
toDateString: () => string;
|
|
3085
3085
|
toTimeString: () => string;
|
|
@@ -3532,9 +3532,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3532
3532
|
} | undefined;
|
|
3533
3533
|
autofocus?: string | undefined;
|
|
3534
3534
|
autoselect?: boolean | undefined;
|
|
3535
|
-
defaultValue?: string | number | object | any[] |
|
|
3536
|
-
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
3537
|
-
}) => any) | {
|
|
3535
|
+
defaultValue?: string | number | object | any[] | {
|
|
3538
3536
|
exec: (string: string) => RegExpExecArray | null;
|
|
3539
3537
|
test: (string: string) => boolean;
|
|
3540
3538
|
readonly source: string;
|
|
@@ -3555,7 +3553,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3555
3553
|
[Symbol.search]: (string: string) => number;
|
|
3556
3554
|
[Symbol.split]: (string: string, limit?: number | undefined) => string[];
|
|
3557
3555
|
[Symbol.matchAll]: (str: string) => IterableIterator<RegExpMatchArray>;
|
|
3558
|
-
} | {
|
|
3556
|
+
} | ((params: {
|
|
3557
|
+
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
3558
|
+
}) => any) | {
|
|
3559
3559
|
toString: () => string;
|
|
3560
3560
|
toDateString: () => string;
|
|
3561
3561
|
toTimeString: () => string;
|
|
@@ -3891,9 +3891,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3891
3891
|
} | undefined;
|
|
3892
3892
|
autofocus?: string | undefined;
|
|
3893
3893
|
autoselect?: boolean | undefined;
|
|
3894
|
-
defaultValue?: string | number | object | any[] |
|
|
3895
|
-
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
3896
|
-
}) => any) | {
|
|
3894
|
+
defaultValue?: string | number | object | any[] | {
|
|
3897
3895
|
exec: (string: string) => RegExpExecArray | null;
|
|
3898
3896
|
test: (string: string) => boolean;
|
|
3899
3897
|
readonly source: string;
|
|
@@ -3914,7 +3912,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3914
3912
|
[Symbol.search]: (string: string) => number;
|
|
3915
3913
|
[Symbol.split]: (string: string, limit?: number | undefined) => string[];
|
|
3916
3914
|
[Symbol.matchAll]: (str: string) => IterableIterator<RegExpMatchArray>;
|
|
3917
|
-
} | {
|
|
3915
|
+
} | ((params: {
|
|
3916
|
+
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
3917
|
+
}) => any) | {
|
|
3918
3918
|
toString: () => string;
|
|
3919
3919
|
toDateString: () => string;
|
|
3920
3920
|
toTimeString: () => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,inject as t,ref as o,computed as l,provide as n,watch as r,onMounted as a,createVNode as s,h as i,unref as u,onBeforeUnmount as d,shallowReactive as c}from"vue";import{widthAppend as p,traverse as f}from"../../../../../shared/utils/index.js";import{doAnimation as m}from"../../../../../shared/utils/anime.js";import{useThrottleFn as h}from"@vueuse/core";import{promiseTimeout as g}from"@vueuse/shared";import{isFunction as v,isNumber as x,last as I,omit as b}from"lodash-es";import"../../../index.js";import{InjectionIhoTableUUID as w,WIDGET_TYPE as y}from"../../constants/index.js";import{useUUIDMap as T}from"../../utils/index.js";import{defineTablePlugin as R}from"../../hooks/useTablePlugin.js";class H{constructor(){this.records={},this.maxRecords=c(new Map)}set(e,t,o){if(this.records[e]||(this.records[e]={}),this.records[e][t]===o)return;this.records[e][t]=o;const l=Math.max(...Object.values(this.records[e]),0);this.maxRecords.get(e)!==l&&this.maxRecords.set(e,l)}getMax(e){return this.maxRecords.get(e)||0}}const{getItemFromUUID:D,removeItemFromUUID:M}=T((()=>new H),!0),{getItemFromUUID:S,removeItemFromUUID:U,setItemFromUUID:C}=T((()=>null)),{getItemFromUUID:$,removeItemFromUUID:E,setItemFromUUID:k}=T((()=>{})),F=e({props:{payload:{type:Object,required:!0}},setup(e){const u=t(w),d=t("$xetable"),c=o(),f=D(u),m=l((()=>e.payload.row[e.payload.column.field]));function h(){const{row:t,column:o}=e.payload,l=d.getRowSeq(t);if(!f||null==l||!c.value)return;const n=c.value.clientHeight;f.set(l,o.field,n)}n("updateCellHeight",h),r([()=>e.payload.rowIndex,()=>e.payload.column.field,m,()=>e.payload.column.renderWidth],(async()=>{await g(0),h()})),a((()=>{d&&!S(u)&&C(u,d),h()}));const I=l((()=>{var t,o,l,n;const r=null!=(o=null==(t=e.payload.column.editRender)?void 0:t.props)?o:{},a=null!=(n=null==(l=r.slots)?void 0:l.default)?n:r.slotFn;return v(a)?a:()=>m.value})),b=l((()=>{const t=e.payload.column.renderWidth;return x(t)&&t>0?p(t-20-2):""}));return()=>s("div",{ref:c,style:{padding:"7px 0",width:b.value,overflow:"hidden"}},[i(I.value,e.payload)])}});function j(e,t,{scrollTop:o=0}){var l,n;const{uuid:r,rowConfig:a={}}=t;if(!r)return;const s=D(r),{oSize:i=0,gt:d=100}=null!=(l=$(r))?l:{},{internalData:c,reactData:p}=e,{scrollYStore:f,elemStore:m,afterFullData:h,fullDataRowIdData:g}=c;if(d>h.length)return;const x=null!=(n=a.height)?n:36,b=m["main-body-wrapper"],w=b?u(b):null;let y=w?Math.max(8,Math.ceil(w.clientHeight/x)+2+i):8;const T=[0];let R=0;if(o&&h.find(((t,l)=>{const n=e.getRowSeq(t),r=(I(T)||0)+Math.max(x,s.getMax(n));if(T.push(r),r>o)return R=Math.max(0,l-i),y+=Math.min(R,i),!0})),R>0&&v(t.spanMethod)){const{spanMethod:o}=t,l={rowspan:1,colspan:1};for(;R>0;){if(!e.getColumns().some(((e,t)=>{const{rowspan:n,colspan:r}=o({column:e,columnIndex:t,$columnIndex:t,row:h[R],rowIndex:R,$rowIndex:R,_rowIndex:R,isHidden:!e.visible,fixed:e.fixed,type:e.type,visibleData:h})||l;if(0===n&&0===r)return R--,!0})))break}}const H=`${T[R]}px`,M=`${h.reduce(((t,o)=>{const l=e.getRowSeq(o);return t+Math.max(x,s.getMax(l))}),0)}px`;["main","left","right"].forEach((e=>{const t=m[`${e}-body-table`],l=t?u(t):null;l&&(l.style.marginTop=H,l.scrollTop=o),["header","body","footer"].forEach((t=>{const o=m[`${e}-${t}-ySpace`],l=o?u(o):null;l&&(l.style.height=M)}))}));const S=Math.min(h.length,R+y);if(f.startIndex===R&&f.endIndex===S)return;f.startIndex=R,f.endIndex=S;const U=h.slice(f.startIndex,f.endIndex);U.forEach(((t,o)=>{const l=e.getRowid(t),n=g[l];n&&(n.$index=o)})),p.tableData.length=0,p.tableData.push(...U)}const L=h(j,300);function Y(){const e="variableHeightRendererPlugin";return R({name:e,vxe(e){e.renderer.add(y.VARIABLE_HEIGHT,{renderCell:(e,t)=>s(F,{payload:t},null)})},apply(t){function o(e){const t=S(e.uuid);if(!t)return;e.scrollY={enabled:!1},t.reactData.scrollYLoad=!1;const o=function(e){const t=e.internalData.elemStore["main-body-wrapper"];return t?u(t):null}(t);o&&j(t,e,{scrollTop:o.scrollTop})}function l(e){if(!e.uuid)return;const t=$(e.uuid);t&&(e.scrollY=t),setTimeout((()=>o(e)),300)}t.dataHooks.dataStart.tap(e,l),t.eventHooks.onFilterChange.tap(e,((e,t)=>l(t))),t.eventHooks.onSortChange.tap(e,((e,t)=>l(t))),t.eventHooks.onToggleTreeExpand.tap(e,((e,t)=>l(t))),t.eventHooks.onResizableChange.tap(e,(async({column:e},t)=>{if(!e.editRender||!e.editRender.props)return;e.editRender.props.variableHeight&&l(t)})),t.eventHooks.onScroll.tap(e,h(((e,t)=>{if(e.isX)return;const{uuid:o}=t;if(!o)return;const l=S(o);l&&j(l,t,e)}),100,!0,!0)),t.fieldHooks.field.tap(e,(e=>{if(Reflect.get(e,"variableHeight")){const t=e.slots;e.slots=b(t,["default"]),e.editRender={...e.editRender,name:y.VARIABLE_HEIGHT};const o=e.className,l="variable-height";e.className=o?function(e){return v(o)?[o(e),l]:[o,l]}:l}return e})),t.fieldHooks.fieldList.tap(e,((e,t,{$table:l})=>(t.uuid&&f(e,((n,r)=>{var a,s,i;if((null==(a=n.editRender)?void 0:a.name)===y.VARIABLE_HEIGHT){const n=null!=(i=null==(s=t.rowConfig)?void 0:s.height)?i:36,a=D(t.uuid),d=t.cellStyle;if(t.cellStyle=function(e){const t={};if(e.column.fixed&&Reflect.get(e,"fixed")&&l.value){const o=Math.max(n,a.getMax(l.value.getRowSeq(e.row)));t.height=`${o}px`}return Object.assign(t,d?v(d)?d(e):d:null)},t.sortableConfig&&t.sortableConfig.enable){const e=t.sortableConfig.onEnd;t.sortableConfig.onEnd=function(o){const l=S(t.uuid);if(l){const{internalData:{elemStore:e}}=l,o=e["main-table-body"];o&&u(o)&&j(l,t,{scrollTop:u(o).scrollTop})}v(e)&&e(o)}}t.showOverflow="tooltip",f(e,(e=>{e.showOverflow="tooltip"})),t.scrollY={...t.scrollY,mode:"default"},t.onWheel=function(e){let t=null,o=0,l=!0;return function(n){if(!e.uuid)return;const r=S(e.uuid);if(!r)return;const{internalData:a}=r,{isHover:s}=e.rowConfig||{},{deltaX:i,deltaY:d}=n,{refTableLeftBody:c,refTableRightBody:p,refTableBody:f}=r.getRefMaps(),h=d,g=i,v=h<0,x=u(f),I=x?x.$el:null;if(!I)return;if(v?I.scrollTop<=0:I.scrollTop>=I.scrollHeight-I.clientHeight)return;const b=I.scrollTop+h,w=I.scrollLeft+g;if(b===a.lastScrollTop)return;n.preventDefault(),a.lastScrollTop=b,a.lastScrollLeft=w,a.lastScrollTime=Date.now(),s&&r.clearHoverRow();const y=c.value,T=p.value,R=y?y.$el:null,H=T?T.$el:null,D=Math.min(100,Math.abs(Math.floor(h/2)));l&&(o=I.scrollTop,l=!1),o+=D*(v?-1:1),t&&t(),t=m(I.scrollTop,o,400,(e=>{I.scrollTop=e,R&&(R.scrollTop=e),H&&(H.scrollTop=e)}),"easeOutCubic",(()=>{o=I.scrollTop,l=!0})),L(r,e,I)}}(t),setTimeout((()=>{k(t.uuid,t.scrollY),o(t)}),300),r()}})),e))),t.setupHooks.setup.tap(e,(e=>{d((()=>{e.value.uuid&&(M(e.value.uuid),U(e.value.uuid),E(e.value.uuid))}))}))}})}export{Y as variableHeightRendererPlugin};
|
|
1
|
+
import{defineComponent as e,inject as t,ref as o,computed as l,provide as n,watch as r,onMounted as a,createVNode as s,h as i,unref as u,onBeforeUnmount as d,shallowReactive as c}from"vue";import{widthAppend as p,traverse as f}from"../../../../../shared/utils/index.js";import{doAnimation as m}from"../../../../../shared/utils/anime.js";import{useThrottleFn as h}from"@vueuse/core";import{promiseTimeout as g}from"@vueuse/shared";import{isFunction as v,isNumber as x,last as I,omit as b}from"lodash-es";import"../../../index.js";import{InjectionIhoTableUUID as w,WIDGET_TYPE as y}from"../../constants/index.js";import{useUUIDMap as T}from"../../utils/index.js";import{defineTablePlugin as R}from"../../hooks/useTablePlugin.js";class H{constructor(){this.records={},this.maxRecords=c(new Map)}set(e,t,o){if(this.records[e]||(this.records[e]={}),this.records[e][t]===o)return;this.records[e][t]=o;const l=Math.max(...Object.values(this.records[e]),0);this.maxRecords.get(e)!==l&&this.maxRecords.set(e,l)}getMax(e){return this.maxRecords.get(e)||0}}const{getItemFromUUID:D,removeItemFromUUID:M}=T((()=>new H),!0),{getItemFromUUID:S,removeItemFromUUID:U,setItemFromUUID:C}=T((()=>null)),{getItemFromUUID:$,removeItemFromUUID:E,setItemFromUUID:k}=T((()=>{})),F=e({props:{payload:{type:Object,required:!0}},setup(e){const u=t(w),d=t("$xetable"),c=o(),f=D(u),m=l((()=>e.payload.row[e.payload.column.field]));function h(){const{row:t,column:o}=e.payload,l=d.getRowSeq(t);if(!f||null==l||!c.value)return;const n=c.value.clientHeight;f.set(l,o.field,n)}n("updateCellHeight",h),r([()=>e.payload.rowIndex,()=>e.payload.column.field,m,()=>e.payload.column.renderWidth],(async()=>{await g(0),h()})),a((()=>{d&&!S(u)&&C(u,d),h()}));const I=l((()=>{var t,o,l,n;const r=null!=(o=null==(t=e.payload.column.editRender)?void 0:t.props)?o:{},a=null!=(n=null==(l=r.slots)?void 0:l.default)?n:r.slotFn;return v(a)?a:()=>m.value})),b=l((()=>{if(e.payload.column.treeNode)return"";const t=e.payload.column.renderWidth;return x(t)&&t>0?p(t-20-2):""}));return()=>s("div",{ref:c,style:{padding:"7px 0",width:b.value,overflow:"hidden"}},[i(I.value,e.payload)])}});function j(e,t,{scrollTop:o=0}){var l,n;const{uuid:r,rowConfig:a={}}=t;if(!r)return;const s=D(r),{oSize:i=0,gt:d=100}=null!=(l=$(r))?l:{},{internalData:c,reactData:p}=e,{scrollYStore:f,elemStore:m,afterFullData:h,fullDataRowIdData:g}=c;if(d>h.length)return;const x=null!=(n=a.height)?n:36,b=m["main-body-wrapper"],w=b?u(b):null;let y=w?Math.max(8,Math.ceil(w.clientHeight/x)+2+i):8;const T=[0];let R=0;if(o&&h.find(((t,l)=>{const n=e.getRowSeq(t),r=(I(T)||0)+Math.max(x,s.getMax(n));if(T.push(r),r>o)return R=Math.max(0,l-i),y+=Math.min(R,i),!0})),R>0&&v(t.spanMethod)){const{spanMethod:o}=t,l={rowspan:1,colspan:1};for(;R>0;){if(!e.getColumns().some(((e,t)=>{const{rowspan:n,colspan:r}=o({column:e,columnIndex:t,$columnIndex:t,row:h[R],rowIndex:R,$rowIndex:R,_rowIndex:R,isHidden:!e.visible,fixed:e.fixed,type:e.type,visibleData:h})||l;if(0===n&&0===r)return R--,!0})))break}}const H=`${T[R]}px`,M=`${h.reduce(((t,o)=>{const l=e.getRowSeq(o);return t+Math.max(x,s.getMax(l))}),0)}px`;["main","left","right"].forEach((e=>{const t=m[`${e}-body-table`],l=t?u(t):null;l&&(l.style.marginTop=H,l.scrollTop=o),["header","body","footer"].forEach((t=>{const o=m[`${e}-${t}-ySpace`],l=o?u(o):null;l&&(l.style.height=M)}))}));const S=Math.min(h.length,R+y);if(f.startIndex===R&&f.endIndex===S)return;f.startIndex=R,f.endIndex=S;const U=h.slice(f.startIndex,f.endIndex);U.forEach(((t,o)=>{const l=e.getRowid(t),n=g[l];n&&(n.$index=o)})),p.tableData.length=0,p.tableData.push(...U)}const L=h(j,300);function Y(){const e="variableHeightRendererPlugin";return R({name:e,vxe(e){e.renderer.add(y.VARIABLE_HEIGHT,{renderCell:(e,t)=>s(F,{payload:t},null)})},apply(t){function o(e){const t=S(e.uuid);if(!t)return;e.scrollY={enabled:!1},t.reactData.scrollYLoad=!1;const o=function(e){const t=e.internalData.elemStore["main-body-wrapper"];return t?u(t):null}(t);o&&j(t,e,{scrollTop:o.scrollTop})}function l(e){if(!e.uuid)return;const t=$(e.uuid);t&&(e.scrollY=t),setTimeout((()=>o(e)),300)}t.dataHooks.dataStart.tap(e,l),t.eventHooks.onFilterChange.tap(e,((e,t)=>l(t))),t.eventHooks.onSortChange.tap(e,((e,t)=>l(t))),t.eventHooks.onToggleTreeExpand.tap(e,((e,t)=>l(t))),t.eventHooks.onResizableChange.tap(e,(async({column:e},t)=>{if(!e.editRender||!e.editRender.props)return;e.editRender.props.variableHeight&&l(t)})),t.eventHooks.onScroll.tap(e,h(((e,t)=>{if(e.isX)return;const{uuid:o}=t;if(!o)return;const l=S(o);l&&j(l,t,e)}),100,!0,!0)),t.fieldHooks.field.tap(e,(e=>{if(Reflect.get(e,"variableHeight")){const t=e.slots;e.slots=b(t,["default"]),e.editRender={...e.editRender,name:y.VARIABLE_HEIGHT};const o=e.className,l="variable-height";e.className=o?function(e){return v(o)?[o(e),l]:[o,l]}:l}return e})),t.fieldHooks.fieldList.tap(e,((e,t,{$table:l})=>(t.uuid&&f(e,((n,r)=>{var a,s,i;if((null==(a=n.editRender)?void 0:a.name)===y.VARIABLE_HEIGHT){const n=null!=(i=null==(s=t.rowConfig)?void 0:s.height)?i:36,a=D(t.uuid),d=t.cellStyle;if(t.cellStyle=function(e){const t={};if(e.column.fixed&&Reflect.get(e,"fixed")&&l.value){const o=Math.max(n,a.getMax(l.value.getRowSeq(e.row)));t.height=`${o}px`}return Object.assign(t,d?v(d)?d(e):d:null)},t.sortableConfig&&t.sortableConfig.enable){const e=t.sortableConfig.onEnd;t.sortableConfig.onEnd=function(o){const l=S(t.uuid);if(l){const{internalData:{elemStore:e}}=l,o=e["main-table-body"];o&&u(o)&&j(l,t,{scrollTop:u(o).scrollTop})}v(e)&&e(o)}}t.showOverflow="tooltip",f(e,(e=>{e.showOverflow="tooltip"})),t.scrollY={...t.scrollY,mode:"default"},t.onWheel=function(e){let t=null,o=0,l=!0;return function(n){if(!e.uuid)return;const r=S(e.uuid);if(!r)return;const{internalData:a}=r,{isHover:s}=e.rowConfig||{},{deltaX:i,deltaY:d}=n,{refTableLeftBody:c,refTableRightBody:p,refTableBody:f}=r.getRefMaps(),h=d,g=i,v=h<0,x=u(f),I=x?x.$el:null;if(!I)return;if(v?I.scrollTop<=0:I.scrollTop>=I.scrollHeight-I.clientHeight)return;const b=I.scrollTop+h,w=I.scrollLeft+g;if(b===a.lastScrollTop)return;n.preventDefault(),a.lastScrollTop=b,a.lastScrollLeft=w,a.lastScrollTime=Date.now(),s&&r.clearHoverRow();const y=c.value,T=p.value,R=y?y.$el:null,H=T?T.$el:null,D=Math.min(100,Math.abs(Math.floor(h/2)));l&&(o=I.scrollTop,l=!1),o+=D*(v?-1:1),t&&t(),t=m(I.scrollTop,o,400,(e=>{I.scrollTop=e,R&&(R.scrollTop=e),H&&(H.scrollTop=e)}),"easeOutCubic",(()=>{o=I.scrollTop,l=!0})),L(r,e,I)}}(t),setTimeout((()=>{k(t.uuid,t.scrollY),o(t)}),300),r()}})),e))),t.setupHooks.setup.tap(e,(e=>{d((()=>{e.value.uuid&&(M(e.value.uuid),U(e.value.uuid),E(e.value.uuid))}))}))}})}export{Y as variableHeightRendererPlugin};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export const __esModule: true;
|
|
2
|
+
declare const _default: vue_1.DefineComponent<{
|
|
3
|
+
form: {
|
|
4
|
+
type: ObjectConstructor;
|
|
5
|
+
default: () => void;
|
|
6
|
+
};
|
|
7
|
+
item: {
|
|
8
|
+
type: ObjectConstructor;
|
|
9
|
+
default: () => void;
|
|
10
|
+
};
|
|
11
|
+
isLock: {
|
|
12
|
+
type: BooleanConstructor;
|
|
13
|
+
default: boolean;
|
|
14
|
+
};
|
|
15
|
+
}, () => any, any, {}, {}, vue_1.ComponentOptionsMixin, vue_1.ComponentOptionsMixin, "scaleChange"[], "scaleChange", vue_1.VNodeProps & vue_1.AllowedComponentProps & vue_1.ComponentCustomProps, Readonly<vue_1.ExtractPropTypes<{
|
|
16
|
+
form: {
|
|
17
|
+
type: ObjectConstructor;
|
|
18
|
+
default: () => void;
|
|
19
|
+
};
|
|
20
|
+
item: {
|
|
21
|
+
type: ObjectConstructor;
|
|
22
|
+
default: () => void;
|
|
23
|
+
};
|
|
24
|
+
isLock: {
|
|
25
|
+
type: BooleanConstructor;
|
|
26
|
+
default: boolean;
|
|
27
|
+
};
|
|
28
|
+
}>> & {
|
|
29
|
+
onScaleChange?: ((...args: any[]) => any) | undefined;
|
|
30
|
+
}, {
|
|
31
|
+
item: Record<string, any>;
|
|
32
|
+
isLock: boolean;
|
|
33
|
+
form: Record<string, any>;
|
|
34
|
+
}>;
|
|
35
|
+
export default _default;
|
|
36
|
+
import vue_1 = require("vue");
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export const __esModule: true;
|
|
2
|
+
declare const _default: vue_1.DefineComponent<{
|
|
3
|
+
form: {
|
|
4
|
+
type: ObjectConstructor;
|
|
5
|
+
default: () => {};
|
|
6
|
+
};
|
|
7
|
+
item: {
|
|
8
|
+
type: ObjectConstructor;
|
|
9
|
+
default: () => {};
|
|
10
|
+
};
|
|
11
|
+
isLock: {
|
|
12
|
+
type: BooleanConstructor;
|
|
13
|
+
default: boolean;
|
|
14
|
+
};
|
|
15
|
+
}, () => any, any, {}, {}, vue_1.ComponentOptionsMixin, vue_1.ComponentOptionsMixin, "scaleChange"[], "scaleChange", vue_1.VNodeProps & vue_1.AllowedComponentProps & vue_1.ComponentCustomProps, Readonly<vue_1.ExtractPropTypes<{
|
|
16
|
+
form: {
|
|
17
|
+
type: ObjectConstructor;
|
|
18
|
+
default: () => {};
|
|
19
|
+
};
|
|
20
|
+
item: {
|
|
21
|
+
type: ObjectConstructor;
|
|
22
|
+
default: () => {};
|
|
23
|
+
};
|
|
24
|
+
isLock: {
|
|
25
|
+
type: BooleanConstructor;
|
|
26
|
+
default: boolean;
|
|
27
|
+
};
|
|
28
|
+
}>> & {
|
|
29
|
+
onScaleChange?: ((...args: any[]) => any) | undefined;
|
|
30
|
+
}, {
|
|
31
|
+
item: Record<string, any>;
|
|
32
|
+
isLock: boolean;
|
|
33
|
+
form: Record<string, any>;
|
|
34
|
+
}>;
|
|
35
|
+
export default _default;
|
|
36
|
+
import vue_1 = require("vue");
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
export const __esModule: true;
|
|
2
|
+
declare const _default: vue_1.DefineComponent<{
|
|
3
|
+
title: {
|
|
4
|
+
type: (StringConstructor | FunctionConstructor)[];
|
|
5
|
+
default: string;
|
|
6
|
+
};
|
|
7
|
+
changeSize: {
|
|
8
|
+
type: BooleanConstructor;
|
|
9
|
+
default: boolean;
|
|
10
|
+
};
|
|
11
|
+
closable: {
|
|
12
|
+
type: BooleanConstructor;
|
|
13
|
+
default: boolean;
|
|
14
|
+
};
|
|
15
|
+
modalWidth: {
|
|
16
|
+
type: StringConstructor;
|
|
17
|
+
default: string;
|
|
18
|
+
};
|
|
19
|
+
modalHeight: {
|
|
20
|
+
type: StringConstructor;
|
|
21
|
+
default: string;
|
|
22
|
+
};
|
|
23
|
+
handleOk: {
|
|
24
|
+
type: FunctionConstructor;
|
|
25
|
+
default: () => {};
|
|
26
|
+
};
|
|
27
|
+
cancel: {
|
|
28
|
+
type: FunctionConstructor;
|
|
29
|
+
default: () => {};
|
|
30
|
+
};
|
|
31
|
+
visible: {
|
|
32
|
+
type: BooleanConstructor;
|
|
33
|
+
default: boolean;
|
|
34
|
+
};
|
|
35
|
+
}, () => any, any, {}, {}, vue_1.ComponentOptionsMixin, vue_1.ComponentOptionsMixin, ("update:visible" | "onClose")[], "onClose" | "update:visible", vue_1.VNodeProps & vue_1.AllowedComponentProps & vue_1.ComponentCustomProps, Readonly<vue_1.ExtractPropTypes<{
|
|
36
|
+
title: {
|
|
37
|
+
type: (StringConstructor | FunctionConstructor)[];
|
|
38
|
+
default: string;
|
|
39
|
+
};
|
|
40
|
+
changeSize: {
|
|
41
|
+
type: BooleanConstructor;
|
|
42
|
+
default: boolean;
|
|
43
|
+
};
|
|
44
|
+
closable: {
|
|
45
|
+
type: BooleanConstructor;
|
|
46
|
+
default: boolean;
|
|
47
|
+
};
|
|
48
|
+
modalWidth: {
|
|
49
|
+
type: StringConstructor;
|
|
50
|
+
default: string;
|
|
51
|
+
};
|
|
52
|
+
modalHeight: {
|
|
53
|
+
type: StringConstructor;
|
|
54
|
+
default: string;
|
|
55
|
+
};
|
|
56
|
+
handleOk: {
|
|
57
|
+
type: FunctionConstructor;
|
|
58
|
+
default: () => {};
|
|
59
|
+
};
|
|
60
|
+
cancel: {
|
|
61
|
+
type: FunctionConstructor;
|
|
62
|
+
default: () => {};
|
|
63
|
+
};
|
|
64
|
+
visible: {
|
|
65
|
+
type: BooleanConstructor;
|
|
66
|
+
default: boolean;
|
|
67
|
+
};
|
|
68
|
+
}>> & {
|
|
69
|
+
"onUpdate:visible"?: ((...args: any[]) => any) | undefined;
|
|
70
|
+
onOnClose?: ((...args: any[]) => any) | undefined;
|
|
71
|
+
}, {
|
|
72
|
+
closable: boolean;
|
|
73
|
+
title: string | Function;
|
|
74
|
+
visible: boolean;
|
|
75
|
+
modalWidth: string;
|
|
76
|
+
modalHeight: string;
|
|
77
|
+
handleOk: Function;
|
|
78
|
+
changeSize: boolean;
|
|
79
|
+
cancel: Function;
|
|
80
|
+
}>;
|
|
81
|
+
export default _default;
|
|
82
|
+
import vue_1 = require("vue");
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export const __esModule: true;
|
|
2
|
+
export const SearchMenu: vue_1.DefineComponent<{
|
|
3
|
+
childKey: {
|
|
4
|
+
type: StringConstructor;
|
|
5
|
+
default: string;
|
|
6
|
+
};
|
|
7
|
+
options: {
|
|
8
|
+
type: ArrayConstructor;
|
|
9
|
+
default: () => never[];
|
|
10
|
+
};
|
|
11
|
+
labelKey: {
|
|
12
|
+
type: StringConstructor;
|
|
13
|
+
default: string;
|
|
14
|
+
};
|
|
15
|
+
valueKey: {
|
|
16
|
+
type: StringConstructor;
|
|
17
|
+
default: string;
|
|
18
|
+
};
|
|
19
|
+
currentNode: {
|
|
20
|
+
type: ObjectConstructor;
|
|
21
|
+
};
|
|
22
|
+
cursorNode: {
|
|
23
|
+
type: ObjectConstructor;
|
|
24
|
+
};
|
|
25
|
+
}, () => any, any, {}, {}, vue_1.ComponentOptionsMixin, vue_1.ComponentOptionsMixin, ("nodeClick" | "changeCursor")[], "nodeClick" | "changeCursor", vue_1.VNodeProps & vue_1.AllowedComponentProps & vue_1.ComponentCustomProps, Readonly<vue_1.ExtractPropTypes<{
|
|
26
|
+
childKey: {
|
|
27
|
+
type: StringConstructor;
|
|
28
|
+
default: string;
|
|
29
|
+
};
|
|
30
|
+
options: {
|
|
31
|
+
type: ArrayConstructor;
|
|
32
|
+
default: () => never[];
|
|
33
|
+
};
|
|
34
|
+
labelKey: {
|
|
35
|
+
type: StringConstructor;
|
|
36
|
+
default: string;
|
|
37
|
+
};
|
|
38
|
+
valueKey: {
|
|
39
|
+
type: StringConstructor;
|
|
40
|
+
default: string;
|
|
41
|
+
};
|
|
42
|
+
currentNode: {
|
|
43
|
+
type: ObjectConstructor;
|
|
44
|
+
};
|
|
45
|
+
cursorNode: {
|
|
46
|
+
type: ObjectConstructor;
|
|
47
|
+
};
|
|
48
|
+
}>> & {
|
|
49
|
+
onNodeClick?: ((...args: any[]) => any) | undefined;
|
|
50
|
+
onChangeCursor?: ((...args: any[]) => any) | undefined;
|
|
51
|
+
}, {
|
|
52
|
+
options: unknown[];
|
|
53
|
+
valueKey: string;
|
|
54
|
+
childKey: string;
|
|
55
|
+
labelKey: string;
|
|
56
|
+
}>;
|
|
57
|
+
import vue_1 = require("vue");
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export const __esModule: true;
|
|
2
|
+
export const SearchMenu: vue_1.DefineComponent<{
|
|
3
|
+
childKey: {
|
|
4
|
+
type: StringConstructor;
|
|
5
|
+
default: string;
|
|
6
|
+
};
|
|
7
|
+
options: {
|
|
8
|
+
type: ArrayConstructor;
|
|
9
|
+
default: () => never[];
|
|
10
|
+
};
|
|
11
|
+
labelKey: {
|
|
12
|
+
type: StringConstructor;
|
|
13
|
+
default: string;
|
|
14
|
+
};
|
|
15
|
+
valueKey: {
|
|
16
|
+
type: StringConstructor;
|
|
17
|
+
default: string;
|
|
18
|
+
};
|
|
19
|
+
currentNode: {
|
|
20
|
+
type: ObjectConstructor;
|
|
21
|
+
};
|
|
22
|
+
cursorNode: {
|
|
23
|
+
type: ObjectConstructor;
|
|
24
|
+
};
|
|
25
|
+
}, () => any, any, {}, {}, vue_1.ComponentOptionsMixin, vue_1.ComponentOptionsMixin, ("nodeClick" | "changeCursor")[], "nodeClick" | "changeCursor", vue_1.VNodeProps & vue_1.AllowedComponentProps & vue_1.ComponentCustomProps, Readonly<vue_1.ExtractPropTypes<{
|
|
26
|
+
childKey: {
|
|
27
|
+
type: StringConstructor;
|
|
28
|
+
default: string;
|
|
29
|
+
};
|
|
30
|
+
options: {
|
|
31
|
+
type: ArrayConstructor;
|
|
32
|
+
default: () => never[];
|
|
33
|
+
};
|
|
34
|
+
labelKey: {
|
|
35
|
+
type: StringConstructor;
|
|
36
|
+
default: string;
|
|
37
|
+
};
|
|
38
|
+
valueKey: {
|
|
39
|
+
type: StringConstructor;
|
|
40
|
+
default: string;
|
|
41
|
+
};
|
|
42
|
+
currentNode: {
|
|
43
|
+
type: ObjectConstructor;
|
|
44
|
+
};
|
|
45
|
+
cursorNode: {
|
|
46
|
+
type: ObjectConstructor;
|
|
47
|
+
};
|
|
48
|
+
}>> & {
|
|
49
|
+
onNodeClick?: ((...args: any[]) => any) | undefined;
|
|
50
|
+
onChangeCursor?: ((...args: any[]) => any) | undefined;
|
|
51
|
+
}, {
|
|
52
|
+
options: unknown[];
|
|
53
|
+
valueKey: string;
|
|
54
|
+
childKey: string;
|
|
55
|
+
labelKey: string;
|
|
56
|
+
}>;
|
|
57
|
+
import vue_1 = require("vue");
|
|
@@ -3,4 +3,4 @@ import { ComputedRef, InjectionKey, Ref } from 'vue';
|
|
|
3
3
|
export declare const InjectionSearchCascaderLoadingNode: InjectionKey<Ref<Nullable<AnyObject>>>;
|
|
4
4
|
export declare const InjectionSearchCascaderValue: InjectionKey<ComputedRef<AnyObject[] | string>>;
|
|
5
5
|
export declare const InjectionSearchCascaderCheckAbleLevel: InjectionKey<ComputedRef<'last' | number>>;
|
|
6
|
-
export declare const InjectionKeyboardEventBus: InjectionKey<
|
|
6
|
+
export declare const InjectionKeyboardEventBus: InjectionKey<AnyObject>;
|
|
@@ -49,6 +49,12 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
49
49
|
type: BooleanConstructor;
|
|
50
50
|
default: boolean;
|
|
51
51
|
};
|
|
52
|
+
treeSetting: {
|
|
53
|
+
type: import("vue").PropType<import("naive-ui/es/tree/src/interface").TreeOptionBase & {
|
|
54
|
+
[k: string]: unknown;
|
|
55
|
+
} & import("../../../es/shared/types").AnyObject>;
|
|
56
|
+
default: () => {};
|
|
57
|
+
};
|
|
52
58
|
queryLoadChildData: {
|
|
53
59
|
type: import("vue").PropType<(node: import("naive-ui").TreeOption) => Promise<import("../../../es/shared/types").AnyObject>>;
|
|
54
60
|
default: undefined;
|
|
@@ -108,6 +114,12 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
108
114
|
type: BooleanConstructor;
|
|
109
115
|
default: boolean;
|
|
110
116
|
};
|
|
117
|
+
treeSetting: {
|
|
118
|
+
type: import("vue").PropType<import("naive-ui/es/tree/src/interface").TreeOptionBase & {
|
|
119
|
+
[k: string]: unknown;
|
|
120
|
+
} & import("../../../es/shared/types").AnyObject>;
|
|
121
|
+
default: () => {};
|
|
122
|
+
};
|
|
111
123
|
queryLoadChildData: {
|
|
112
124
|
type: import("vue").PropType<(node: import("naive-ui").TreeOption) => Promise<import("../../../es/shared/types").AnyObject>>;
|
|
113
125
|
default: undefined;
|
|
@@ -118,8 +130,9 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
118
130
|
};
|
|
119
131
|
}>> & {
|
|
120
132
|
onCheck?: ((...args: any[]) => any) | undefined;
|
|
133
|
+
onCheckWithLevel?: ((...args: any[]) => any) | undefined;
|
|
121
134
|
}>>;
|
|
122
|
-
emit: (event: "check", ...args: any[]) => void;
|
|
135
|
+
emit: (event: "check" | "checkWithLevel", ...args: any[]) => void;
|
|
123
136
|
keyword: import("vue").Ref<string>;
|
|
124
137
|
checkedAll: import("vue").Ref<boolean>;
|
|
125
138
|
checkedKeys: import("vue").Ref<(string | number)[]>;
|
|
@@ -140,6 +153,7 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
140
153
|
key: string | number;
|
|
141
154
|
name: string;
|
|
142
155
|
}[]>;
|
|
156
|
+
isSearch: import("vue").Ref<boolean>;
|
|
143
157
|
temp: import("naive-ui").TreeOption[];
|
|
144
158
|
allCheckedKeys: (string | number)[];
|
|
145
159
|
isRemote: import("vue").ComputedRef<boolean>;
|
|
@@ -153,6 +167,7 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
153
167
|
transformParentNodeName: (trees: import("naive-ui").TreeOption[], temp: any) => import("naive-ui").TreeOption[];
|
|
154
168
|
setAllCheckedKeys: (tree: import("naive-ui").TreeOption[]) => void;
|
|
155
169
|
onSearch: () => Promise<void>;
|
|
170
|
+
onClear: () => void;
|
|
156
171
|
setTreeCheckd: (tree: import("naive-ui").TreeOption[], checked: boolean) => void;
|
|
157
172
|
checkedAllChange: (checked: boolean) => void;
|
|
158
173
|
uniq: (arr: {
|
|
@@ -242,7 +257,7 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
242
257
|
readonly privateShow: boolean;
|
|
243
258
|
}>;
|
|
244
259
|
CloseCircleSharp: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
245
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "check"[], "check", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
260
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("check" | "checkWithLevel")[], "check" | "checkWithLevel", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
246
261
|
defaultList: {
|
|
247
262
|
type: import("vue").PropType<((string | number) | {
|
|
248
263
|
[key: string]: any;
|
|
@@ -292,6 +307,12 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
292
307
|
type: BooleanConstructor;
|
|
293
308
|
default: boolean;
|
|
294
309
|
};
|
|
310
|
+
treeSetting: {
|
|
311
|
+
type: import("vue").PropType<import("naive-ui/es/tree/src/interface").TreeOptionBase & {
|
|
312
|
+
[k: string]: unknown;
|
|
313
|
+
} & import("../../../es/shared/types").AnyObject>;
|
|
314
|
+
default: () => {};
|
|
315
|
+
};
|
|
295
316
|
queryLoadChildData: {
|
|
296
317
|
type: import("vue").PropType<(node: import("naive-ui").TreeOption) => Promise<import("../../../es/shared/types").AnyObject>>;
|
|
297
318
|
default: undefined;
|
|
@@ -302,6 +323,7 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
302
323
|
};
|
|
303
324
|
}>> & {
|
|
304
325
|
onCheck?: ((...args: any[]) => any) | undefined;
|
|
326
|
+
onCheckWithLevel?: ((...args: any[]) => any) | undefined;
|
|
305
327
|
}, {
|
|
306
328
|
data: (import("naive-ui/es/tree/src/interface").TreeOptionBase & {
|
|
307
329
|
[k: string]: unknown;
|
|
@@ -325,6 +347,9 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
325
347
|
showCount: boolean;
|
|
326
348
|
showClear: boolean;
|
|
327
349
|
multiple: boolean;
|
|
350
|
+
treeSetting: import("naive-ui/es/tree/src/interface").TreeOptionBase & {
|
|
351
|
+
[k: string]: unknown;
|
|
352
|
+
} & import("../../../es/shared/types").AnyObject;
|
|
328
353
|
queryLoadChildData: (node: import("naive-ui").TreeOption) => Promise<import("../../../es/shared/types").AnyObject>;
|
|
329
354
|
queryTreeSearch: (keyWork: string) => Promise<import("../../../es/shared/types").AnyObject[]>;
|
|
330
355
|
}>>;
|
|
@@ -54,6 +54,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
54
54
|
type: BooleanConstructor;
|
|
55
55
|
default: boolean;
|
|
56
56
|
};
|
|
57
|
+
treeSetting: {
|
|
58
|
+
type: PropType<ITreeOption>;
|
|
59
|
+
default: () => {};
|
|
60
|
+
};
|
|
57
61
|
queryLoadChildData: {
|
|
58
62
|
type: PropType<(node: TreeOption) => Promise<AnyObject>>;
|
|
59
63
|
default: undefined;
|
|
@@ -100,6 +104,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
100
104
|
type: BooleanConstructor;
|
|
101
105
|
default: boolean;
|
|
102
106
|
};
|
|
107
|
+
treeSetting: {
|
|
108
|
+
type: PropType<ITreeOption>;
|
|
109
|
+
default: () => {};
|
|
110
|
+
};
|
|
103
111
|
queryLoadChildData: {
|
|
104
112
|
type: PropType<(node: TreeOption) => Promise<AnyObject>>;
|
|
105
113
|
default: undefined;
|
|
@@ -110,8 +118,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
110
118
|
};
|
|
111
119
|
}>> & {
|
|
112
120
|
onCheck?: ((...args: any[]) => any) | undefined;
|
|
121
|
+
onCheckWithLevel?: ((...args: any[]) => any) | undefined;
|
|
113
122
|
}>>;
|
|
114
|
-
emit: (event: "check", ...args: any[]) => void;
|
|
123
|
+
emit: (event: "check" | "checkWithLevel", ...args: any[]) => void;
|
|
115
124
|
keyword: import("vue").Ref<string>;
|
|
116
125
|
checkedAll: import("vue").Ref<boolean>;
|
|
117
126
|
checkedKeys: import("vue").Ref<IKey[]>;
|
|
@@ -132,6 +141,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
132
141
|
key: IKey;
|
|
133
142
|
name: string;
|
|
134
143
|
}[]>;
|
|
144
|
+
isSearch: import("vue").Ref<boolean>;
|
|
135
145
|
temp: TreeOption[];
|
|
136
146
|
allCheckedKeys: IKey[];
|
|
137
147
|
isRemote: import("vue").ComputedRef<boolean>;
|
|
@@ -145,6 +155,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
145
155
|
transformParentNodeName: (trees: TreeOption[], temp: any) => TreeOption[];
|
|
146
156
|
setAllCheckedKeys: (tree: TreeOption[]) => void;
|
|
147
157
|
onSearch: () => Promise<void>;
|
|
158
|
+
onClear: () => void;
|
|
148
159
|
setTreeCheckd: (tree: TreeOption[], checked: boolean) => void;
|
|
149
160
|
checkedAllChange: (checked: boolean) => void;
|
|
150
161
|
uniq: (arr: ITag[]) => ITag[];
|
|
@@ -222,7 +233,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
222
233
|
readonly privateShow: boolean;
|
|
223
234
|
}>;
|
|
224
235
|
CloseCircleSharp: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
225
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "check"[], "check", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
236
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("check" | "checkWithLevel")[], "check" | "checkWithLevel", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
226
237
|
defaultList: {
|
|
227
238
|
type: PropType<(IKey | ITag)[]>;
|
|
228
239
|
default: () => never[];
|
|
@@ -259,6 +270,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
259
270
|
type: BooleanConstructor;
|
|
260
271
|
default: boolean;
|
|
261
272
|
};
|
|
273
|
+
treeSetting: {
|
|
274
|
+
type: PropType<ITreeOption>;
|
|
275
|
+
default: () => {};
|
|
276
|
+
};
|
|
262
277
|
queryLoadChildData: {
|
|
263
278
|
type: PropType<(node: TreeOption) => Promise<AnyObject>>;
|
|
264
279
|
default: undefined;
|
|
@@ -269,6 +284,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
269
284
|
};
|
|
270
285
|
}>> & {
|
|
271
286
|
onCheck?: ((...args: any[]) => any) | undefined;
|
|
287
|
+
onCheckWithLevel?: ((...args: any[]) => any) | undefined;
|
|
272
288
|
}, {
|
|
273
289
|
data: ITreeOption[];
|
|
274
290
|
defaultList: (IKey | ITag)[];
|
|
@@ -279,6 +295,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
279
295
|
showCount: boolean;
|
|
280
296
|
showClear: boolean;
|
|
281
297
|
multiple: boolean;
|
|
298
|
+
treeSetting: ITreeOption;
|
|
282
299
|
queryLoadChildData: (node: TreeOption) => Promise<AnyObject>;
|
|
283
300
|
queryTreeSearch: (keyWork: string) => Promise<Array<AnyObject>>;
|
|
284
301
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as l,computed as t,watch as a,openBlock as n,createBlock as
|
|
1
|
+
import{defineComponent as e,ref as l,computed as t,watch as a,openBlock as n,createBlock as u,unref as o,withCtx as i,createVNode as r,withKeys as c,createTextVNode as d,toDisplayString as s,withDirectives as h,vShow as v,createCommentVNode as p,mergeProps as f,createElementBlock as y,createElementVNode as k,Fragment as m,renderList as g}from"vue";import{NGrid as b,NGi as _,NSpace as w,NInputGroup as C,NInput as x,NButton as L,NCheckbox as j,NTree as T,NIcon as $,NTooltip as S}from"naive-ui";import{CloseCircleSharp as q}from"@vicons/ionicons5";import{filterTree as B,getExpandedKeys as D}from"./utils/index.js";import{cloneDeep as P}from"lodash-es";const U={key:0},N={class:"c-select-person__scroll",style:{height:"342px"}};var K=e({__name:"SelectPerson",props:{defaultList:{type:Array,default:()=>[]},data:{type:Array,default:()=>[]},searchPlaceholder:{type:String,default:"输入关键字搜索"},searchButtonText:{type:String,default:"搜索"},wordbook:{type:Object,default:()=>({})},wordbookChild:{type:Object,default:()=>({})},showCount:{type:Boolean,default:!0},showClear:{type:Boolean,default:!0},multiple:{type:Boolean,default:!0},treeSetting:{type:Object,default:()=>({})},queryLoadChildData:{type:Function,default:void 0},queryTreeSearch:{type:Function,default:()=>Promise.resolve([])}},emits:["check","checkWithLevel"],setup(e,{emit:K}){const O=e,A=l(""),E=l(!1),F=l([]),I=l([]),W=l([]),R=l([]),z=l(!0),G=P(function e(l,t){return l&&0!==l.length?l.map((l=>{var a;const n=X(l),u=t?`${n}/${t}`:n;return{...l,tempTitle:t,children:(null==(a=l.children)?void 0:a.length)?e(null==l?void 0:l.children,u):[]}})):[]}(O.data,""));let H=[];const J=t((()=>!!O.queryLoadChildData));async function M(e){if(O.queryLoadChildData){const l=await O.queryLoadChildData(e);return l.children&&(l.children=l.children.map((e=>({...e,tempTitle:l.tempTitle?`${l.title}/${l.tempTitle}`:l.title})))),l}return e}function Q(e){var l;(null==(l=e.children)?void 0:l.every((e=>e.disabled)))&&(e.disabled=!0)}function V({option:e}){var l;if((null==(l=e.children)?void 0:l.length)||J.value&&!(null==e?void 0:e.isLeaf)){const l=O.wordbook.user_count_obj&&e[O.wordbook.user_count_obj]||"",t=l?`(${l})`:"";return r("span",null,[`${e.title}${t}`])}return r(S,{trigger:"hover"},{default:()=>r("span",null,[e.title]),trigger:()=>r("span",null,[e.title])})}function X(e){return e[O.wordbookChild.user_name_obj]||e[O.wordbook.parent_name_obj]||e.orgName||e.title||""}function Y(e){var l;for(let t=0,a=e.length;t<a;t++){const a=e[t];(null==(l=a.children)?void 0:l.length)&&Y(a.children),a.disabled||a.children||H.push(a.key)}}async function Z(){z.value=!A.value.trim(),J.value?W.value=await O.queryTreeSearch(A.value):(W.value=B(G,A.value),H=[],Y(W.value),ue()),I.value=W.value.length&&A.value?D(W.value):[]}function ee(){setTimeout((()=>{Z()}))}function le(e,l){for(let t=0,a=e.length;t<a;t++){const a=e[t];if(!a.disabled&&(!a.children||a.isLeaf)&&(l&&!F.value.includes(a.key)&&F.value.push(a.key),!l)){const e=F.value.findIndex((e=>e===a.key));F.value.splice(e,1)}a.children&&le(a.children,l)}}function te(e){le(W.value,e)}function ae(e){var l;for(let t=0,a=e.length;t<a;t++){const a=e[t];F.value.includes(a.key)&&R.value.push({key:a.key,name:a.title,parentName:a.tempTitle}),(null==(l=a.children)?void 0:l.length)&&ae(a.children)}}function ne(e){F.value=e}function ue(){E.value=H.every((e=>R.value.findIndex((l=>l.key===e))>-1))}function oe(){F.value=[]}return function e(l){var t,a;for(let n=0,u=l.length;n<u;n++){const u=l[n];u.title=X(u),u.key||(u.key=u[O.wordbookChild.user_id_obj]||u[O.wordbook.parent_id_obj]||Date.now()),(null==(t=u.children)?void 0:t.length)?(e(u.children),Q(u)):0===(null==(a=u.children)?void 0:a.length)&&Reflect.deleteProperty(u,"children"),u.disabled||u.children||H.push(u.key)}}(G),W.value=G,O.defaultList.length>0&&(J.value?(O.defaultList.forEach((e=>F.value.push(e.key))),R.value=P(O.defaultList)):(O.defaultList.forEach((e=>F.value.push(e))),ae(G))),a((()=>F),(e=>{R.value=[],e.value.length&&ae(J.value?W.value:G),ue();const l=R.value.filter((l=>e.value.includes(l.key)));K("check",e.value),K("checkWithLevel",l)}),{deep:!0}),(l,t)=>(n(),u(o(b),{cols:2,class:"c-select-person"},{default:i((()=>[r(o(_),null,{default:i((()=>[r(o(w),{vertical:"",style:{"padding-right":"12px","border-right":"1px solid #e8e8e8"}},{default:i((()=>[r(o(C),{style:{"margin-bottom":"12px"}},{default:i((()=>[r(o(x),{clearable:"",value:A.value,"onUpdate:value":t[0]||(t[0]=e=>A.value=e),placeholder:e.searchPlaceholder,onClear:ee,onKeyup:c(Z,["enter"])},null,8,["value","placeholder","onKeyup"]),r(o(L),{type:"primary",onClick:Z},{default:i((()=>[d(s(e.searchButtonText),1)])),_:1})])),_:1}),e.multiple&&z.value?h((n(),u(o(j),{key:0,checked:E.value,"onUpdate:checked":[t[1]||(t[1]=e=>E.value=e),te]},{default:i((()=>[d(" 全选 ")])),_:1},8,["checked"])),[[v,o(H).length<1e3]]):p("v-if",!0),r(o(T),f({"virtual-scroll":"",class:"c-select-person__scroll","checked-keys":F.value,"expanded-keys":I.value,"onUpdate:expanded-keys":t[2]||(t[2]=e=>I.value=e),checkable:e.multiple,cascade:"","allow-checking-not-loaded":"",selectable:!e.multiple,"selected-keys":F.value,"onUpdate:selected-keys":t[3]||(t[3]=e=>F.value=e),data:W.value,"check-strategy":"child","render-label":V},e.treeSetting,{"onUpdate:checkedKeys":ne,onLoad:M}),null,16,["checked-keys","expanded-keys","checkable","selectable","selected-keys","data"])])),_:1})])),_:1}),r(o(_),null,{default:i((()=>[r(o(w),{vertical:"",style:{"padding-left":"12px"}},{default:i((()=>[r(o(w),{justify:"space-between",style:{"margin-bottom":"20px"}},{default:i((()=>[e.showCount?(n(),y("span",U,"已选择:"+s(R.value.length),1)):p("v-if",!0),e.showClear?(n(),y("span",{key:1,class:"c-select-person__clear-btn",onClick:oe},"清空")):p("v-if",!0)])),_:1}),k("div",N,[(n(!0),y(m,null,g(R.value,(e=>(n(),y("span",{class:"c-select-person__tag-item",key:e.key},[d(s(e.name)+" "+s(e.parentName?`(${e.parentName})`:"")+" ",1),r(o($),{class:"tag-close",component:o(q),onClick:l=>function(e){F.value=F.value.filter((l=>l!==e.key))}(e)},null,8,["component","onClick"])])))),128))])])),_:1})])),_:1})])),_:1}))}});export{K as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cloneDeep as
|
|
1
|
+
import{cloneDeep as n}from"lodash-es";function i(i,r){const c=n(i);return r.trim()?function(n,i){return e(n,[]).filter((n=>{var l;return null==(l=n.title)?void 0:l.includes(i.trim())}))}(c,r):(l(c,r),t(c))}function l(n,i){n.forEach((n=>{var e,t;if(n.visible=null==(e=n.title)?void 0:e.includes(i.trim()),null==(t=n.children)?void 0:t.length)if(l(n.children,i),n.visible)r(n.children);else{n.children.some((n=>n.visible))&&(n.visible=!0)}}))}function e(n,i){return n.forEach((n=>{var l;(null==(l=n.children)?void 0:l.length)?e(n.children,i):i.push(n)})),i}function r(n){n.forEach((n=>{var i;n.visible=!0,(null==(i=n.children)?void 0:i.length)&&r(n.children)}))}function t(n){return n.filter((n=>{var i;return!!n.visible&&((null==(i=n.children)?void 0:i.length)&&(n.children=t(n.children)),!0)}))}function c(n){const i=[];return function n(l){for(let e=0,r=l.length;e<r;e++){const r=l[e];r.children&&(i.push(r.key),n(r.children))}}(n),i}export{i as filterTree,c as getExpandedKeys};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cnhis-design-vue",
|
|
3
|
-
"version": "3.1.42-beta.
|
|
3
|
+
"version": "3.1.42-beta.60",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"module": "./es/components/index.js",
|
|
6
6
|
"main": "./es/components/index.js",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"iOS 7",
|
|
62
62
|
"last 3 iOS versions"
|
|
63
63
|
],
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "041d621a30b73a4621fd3281bab328c4abf56768"
|
|
65
65
|
}
|