cnhis-design-vue 3.2.7-beta.12 → 3.2.7-beta.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components/classification/index.d.ts +21 -6
- package/es/components/classification/src/components/search-filter/index.vue.d.ts +21 -6
- package/es/components/classification/src/components/set-classification/index.vue.d.ts +21 -6
- package/es/components/classification/src/index.vue.d.ts +21 -6
- package/es/components/field-set/src/FieldColor.vue.d.ts +3 -3
- package/es/components/field-set/src/FieldFilter.vue.d.ts +3 -3
- package/es/components/field-set/src/FieldSet.vue.d.ts +5 -5
- package/es/components/field-set/src/components/Row.vue.d.ts +3 -3
- package/es/components/form-render/src/types/index.d.ts +1 -1
- package/es/components/form-render/src/utils/business.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +21 -6
- package/es/components/table-filter/src/components/classify-filter/components/SelectDynamic.vue.d.ts +37 -20
- package/es/components/table-filter/src/components/classify-filter/components/SelectDynamic.vue2.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +21 -6
- package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +21 -6
- package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue.d.ts +33 -18
- package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/SelectDynamicOption/index.vue.d.ts +13 -0
- package/es/components/table-filter/src/components/render-widget/components/SelectDynamicOption/index.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/index.d.ts +17 -4
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +17 -4
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
package/es/components/table-filter/src/components/classify-filter/components/SelectDynamic.vue.d.ts
CHANGED
@@ -1,10 +1,12 @@
|
|
1
|
+
import { PropType } from 'vue';
|
2
|
+
import { AnyObject } from '../../../../../../shared/types';
|
1
3
|
declare const _default: import("vue").DefineComponent<{
|
2
4
|
paramCfg: {
|
3
5
|
type: ObjectConstructor;
|
4
6
|
default: null;
|
5
7
|
};
|
6
8
|
modelValue: {
|
7
|
-
type:
|
9
|
+
type: PropType<AnyObject[]>;
|
8
10
|
default: null;
|
9
11
|
};
|
10
12
|
}, {
|
@@ -15,7 +17,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
15
17
|
default: null;
|
16
18
|
};
|
17
19
|
modelValue: {
|
18
|
-
type:
|
20
|
+
type: PropType<AnyObject[]>;
|
19
21
|
default: null;
|
20
22
|
};
|
21
23
|
}>> & {
|
@@ -23,9 +25,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
23
25
|
}>>;
|
24
26
|
getDynamicSelectData: (params: any, filterApiConfig: any) => Promise<any>;
|
25
27
|
emit: (event: "update:modelValue", ...args: any[]) => void;
|
28
|
+
selectDynamicRef: any;
|
26
29
|
isLoading: import("vue").Ref<boolean>;
|
27
|
-
filterApiConfig:
|
28
|
-
classifyFilterList: import("vue").Ref<
|
30
|
+
filterApiConfig: AnyObject;
|
31
|
+
classifyFilterList: import("vue").Ref<AnyObject[]>;
|
29
32
|
totalPage: import("vue").Ref<number>;
|
30
33
|
menuProps: {
|
31
34
|
class: string;
|
@@ -38,8 +41,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
38
41
|
isMultiple: import("vue").ComputedRef<boolean>;
|
39
42
|
dynamicOptionInfos: import("vue").ComputedRef<any>;
|
40
43
|
isLastPage: import("vue").ComputedRef<boolean>;
|
41
|
-
originList: import("vue").ComputedRef<any>;
|
42
|
-
valueCp: import("vue").ComputedRef<any>;
|
44
|
+
originList: import("vue").ComputedRef<any[]>;
|
45
|
+
valueCp: import("vue").ComputedRef<string | any[]>;
|
43
46
|
isInitRequest: import("vue").ComputedRef<boolean>;
|
44
47
|
setOptionActive: (selectIds: string[]) => void;
|
45
48
|
handleUpdateSelect: (value: string[] | null) => void;
|
@@ -55,18 +58,23 @@ declare const _default: import("vue").DefineComponent<{
|
|
55
58
|
[key: string]: any;
|
56
59
|
}>;
|
57
60
|
init: () => void;
|
61
|
+
saveDynamicBaseList: (selectValue: any[] | null) => void;
|
58
62
|
NSelect: any;
|
59
63
|
SelectDynamicOption: import("vue").DefineComponent<{
|
64
|
+
oldValue: {
|
65
|
+
type: PropType<AnyObject[]>;
|
66
|
+
default: () => never[];
|
67
|
+
};
|
60
68
|
dynamicOptionInfo: {
|
61
|
-
type:
|
69
|
+
type: PropType<AnyObject>;
|
62
70
|
default: () => {};
|
63
71
|
};
|
64
72
|
fieldTitleList: {
|
65
|
-
type:
|
73
|
+
type: PropType<AnyObject[]>;
|
66
74
|
default: () => never[];
|
67
75
|
};
|
68
76
|
optionList: {
|
69
|
-
type:
|
77
|
+
type: PropType<AnyObject[]>;
|
70
78
|
default: () => never[];
|
71
79
|
};
|
72
80
|
isMultiple: {
|
@@ -92,16 +100,20 @@ declare const _default: import("vue").DefineComponent<{
|
|
92
100
|
}, {
|
93
101
|
selectMinWidth: number;
|
94
102
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
103
|
+
oldValue: {
|
104
|
+
type: PropType<AnyObject[]>;
|
105
|
+
default: () => never[];
|
106
|
+
};
|
95
107
|
dynamicOptionInfo: {
|
96
|
-
type:
|
108
|
+
type: PropType<AnyObject>;
|
97
109
|
default: () => {};
|
98
110
|
};
|
99
111
|
fieldTitleList: {
|
100
|
-
type:
|
112
|
+
type: PropType<AnyObject[]>;
|
101
113
|
default: () => never[];
|
102
114
|
};
|
103
115
|
optionList: {
|
104
|
-
type:
|
116
|
+
type: PropType<AnyObject[]>;
|
105
117
|
default: () => never[];
|
106
118
|
};
|
107
119
|
isMultiple: {
|
@@ -180,16 +192,20 @@ declare const _default: import("vue").DefineComponent<{
|
|
180
192
|
ArrowBack: 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<{}>>, {}>;
|
181
193
|
ArrowForward: 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<{}>>, {}>;
|
182
194
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("updateSelect" | "updatePage")[], "updateSelect" | "updatePage", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
195
|
+
oldValue: {
|
196
|
+
type: PropType<AnyObject[]>;
|
197
|
+
default: () => never[];
|
198
|
+
};
|
183
199
|
dynamicOptionInfo: {
|
184
|
-
type:
|
200
|
+
type: PropType<AnyObject>;
|
185
201
|
default: () => {};
|
186
202
|
};
|
187
203
|
fieldTitleList: {
|
188
|
-
type:
|
204
|
+
type: PropType<AnyObject[]>;
|
189
205
|
default: () => never[];
|
190
206
|
};
|
191
207
|
optionList: {
|
192
|
-
type:
|
208
|
+
type: PropType<AnyObject[]>;
|
193
209
|
default: () => never[];
|
194
210
|
};
|
195
211
|
isMultiple: {
|
@@ -218,9 +234,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
218
234
|
}, {
|
219
235
|
isMultiple: boolean;
|
220
236
|
loading: boolean;
|
221
|
-
|
222
|
-
|
223
|
-
|
237
|
+
oldValue: AnyObject[];
|
238
|
+
dynamicOptionInfo: AnyObject;
|
239
|
+
fieldTitleList: AnyObject[];
|
240
|
+
optionList: AnyObject[];
|
224
241
|
curPage: number;
|
225
242
|
isLastPage: boolean;
|
226
243
|
isShowWhole: boolean;
|
@@ -231,13 +248,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
231
248
|
default: null;
|
232
249
|
};
|
233
250
|
modelValue: {
|
234
|
-
type:
|
251
|
+
type: PropType<AnyObject[]>;
|
235
252
|
default: null;
|
236
253
|
};
|
237
254
|
}>> & {
|
238
255
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
239
256
|
}, {
|
240
|
-
modelValue:
|
257
|
+
modelValue: AnyObject[];
|
241
258
|
paramCfg: Record<string, any>;
|
242
259
|
}>;
|
243
260
|
export default _default;
|
package/es/components/table-filter/src/components/classify-filter/components/SelectDynamic.vue2.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,ref as a,inject as l,computed as t,
|
1
|
+
import{defineComponent as e,ref as a,inject as l,computed as t,openBlock as u,createBlock as n,unref as o,isRef as i,withModifiers as r,withCtx as s,createVNode as v,h as c}from"vue";import{useMessage as d,NSelect as p,NTag as f}from"naive-ui";import{WidgetOptionEnums as m,WidgetValEnums as y}from"../../../types/enums.js";import{useDebounceFn as g}from"@vueuse/core";import h from"../../../hooks/useAsyncData.js";import{InjectionFilterApiConfig as V,InjectionClassifyFilterList as w}from"../../../constants/index.js";import{judgmentVariable as k}from"../../render-widget/helpers/setDefaultValue.js";import b from"../../render-widget/components/SelectDynamicOption/index.vue.js";import{uniqBy as L,isEqual as O}from"lodash-es";var C=e({__name:"SelectDynamic",props:{paramCfg:{type:Object,default:null},modelValue:{type:Array,default:null}},emits:["update:modelValue"],setup(e,{emit:C}){const S=e,A=d(),{getDynamicSelectData:j}=h(),P=a(null),D=a(!1),x=l(V),I=l(w),_=a(0),K={class:"select-dynamic-popover"},T=a(1),E=a(),U=a([]),M=a(),$=t((()=>{var e;return null==(e=S.paramCfg)?void 0:e.optionSetting})),B=t((()=>$.value===m.MULTIPLE)),F=t((()=>{const{dynamicOptionInfo:e={}}=S.paramCfg.optionInfo;return e})),J=t((()=>_.value>0&&T.value>=_.value)),N=t((()=>{let e=[];const a=I.value.find((e=>e.key===S.paramCfg.p_name));return a&&a.value&&(e=a.dynamicBaseList||[]),L([...e,...U.value],"value")})),H=t((()=>{var e;if(Array.isArray(S.modelValue)&&S.modelValue.length>0){const e=S.modelValue;if(W(e),!B.value&&1==e.length){const a=N.value.find((a=>a.value===e[0]));return JSON.stringify(a)}return N.value.filter((a=>e.includes(a.value)))}return W([]),null!=(e=S.modelValue)?e:null})),R=t((()=>{if(Object.keys(F.value).length>0){const{defaultParams:e=[]}=F.value;return!k(e)}return!0}));function W(e){U.value.forEach((a=>{a.actived=!1,Array.isArray(e)&&e.includes(a.value)&&(a.actived=!0)}))}function q(e){var a;const{defaultValue:l}=S.paramCfg._rawData;(null==(a=null==l?void 0:l.linkageFieldKeys)?void 0:a.length)>0&&l.linkageFieldKeys.forEach((e=>{const a=I.value.find((a=>a.key===e));a&&a.value&&(a.value=a.presetVal=null)})),O(S.modelValue,e)||(C("update:modelValue",e),ae(e))}async function z(e){var a;T.value=e,null==(a=null==P?void 0:P.value)||a.focus(),await G(M.value,T.value)}async function G(e,a){try{if(Object.keys(F.value).length>0){const{autograph:l,dataSourceId:t,dataSourceType:u,filterKeys:n,defaultParams:o=[],showKeys:i,valueKey:r}=F.value;let s={wordbookId:t,autograph:l,wordbookType:u,fieldKeys:n,page:a};n.length>0&&(s[n[0]]=e),D.value=!0;if(k(o)){const e=o.map((e=>e.value)).filter((e=>e.includes("${")));e.map((e=>e.match(/\$\{(.+?)\}/)[1])).forEach((e=>{const a=I.value.find((a=>a.key===e));a&&a.value&&a.value!==y.WHOLE&&(s[e]=a.value)}))}let v=await j(s,x);if(v){const{fieldList:e=[],rows:a=[],total:l=0}=v.map,t=a.map((e=>({...e,label:e[i[0]],value:e[r]})));return E.value=null!=e?e:[],U.value=null!=t?t:[],_.value=l,t}}}catch(e){A.error(`异步数据源下拉框数据请求失败:${e}`),console.log(e)}finally{D.value=!1}}const Q=g((async e=>{await async function(e){M.value=e.trim(),T.value=1,await G(M.value,T.value)}(e)}),300);async function X(){Object.keys(F.value).length>0&&x&&await G("",T.value)}async function Y(){C("update:modelValue",null),ae(null),await X()}function Z(e){M.value="",e&&(T.value=1,X())}function ee({option:e,handleClose:a}){if(B.value){const l=e.value;return c(f,{style:{padding:"0 8px"},closable:!0,onClose:e=>{if(e.stopPropagation(),a(),Array.isArray(S.modelValue)&&S.modelValue.length>0){const e=S.modelValue,a=e.indexOf(l.value);a>-1&&(e.splice(a,1),C("update:modelValue",e.length>0?e:null),ae(e.length>0?e:null))}}},{default:()=>c("div",l.label)})}const l=e.value?JSON.parse(e.value):{label:""};return c("div",l.label)}function ae(e){let a=[];Array.isArray(e)&&e.length>0&&(B.value||1!=e.length||(a=N.value.filter((a=>a.value===e[0]))),a=N.value.filter((a=>e.includes(a.value))));const l=I.value.find((e=>e.key===S.paramCfg.p_name));l&&l.value&&(l.dynamicBaseList=a)}return R.value&&X(),(e,a)=>(u(),n(o(p),{id:"select-dynamic-popover",ref_key:"selectDynamicRef",ref:P,style:{width:"200px"},value:o(H),"onUpdate:value":a[0]||(a[0]=e=>i(H)?H.value=e:null),remote:"",clearable:"",filterable:"",maxTagCount:"responsive",loading:D.value,multiple:o(B),"menu-props":K,"render-tag":ee,onSearch:o(Q),onClear:Y,"onUpdate:show":Z,onClick:a[1]||(a[1]=r((()=>{}),["stop"]))},{empty:s((()=>[v(b,{oldValue:S.modelValue,dynamicOptionInfo:o(F),fieldTitleList:E.value,optionList:U.value,isMultiple:o(B),curPage:T.value,isLastPage:o(J),onUpdateSelect:q,onUpdatePage:z},null,8,["oldValue","dynamicOptionInfo","fieldTitleList","optionList","isMultiple","curPage","isLastPage"])])),_:1},8,["value","loading","multiple","onSearch"]))}});export{C as default};
|
@@ -353,7 +353,7 @@ declare const SelectDynamic: import("vue").DefineComponent<{
|
|
353
353
|
default: null;
|
354
354
|
};
|
355
355
|
modelValue: {
|
356
|
-
type: (
|
356
|
+
type: import("vue").PropType<import("../../../../../../shared/types").AnyObject[]>;
|
357
357
|
default: null;
|
358
358
|
};
|
359
359
|
}, {
|
@@ -364,7 +364,7 @@ declare const SelectDynamic: import("vue").DefineComponent<{
|
|
364
364
|
default: null;
|
365
365
|
};
|
366
366
|
modelValue: {
|
367
|
-
type: (
|
367
|
+
type: import("vue").PropType<import("../../../../../../shared/types").AnyObject[]>;
|
368
368
|
default: null;
|
369
369
|
};
|
370
370
|
}>> & {
|
@@ -372,6 +372,7 @@ declare const SelectDynamic: import("vue").DefineComponent<{
|
|
372
372
|
}>>;
|
373
373
|
getDynamicSelectData: (params: any, filterApiConfig: any) => Promise<any>;
|
374
374
|
emit: (event: "update:modelValue", ...args: any[]) => void;
|
375
|
+
selectDynamicRef: any;
|
375
376
|
isLoading: import("vue").Ref<boolean>;
|
376
377
|
filterApiConfig: import("../../../../../../shared/types").AnyObject;
|
377
378
|
classifyFilterList: import("vue").Ref<import("../../../../../../shared/types").AnyObject[]>;
|
@@ -387,8 +388,8 @@ declare const SelectDynamic: import("vue").DefineComponent<{
|
|
387
388
|
isMultiple: import("vue").ComputedRef<boolean>;
|
388
389
|
dynamicOptionInfos: import("vue").ComputedRef<any>;
|
389
390
|
isLastPage: import("vue").ComputedRef<boolean>;
|
390
|
-
originList: import("vue").ComputedRef<any>;
|
391
|
-
valueCp: import("vue").ComputedRef<any>;
|
391
|
+
originList: import("vue").ComputedRef<any[]>;
|
392
|
+
valueCp: import("vue").ComputedRef<string | any[]>;
|
392
393
|
isInitRequest: import("vue").ComputedRef<boolean>;
|
393
394
|
setOptionActive: (selectIds: string[]) => void;
|
394
395
|
handleUpdateSelect: (value: string[] | null) => void;
|
@@ -404,8 +405,13 @@ declare const SelectDynamic: import("vue").DefineComponent<{
|
|
404
405
|
[key: string]: any;
|
405
406
|
}>;
|
406
407
|
init: () => void;
|
408
|
+
saveDynamicBaseList: (selectValue: any[] | null) => void;
|
407
409
|
NSelect: any;
|
408
410
|
SelectDynamicOption: import("vue").DefineComponent<{
|
411
|
+
oldValue: {
|
412
|
+
type: import("vue").PropType<import("../../../../../../shared/types").AnyObject[]>;
|
413
|
+
default: () => never[];
|
414
|
+
};
|
409
415
|
dynamicOptionInfo: {
|
410
416
|
type: import("vue").PropType<import("../../../../../../shared/types").AnyObject>;
|
411
417
|
default: () => {};
|
@@ -441,6 +447,10 @@ declare const SelectDynamic: import("vue").DefineComponent<{
|
|
441
447
|
}, {
|
442
448
|
selectMinWidth: number;
|
443
449
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
450
|
+
oldValue: {
|
451
|
+
type: import("vue").PropType<import("../../../../../../shared/types").AnyObject[]>;
|
452
|
+
default: () => never[];
|
453
|
+
};
|
444
454
|
dynamicOptionInfo: {
|
445
455
|
type: import("vue").PropType<import("../../../../../../shared/types").AnyObject>;
|
446
456
|
default: () => {};
|
@@ -529,6 +539,10 @@ declare const SelectDynamic: import("vue").DefineComponent<{
|
|
529
539
|
ArrowBack: 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<{}>>, {}>;
|
530
540
|
ArrowForward: 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<{}>>, {}>;
|
531
541
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("updateSelect" | "updatePage")[], "updateSelect" | "updatePage", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
542
|
+
oldValue: {
|
543
|
+
type: import("vue").PropType<import("../../../../../../shared/types").AnyObject[]>;
|
544
|
+
default: () => never[];
|
545
|
+
};
|
532
546
|
dynamicOptionInfo: {
|
533
547
|
type: import("vue").PropType<import("../../../../../../shared/types").AnyObject>;
|
534
548
|
default: () => {};
|
@@ -567,6 +581,7 @@ declare const SelectDynamic: import("vue").DefineComponent<{
|
|
567
581
|
}, {
|
568
582
|
isMultiple: boolean;
|
569
583
|
loading: boolean;
|
584
|
+
oldValue: import("../../../../../../shared/types").AnyObject[];
|
570
585
|
dynamicOptionInfo: import("../../../../../../shared/types").AnyObject;
|
571
586
|
fieldTitleList: import("../../../../../../shared/types").AnyObject[];
|
572
587
|
optionList: import("../../../../../../shared/types").AnyObject[];
|
@@ -580,13 +595,13 @@ declare const SelectDynamic: import("vue").DefineComponent<{
|
|
580
595
|
default: null;
|
581
596
|
};
|
582
597
|
modelValue: {
|
583
|
-
type: (
|
598
|
+
type: import("vue").PropType<import("../../../../../../shared/types").AnyObject[]>;
|
584
599
|
default: null;
|
585
600
|
};
|
586
601
|
}>> & {
|
587
602
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
588
603
|
}, {
|
589
|
-
modelValue:
|
604
|
+
modelValue: import("../../../../../../shared/types").AnyObject[];
|
590
605
|
paramCfg: Record<string, any>;
|
591
606
|
}>;
|
592
607
|
declare const InputNumberGroup: import("vue").DefineComponent<{
|
@@ -520,7 +520,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
520
520
|
default: null;
|
521
521
|
};
|
522
522
|
modelValue: {
|
523
|
-
type: (
|
523
|
+
type: PropType<import("../../../../../shared/types").AnyObject[]>;
|
524
524
|
default: null;
|
525
525
|
};
|
526
526
|
}, {
|
@@ -531,7 +531,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
531
531
|
default: null;
|
532
532
|
};
|
533
533
|
modelValue: {
|
534
|
-
type: (
|
534
|
+
type: PropType<import("../../../../../shared/types").AnyObject[]>;
|
535
535
|
default: null;
|
536
536
|
};
|
537
537
|
}>> & {
|
@@ -539,6 +539,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
539
539
|
}>>;
|
540
540
|
getDynamicSelectData: (params: any, filterApiConfig: any) => Promise<any>;
|
541
541
|
emit: (event: "update:modelValue", ...args: any[]) => void;
|
542
|
+
selectDynamicRef: any;
|
542
543
|
isLoading: import("vue").Ref<boolean>;
|
543
544
|
filterApiConfig: import("../../../../../shared/types").AnyObject;
|
544
545
|
classifyFilterList: import("vue").Ref<import("../../../../../shared/types").AnyObject[]>;
|
@@ -554,8 +555,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
554
555
|
isMultiple: import("vue").ComputedRef<boolean>;
|
555
556
|
dynamicOptionInfos: import("vue").ComputedRef<any>;
|
556
557
|
isLastPage: import("vue").ComputedRef<boolean>;
|
557
|
-
originList: import("vue").ComputedRef<any>;
|
558
|
-
valueCp: import("vue").ComputedRef<any>;
|
558
|
+
originList: import("vue").ComputedRef<any[]>;
|
559
|
+
valueCp: import("vue").ComputedRef<string | any[]>;
|
559
560
|
isInitRequest: import("vue").ComputedRef<boolean>;
|
560
561
|
setOptionActive: (selectIds: string[]) => void;
|
561
562
|
handleUpdateSelect: (value: string[] | null) => void;
|
@@ -571,8 +572,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
571
572
|
[key: string]: any;
|
572
573
|
}>;
|
573
574
|
init: () => void;
|
575
|
+
saveDynamicBaseList: (selectValue: any[] | null) => void;
|
574
576
|
NSelect: any;
|
575
577
|
SelectDynamicOption: import("vue").DefineComponent<{
|
578
|
+
oldValue: {
|
579
|
+
type: PropType<import("../../../../../shared/types").AnyObject[]>;
|
580
|
+
default: () => never[];
|
581
|
+
};
|
576
582
|
dynamicOptionInfo: {
|
577
583
|
type: PropType<import("../../../../../shared/types").AnyObject>;
|
578
584
|
default: () => {};
|
@@ -608,6 +614,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
608
614
|
}, {
|
609
615
|
selectMinWidth: number;
|
610
616
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
617
|
+
oldValue: {
|
618
|
+
type: PropType<import("../../../../../shared/types").AnyObject[]>;
|
619
|
+
default: () => never[];
|
620
|
+
};
|
611
621
|
dynamicOptionInfo: {
|
612
622
|
type: PropType<import("../../../../../shared/types").AnyObject>;
|
613
623
|
default: () => {};
|
@@ -696,6 +706,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
696
706
|
ArrowBack: 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<{}>>, {}>;
|
697
707
|
ArrowForward: 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<{}>>, {}>;
|
698
708
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("updateSelect" | "updatePage")[], "updateSelect" | "updatePage", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
709
|
+
oldValue: {
|
710
|
+
type: PropType<import("../../../../../shared/types").AnyObject[]>;
|
711
|
+
default: () => never[];
|
712
|
+
};
|
699
713
|
dynamicOptionInfo: {
|
700
714
|
type: PropType<import("../../../../../shared/types").AnyObject>;
|
701
715
|
default: () => {};
|
@@ -734,6 +748,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
734
748
|
}, {
|
735
749
|
isMultiple: boolean;
|
736
750
|
loading: boolean;
|
751
|
+
oldValue: import("../../../../../shared/types").AnyObject[];
|
737
752
|
dynamicOptionInfo: import("../../../../../shared/types").AnyObject;
|
738
753
|
fieldTitleList: import("../../../../../shared/types").AnyObject[];
|
739
754
|
optionList: import("../../../../../shared/types").AnyObject[];
|
@@ -747,13 +762,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
747
762
|
default: null;
|
748
763
|
};
|
749
764
|
modelValue: {
|
750
|
-
type: (
|
765
|
+
type: PropType<import("../../../../../shared/types").AnyObject[]>;
|
751
766
|
default: null;
|
752
767
|
};
|
753
768
|
}>> & {
|
754
769
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
755
770
|
}, {
|
756
|
-
modelValue:
|
771
|
+
modelValue: import("../../../../../shared/types").AnyObject[];
|
757
772
|
paramCfg: Record<string, any>;
|
758
773
|
}>;
|
759
774
|
InputNumberGroup: import("vue").DefineComponent<{
|
package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue.d.ts
CHANGED
@@ -1,6 +1,8 @@
|
|
1
|
+
import { PropType } from 'vue';
|
2
|
+
import { AnyObject } from '../../../../../../shared/types';
|
1
3
|
declare const _default: import("vue").DefineComponent<{
|
2
4
|
value: {
|
3
|
-
type:
|
5
|
+
type: PropType<AnyObject[]>;
|
4
6
|
};
|
5
7
|
componentCfg: {
|
6
8
|
type: ObjectConstructor;
|
@@ -13,7 +15,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
13
15
|
};
|
14
16
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
15
17
|
value: {
|
16
|
-
type:
|
18
|
+
type: PropType<AnyObject[]>;
|
17
19
|
};
|
18
20
|
componentCfg: {
|
19
21
|
type: ObjectConstructor;
|
@@ -28,8 +30,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
28
30
|
emit: (event: "update:value", ...args: any[]) => void;
|
29
31
|
selectDynamicRef: any;
|
30
32
|
isLoading: import("vue").Ref<boolean>;
|
31
|
-
filterApiConfig:
|
32
|
-
searchFilterList: import("vue").Ref<
|
33
|
+
filterApiConfig: AnyObject;
|
34
|
+
searchFilterList: import("vue").Ref<AnyObject[]>;
|
33
35
|
curPage: import("vue").Ref<number>;
|
34
36
|
fieldTitleList: import("vue").Ref<any>;
|
35
37
|
selectOptions: import("vue").Ref<any[]>;
|
@@ -43,7 +45,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
43
45
|
dynamicOptionInfos: import("vue").ComputedRef<any>;
|
44
46
|
isShowWhole: import("vue").ComputedRef<any>;
|
45
47
|
isLastPage: import("vue").ComputedRef<boolean>;
|
46
|
-
valueCp: import("vue").ComputedRef<string |
|
48
|
+
valueCp: import("vue").ComputedRef<string | any[] | {
|
47
49
|
label: any;
|
48
50
|
value: any;
|
49
51
|
} | null>;
|
@@ -64,16 +66,20 @@ declare const _default: import("vue").DefineComponent<{
|
|
64
66
|
init: () => void;
|
65
67
|
NSelect: any;
|
66
68
|
SelectDynamicOption: import("vue").DefineComponent<{
|
69
|
+
oldValue: {
|
70
|
+
type: PropType<AnyObject[]>;
|
71
|
+
default: () => never[];
|
72
|
+
};
|
67
73
|
dynamicOptionInfo: {
|
68
|
-
type:
|
74
|
+
type: PropType<AnyObject>;
|
69
75
|
default: () => {};
|
70
76
|
};
|
71
77
|
fieldTitleList: {
|
72
|
-
type:
|
78
|
+
type: PropType<AnyObject[]>;
|
73
79
|
default: () => never[];
|
74
80
|
};
|
75
81
|
optionList: {
|
76
|
-
type:
|
82
|
+
type: PropType<AnyObject[]>;
|
77
83
|
default: () => never[];
|
78
84
|
};
|
79
85
|
isMultiple: {
|
@@ -99,16 +105,20 @@ declare const _default: import("vue").DefineComponent<{
|
|
99
105
|
}, {
|
100
106
|
selectMinWidth: number;
|
101
107
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
108
|
+
oldValue: {
|
109
|
+
type: PropType<AnyObject[]>;
|
110
|
+
default: () => never[];
|
111
|
+
};
|
102
112
|
dynamicOptionInfo: {
|
103
|
-
type:
|
113
|
+
type: PropType<AnyObject>;
|
104
114
|
default: () => {};
|
105
115
|
};
|
106
116
|
fieldTitleList: {
|
107
|
-
type:
|
117
|
+
type: PropType<AnyObject[]>;
|
108
118
|
default: () => never[];
|
109
119
|
};
|
110
120
|
optionList: {
|
111
|
-
type:
|
121
|
+
type: PropType<AnyObject[]>;
|
112
122
|
default: () => never[];
|
113
123
|
};
|
114
124
|
isMultiple: {
|
@@ -187,16 +197,20 @@ declare const _default: import("vue").DefineComponent<{
|
|
187
197
|
ArrowBack: 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<{}>>, {}>;
|
188
198
|
ArrowForward: 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<{}>>, {}>;
|
189
199
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("updateSelect" | "updatePage")[], "updateSelect" | "updatePage", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
200
|
+
oldValue: {
|
201
|
+
type: PropType<AnyObject[]>;
|
202
|
+
default: () => never[];
|
203
|
+
};
|
190
204
|
dynamicOptionInfo: {
|
191
|
-
type:
|
205
|
+
type: PropType<AnyObject>;
|
192
206
|
default: () => {};
|
193
207
|
};
|
194
208
|
fieldTitleList: {
|
195
|
-
type:
|
209
|
+
type: PropType<AnyObject[]>;
|
196
210
|
default: () => never[];
|
197
211
|
};
|
198
212
|
optionList: {
|
199
|
-
type:
|
213
|
+
type: PropType<AnyObject[]>;
|
200
214
|
default: () => never[];
|
201
215
|
};
|
202
216
|
isMultiple: {
|
@@ -225,16 +239,17 @@ declare const _default: import("vue").DefineComponent<{
|
|
225
239
|
}, {
|
226
240
|
isMultiple: boolean;
|
227
241
|
loading: boolean;
|
228
|
-
|
229
|
-
|
230
|
-
|
242
|
+
oldValue: AnyObject[];
|
243
|
+
dynamicOptionInfo: AnyObject;
|
244
|
+
fieldTitleList: AnyObject[];
|
245
|
+
optionList: AnyObject[];
|
231
246
|
curPage: number;
|
232
247
|
isLastPage: boolean;
|
233
248
|
isShowWhole: boolean;
|
234
249
|
}>;
|
235
250
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
236
251
|
value: {
|
237
|
-
type:
|
252
|
+
type: PropType<AnyObject[]>;
|
238
253
|
};
|
239
254
|
componentCfg: {
|
240
255
|
type: ObjectConstructor;
|
package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue2.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,useAttrs as a,ref as l,inject as t,computed as u,nextTick as n,openBlock as o,createBlock as i,unref as s,mergeProps as r,isRef as v,withCtx as c,createVNode as
|
1
|
+
import{defineComponent as e,useAttrs as a,ref as l,inject as t,computed as u,nextTick as n,openBlock as o,createBlock as i,unref as s,mergeProps as r,isRef as v,withCtx as c,createVNode as p,h as f}from"vue";import{useMessage as d,NSelect as m,NTag as y}from"naive-ui";import{useDebounceFn as g}from"@vueuse/core";import h from"../../../hooks/useAsyncData.js";import{judgmentVariable as w}from"../helpers/setDefaultValue.js";import{WholeSelectObj as O}from"../helpers/selectExtraMap.js";import{WidgetValEnums as S}from"../../../types/enums.js";import{InjectionFilterApiConfig as b,InjectionFilterSearchConfig as j}from"../../../constants/index.js";import k from"./SelectDynamicOption/index.vue.js";import{isEqual as C,cloneDeep as A}from"lodash-es";var L=e({__name:"SelectDynamic",props:{value:{type:Array},componentCfg:{type:Object}},emits:["update:value"],setup(e,{emit:L}){const N=e,P=d(),D="SQL",J="API",{getDynamicSelectData:x}=h(),I=a(),E=l(null),K=l(!1),T=t(b),$=t(j),U=l(1),W=l(),_=l([JSON.parse(JSON.stringify(O))]),M=l([]),V=l(),F=l(0),H={class:"select-dynamic-popover"},Q=u((()=>I.multiple)),R=u((()=>{const{widgetCfg:e}=N.componentCfg,{dynamicOptionInfo:a={}}=e;return a})),q=u((()=>{const{widgetCfg:e}=N.componentCfg,{showWholeOption:a=!1}=e;return a&&1===U.value})),z=u((()=>F.value>0&&U.value>=F.value)),B=u((()=>{var e;if(Array.isArray(N.value)&&N.value.length>0){const e=N.value;if(X(e),e.includes(O.value)){const e=_.value.find((e=>e.value===O.value)),a=e||O;return Q.value?[a]:JSON.stringify(a)}if(!Q.value&&1==e.length){const a=_.value.find((a=>a.value===e[0]));return a?JSON.stringify(a):{label:e[0].includes("&")?e[0].split("&")[0]:e[0],value:e[0]}}const a=_.value.filter((a=>e.includes(a.value))),l=a.map((e=>e.value)),t=e.filter((e=>!l.includes(e))).map((e=>({label:e.includes("&")?e.split("&")[0]:e,value:e})));return[...a,...t]}return X([]),null!=(e=N.value)?e:null})),G=u((()=>{if(Object.keys(R.value).length>0){const{defaultParams:e=[]}=R.value;return w(e)&&!N.value}return!1}));function X(e){_.value.forEach((a=>{a.actived=!1,Array.isArray(e)&&e.includes(a.value)&&(a.actived=!0)}))}function Y(e){const{widgetCfg:a}=N.componentCfg,{linkageFieldKeys:l=[]}=a;C(N.value,e)||(l.forEach((e=>{const a=$.value.find((a=>a.columnName===e));a&&a.value&&(a.value=null)})),L("update:value",e))}async function Z(e){var a;U.value=e,null==(a=null==E?void 0:E.value)||a.focus(),await ee(V.value,U.value)}async function ee(e,a){try{if(K.value=!0,Object.keys(R.value).length>0){const{autograph:l,dataSourceId:t,dataSourceType:u,filterKeys:n,defaultParams:o=[],showKeys:i,valueKey:s,tableDataType:r}=R.value;let v={wordbookId:t,autograph:l,wordbookType:u,fieldKeys:n,page:a};switch(r){case D:v.keyword=e;break;case J:n.length>0&&(v[n[0]]=e)}if(w(o)){const e=o.map((e=>e.value)).filter((e=>e.includes("${")));e.map((e=>e.match(/\$\{(.+?)\}/)[1])).forEach((e=>{const a=$.value.find((a=>a.columnName===e));a&&a.value&&a.value!==S.WHOLE&&(v[e]=a.value)}))}let c=await x(v,T);if(c){const{fieldList:e=[],rows:a=[],total:l=0}=c.map,t=a.map((e=>({...e,label:e[i[0]],value:`${e[i[0]]}&${e[s]}`}))),u=A(t);q.value&&t.unshift(JSON.parse(JSON.stringify(O))),W.value=null!=e?e:[],_.value=null!=t?t:[],M.value=u,F.value=l}}}catch(e){P.error(`异步数据源下拉框数据请求失败:${e}`),console.log(e)}finally{K.value=!1}}const ae=g((async e=>{await async function(e){V.value=e.trim(),U.value=1,await ee(V.value,U.value)}(e)}),300);async function le(){Object.keys(R.value).length>0&&T&&await ee("",U.value)}async function te(){L("update:value",null),await le()}function ue(e){V.value="",e&&(U.value=1,le())}function ne({option:e,handleClose:a}){if(Q.value){const l=e.value;return f(y,{style:{padding:"0 8px"},closable:!0,onClose:e=>{if(e.stopPropagation(),a(),Array.isArray(N.value)&&N.value.length>0){const e=N.value,a=e.indexOf(l.value);a>-1&&(e.splice(a,1),L("update:value",e.length>0?e:null))}}},{default:()=>f("div",l.label)})}const l=e.value?JSON.parse(e.value):{label:""};return f("div",l.label)}return n((()=>{G.value||le()})),(e,a)=>(o(),i(s(m),r({ref_key:"selectDynamicRef",ref:E},s(I),{value:s(B),"onUpdate:value":a[0]||(a[0]=e=>v(B)?B.value=e:null),remote:"",loading:K.value,"render-tag":ne,"menu-props":H,onSearch:s(ae),onClear:te,"onUpdate:show":ue}),{empty:c((()=>[p(k,r(s(I),{oldValue:N.value,loading:K.value,dynamicOptionInfo:s(R),fieldTitleList:W.value,optionList:_.value,isMultiple:s(Q),curPage:U.value,isLastPage:s(z),isShowWhole:s(q),onUpdateSelect:Y,onUpdatePage:Z}),null,16,["oldValue","loading","dynamicOptionInfo","fieldTitleList","optionList","isMultiple","curPage","isLastPage","isShowWhole"])])),_:1},16,["value","loading","onSearch"]))}});export{L as default};
|
@@ -1,6 +1,10 @@
|
|
1
1
|
import { PropType } from 'vue';
|
2
2
|
import { AnyObject } from '../../../../../../../shared/types';
|
3
3
|
declare const _default: import("vue").DefineComponent<{
|
4
|
+
oldValue: {
|
5
|
+
type: PropType<AnyObject[]>;
|
6
|
+
default: () => never[];
|
7
|
+
};
|
4
8
|
dynamicOptionInfo: {
|
5
9
|
type: PropType<AnyObject>;
|
6
10
|
default: () => {};
|
@@ -36,6 +40,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
36
40
|
}, {
|
37
41
|
selectMinWidth: number;
|
38
42
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
43
|
+
oldValue: {
|
44
|
+
type: PropType<AnyObject[]>;
|
45
|
+
default: () => never[];
|
46
|
+
};
|
39
47
|
dynamicOptionInfo: {
|
40
48
|
type: PropType<AnyObject>;
|
41
49
|
default: () => {};
|
@@ -124,6 +132,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
124
132
|
ArrowBack: 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<{}>>, {}>;
|
125
133
|
ArrowForward: 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<{}>>, {}>;
|
126
134
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("updateSelect" | "updatePage")[], "updateSelect" | "updatePage", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
135
|
+
oldValue: {
|
136
|
+
type: PropType<AnyObject[]>;
|
137
|
+
default: () => never[];
|
138
|
+
};
|
127
139
|
dynamicOptionInfo: {
|
128
140
|
type: PropType<AnyObject>;
|
129
141
|
default: () => {};
|
@@ -162,6 +174,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
162
174
|
}, {
|
163
175
|
isMultiple: boolean;
|
164
176
|
loading: boolean;
|
177
|
+
oldValue: AnyObject[];
|
165
178
|
dynamicOptionInfo: AnyObject;
|
166
179
|
fieldTitleList: AnyObject[];
|
167
180
|
optionList: AnyObject[];
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,ref as t,computed as
|
1
|
+
import{defineComponent as e,ref as t,computed as l,withDirectives as a,openBlock as i,createElementBlock as n,normalizeStyle as o,createBlock as s,unref as c,Fragment as d,renderList as u,toDisplayString as r,createCommentVNode as p,createElementVNode as v,normalizeClass as f,withCtx as m,createTextVNode as y,createVNode as h}from"vue";import{NEmpty as g,NPopover as k,NButtonGroup as L,NButton as b,NIcon as E}from"naive-ui";import{vFlexibleResize as S}from"../../../../../../../shared/directive/flexibleResize.js";import{WidgetValEnums as P}from"../../../../types/enums.js";import{ArrowBack as x,ArrowForward as M}from"@vicons/ionicons5";import{WholeSelectObj as O}from"../../helpers/selectExtraMap.js";const W={key:0,class:"dynamic-header"},_={class:"dynamic-content"},w=["onClick"],V={key:0,class:"content"},j={class:"content"},B={class:"dynamic-pagination"};var C=e({__name:"index",props:{oldValue:{type:Array,default:()=>[]},dynamicOptionInfo:{type:Object,default:()=>({})},fieldTitleList:{type:Array,default:()=>[]},optionList:{type:Array,default:()=>[]},isMultiple:{type:Boolean,default:!1},curPage:{type:Number,default:1},isLastPage:{type:Boolean,default:!1},isShowWhole:{type:Boolean,default:!1},loading:{type:Boolean,default:!1}},emits:["updateSelect","updatePage"],setup(e,{emit:C}){const z=e,A=t(200),H=l((()=>{var e,t;return null!=(t=null==(e=z.dynamicOptionInfo)?void 0:e.showKeys)?t:[]})),I=l((()=>H.value&&H.value.length>0?H.value.map((e=>{let t="";return z.fieldTitleList.forEach((l=>{l.columnName===e&&(t=l.title)})),t})):[])),N=l((()=>!z.optionList.filter((e=>e.label!=O.label)).length));function R(e){const t=z.curPage+e;C("updatePage",t)}function T({distance:e}){const t=A.value+e;A.value=Math.min(Math.max(t,200),1e3)}function K(){}return(t,l)=>a((i(),n("div",{class:"select-dynamic-options",style:o({minWidth:A.value+"px",position:"relative"})},[e.loading?(i(),s(c(g),{key:0,"show-icon":!1,description:"加载中..."})):(i(),n(d,{key:1},[c(N)?(i(),s(c(g),{key:0,description:"无数据"})):(i(),n(d,{key:1},[c(I)&&c(I).length>1?(i(),n("div",W,[(i(!0),n(d,null,u(c(I),(e=>(i(),n("span",{key:e,class:"name"},r(e),1)))),128))])):p("v-if",!0),v("ul",_,[(i(!0),n(d,null,u(e.optionList,(t=>(i(),n("li",{class:f(t.actived?"actived":""),key:t.value,onClick:e=>function(e){var t,l,a,i;if(!z.isMultiple||e.value===P.WHOLE)return null==(t=z.optionList)||t.forEach((e=>{e.actived=!1})),e.actived=!0,void C("updateSelect",[e.value]);null==(l=z.optionList)||l.forEach((e=>{e.value===P.WHOLE&&(e.actived=!1)})),e.actived?e.actived=!1:e.actived=!0;const n=null==(a=z.optionList)?void 0:a.filter((e=>e.actived)).map((e=>e.value));if(z.oldValue&&(null==(i=z.oldValue)?void 0:i.length)>0){const t=[...new Set([...z.oldValue,...n])];return e.actived?C("updateSelect",t):C("updateSelect",t.filter((t=>t!=e.value)))}C("updateSelect",n)}(t)},[e.isShowWhole&&t.value===c(P).WHOLE?(i(),n("span",V,r(t.label),1)):(i(!0),n(d,{key:1},u(c(H),(e=>(i(),s(c(k),{key:e,trigger:"hover",duration:0},{trigger:m((()=>[v("span",j,r(t[e]),1)])),default:m((()=>[y(" "+r(t[e]),1)])),_:2},1024)))),128))],10,w)))),128))]),v("div",B,[h(c(L),null,{default:m((()=>[h(c(b),{onClick:l[0]||(l[0]=e=>R(-1)),disabled:e.curPage<=1},{icon:m((()=>[h(c(E),{component:c(x),size:"16"},null,8,["component"])])),default:m((()=>[y(" 上一页 ")])),_:1},8,["disabled"]),h(c(b),{"icon-placement":"right",onClick:l[1]||(l[1]=e=>R(1)),disabled:e.isLastPage},{icon:m((()=>[h(c(E),{component:c(M),size:"16"},null,8,["component"])])),default:m((()=>[y(" 下一页 ")])),_:1},8,["disabled"])])),_:1})])],64))],64))],4)),[[c(S),{mode:"VR",onMove:T,onEnd:K}]])}});export{C as default};
|