ll-plus 2.3.19 → 2.4.1
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/advanced-filtering/index.d.ts +40 -32
- package/es/components/advanced-filtering/index.mjs +1 -1
- package/es/components/advanced-filtering/src/advanced-filtering.d.ts +15 -2
- package/es/components/advanced-filtering/src/advanced-filtering.mjs +60 -2
- package/es/components/advanced-filtering/src/advanced-filtering.mjs.map +1 -1
- package/es/components/advanced-filtering/src/advanced-filtering.vue.d.ts +22 -18
- package/es/components/advanced-filtering/src/advanced-filtering.vue2.mjs +4 -3
- package/es/components/advanced-filtering/src/advanced-filtering.vue2.mjs.map +1 -1
- package/es/components/advanced-filtering/src/components/advanced-filtering-params.vue.d.ts +13 -5
- package/es/components/advanced-filtering/src/components/advanced-filtering-params.vue2.mjs +67 -10
- package/es/components/advanced-filtering/src/components/advanced-filtering-params.vue2.mjs.map +1 -1
- package/es/components/advanced-filtering/src/components/advanced-filtering-tags.vue.d.ts +5 -9
- package/es/components/advanced-filtering/src/components/advanced-filtering-tags.vue2.mjs +33 -61
- package/es/components/advanced-filtering/src/components/advanced-filtering-tags.vue2.mjs.map +1 -1
- package/es/components/api-component/index.d.ts +8 -8
- package/es/components/api-component/src/api-component.vue.d.ts +8 -8
- package/es/components/api-component/src/components/body-component.vue.d.ts +4 -4
- package/es/components/api-component/src/components/params-table-row.vue.d.ts +2 -2
- package/es/components/api-component/src/components/params-table.vue.d.ts +4 -4
- package/es/components/code-editor/index.d.ts +2 -2
- package/es/components/code-editor/src/code-editor.vue.d.ts +2 -2
- package/es/components/drawer/src/components/second-confirmation/index.d.ts +2 -2
- package/es/components/drawer/src/components/second-confirmation/src/second-confirmation.vue.d.ts +2 -2
- package/es/components/easy-cron/index.d.ts +5 -5
- package/es/components/easy-cron/src/easy-cron.vue.d.ts +5 -5
- package/es/components/form/index.d.ts +2 -0
- package/es/components/form/src/form.vue.d.ts +23 -20
- package/es/components/form/src/form.vue2.mjs +21 -1
- package/es/components/form/src/form.vue2.mjs.map +1 -1
- package/es/components/index.mjs +1 -1
- package/es/components/input/index.d.ts +31 -31
- package/es/components/input/src/input.vue.d.ts +31 -31
- package/es/components/key-value/index.d.ts +26 -11
- package/es/components/key-value/src/components/key-value-item.vue.d.ts +44 -38
- package/es/components/key-value/src/components/key-value-item.vue2.mjs +7 -2
- package/es/components/key-value/src/components/key-value-item.vue2.mjs.map +1 -1
- package/es/components/key-value/src/config/key-value-item.d.ts +1 -0
- package/es/components/key-value/src/config/key-value-item.mjs.map +1 -1
- package/es/components/key-value/src/key-value.vue.d.ts +26 -11
- package/es/components/number-range/index.d.ts +13 -13
- package/es/components/number-range/src/number-range.d.ts +4 -4
- package/es/components/number-range/src/number-range.mjs +1 -1
- package/es/components/number-range/src/number-range.mjs.map +1 -1
- package/es/components/number-range/src/number-range.vue.d.ts +13 -14
- package/es/components/number-range/src/number-range.vue2.mjs +14 -7
- package/es/components/number-range/src/number-range.vue2.mjs.map +1 -1
- package/es/components/select-group/index.d.ts +1 -1
- package/es/components/select-group/src/select-group.vue.d.ts +1 -1
- package/es/components/textarea/index.d.ts +5 -5
- package/es/components/textarea/src/textarea.vue.d.ts +5 -5
- package/es/index.mjs +1 -1
- package/index.full.js +215 -85
- package/index.full.min.js +24 -24
- package/index.full.min.js.map +1 -1
- package/index.full.min.mjs +24 -24
- package/index.full.min.mjs.map +1 -1
- package/index.full.mjs +212 -87
- package/lib/components/advanced-filtering/index.d.ts +40 -32
- package/lib/components/advanced-filtering/index.js +5 -0
- package/lib/components/advanced-filtering/index.js.map +1 -1
- package/lib/components/advanced-filtering/src/advanced-filtering.d.ts +15 -2
- package/lib/components/advanced-filtering/src/advanced-filtering.js +64 -1
- package/lib/components/advanced-filtering/src/advanced-filtering.js.map +1 -1
- package/lib/components/advanced-filtering/src/advanced-filtering.vue.d.ts +22 -18
- package/lib/components/advanced-filtering/src/advanced-filtering.vue2.js +3 -2
- package/lib/components/advanced-filtering/src/advanced-filtering.vue2.js.map +1 -1
- package/lib/components/advanced-filtering/src/components/advanced-filtering-params.vue.d.ts +13 -5
- package/lib/components/advanced-filtering/src/components/advanced-filtering-params.vue2.js +65 -8
- package/lib/components/advanced-filtering/src/components/advanced-filtering-params.vue2.js.map +1 -1
- package/lib/components/advanced-filtering/src/components/advanced-filtering-tags.vue.d.ts +5 -9
- package/lib/components/advanced-filtering/src/components/advanced-filtering-tags.vue2.js +33 -61
- package/lib/components/advanced-filtering/src/components/advanced-filtering-tags.vue2.js.map +1 -1
- package/lib/components/api-component/index.d.ts +8 -8
- package/lib/components/api-component/src/api-component.vue.d.ts +8 -8
- package/lib/components/api-component/src/components/body-component.vue.d.ts +4 -4
- package/lib/components/api-component/src/components/params-table-row.vue.d.ts +2 -2
- package/lib/components/api-component/src/components/params-table.vue.d.ts +4 -4
- package/lib/components/code-editor/index.d.ts +2 -2
- package/lib/components/code-editor/src/code-editor.vue.d.ts +2 -2
- package/lib/components/drawer/src/components/second-confirmation/index.d.ts +2 -2
- package/lib/components/drawer/src/components/second-confirmation/src/second-confirmation.vue.d.ts +2 -2
- package/lib/components/easy-cron/index.d.ts +5 -5
- package/lib/components/easy-cron/src/easy-cron.vue.d.ts +5 -5
- package/lib/components/form/index.d.ts +2 -0
- package/lib/components/form/src/form.vue.d.ts +23 -20
- package/lib/components/form/src/form.vue2.js +21 -1
- package/lib/components/form/src/form.vue2.js.map +1 -1
- package/lib/components/index.js +5 -0
- package/lib/components/index.js.map +1 -1
- package/lib/components/input/index.d.ts +31 -31
- package/lib/components/input/src/input.vue.d.ts +31 -31
- package/lib/components/key-value/index.d.ts +26 -11
- package/lib/components/key-value/src/components/key-value-item.vue.d.ts +44 -38
- package/lib/components/key-value/src/components/key-value-item.vue2.js +7 -2
- package/lib/components/key-value/src/components/key-value-item.vue2.js.map +1 -1
- package/lib/components/key-value/src/config/key-value-item.d.ts +1 -0
- package/lib/components/key-value/src/config/key-value-item.js.map +1 -1
- package/lib/components/key-value/src/key-value.vue.d.ts +26 -11
- package/lib/components/number-range/index.d.ts +13 -13
- package/lib/components/number-range/src/number-range.d.ts +4 -4
- package/lib/components/number-range/src/number-range.js +1 -1
- package/lib/components/number-range/src/number-range.js.map +1 -1
- package/lib/components/number-range/src/number-range.vue.d.ts +13 -14
- package/lib/components/number-range/src/number-range.vue2.js +14 -7
- package/lib/components/number-range/src/number-range.vue2.js.map +1 -1
- package/lib/components/select-group/index.d.ts +1 -1
- package/lib/components/select-group/src/select-group.vue.d.ts +1 -1
- package/lib/components/textarea/index.d.ts +5 -5
- package/lib/components/textarea/src/textarea.vue.d.ts +5 -5
- package/lib/index.js +5 -0
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
- package/theme-chalk/css/index.css +1 -1
- package/theme-chalk/css/modal.css +1 -1
- package/theme-chalk/css/operate-icon.css +1 -1
- package/types/packages/components/advanced-filtering/index.d.ts +40 -32
- package/types/packages/components/advanced-filtering/src/advanced-filtering.d.ts +15 -2
- package/types/packages/components/advanced-filtering/src/advanced-filtering.vue.d.ts +22 -18
- package/types/packages/components/advanced-filtering/src/components/advanced-filtering-params.vue.d.ts +13 -5
- package/types/packages/components/advanced-filtering/src/components/advanced-filtering-tags.vue.d.ts +5 -9
- package/types/packages/components/api-component/index.d.ts +8 -8
- package/types/packages/components/api-component/src/api-component.vue.d.ts +8 -8
- package/types/packages/components/api-component/src/components/body-component.vue.d.ts +4 -4
- package/types/packages/components/api-component/src/components/params-table-row.vue.d.ts +2 -2
- package/types/packages/components/api-component/src/components/params-table.vue.d.ts +4 -4
- package/types/packages/components/code-editor/index.d.ts +2 -2
- package/types/packages/components/code-editor/src/code-editor.vue.d.ts +2 -2
- package/types/packages/components/drawer/src/components/second-confirmation/index.d.ts +2 -2
- package/types/packages/components/drawer/src/components/second-confirmation/src/second-confirmation.vue.d.ts +2 -2
- package/types/packages/components/easy-cron/index.d.ts +5 -5
- package/types/packages/components/easy-cron/src/easy-cron.vue.d.ts +5 -5
- package/types/packages/components/form/index.d.ts +2 -0
- package/types/packages/components/form/src/form.vue.d.ts +23 -20
- package/types/packages/components/input/index.d.ts +31 -31
- package/types/packages/components/input/src/input.vue.d.ts +31 -31
- package/types/packages/components/key-value/index.d.ts +26 -11
- package/types/packages/components/key-value/src/components/key-value-item.vue.d.ts +44 -38
- package/types/packages/components/key-value/src/config/key-value-item.d.ts +1 -0
- package/types/packages/components/key-value/src/key-value.vue.d.ts +26 -11
- package/types/packages/components/number-range/index.d.ts +13 -13
- package/types/packages/components/number-range/src/number-range.d.ts +4 -4
- package/types/packages/components/number-range/src/number-range.vue.d.ts +13 -14
- package/types/packages/components/select-group/index.d.ts +1 -1
- package/types/packages/components/select-group/src/select-group.vue.d.ts +1 -1
- package/types/packages/components/textarea/index.d.ts +5 -5
- package/types/packages/components/textarea/src/textarea.vue.d.ts +5 -5
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{
|
|
2
|
-
readonly filterColumns: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) =>
|
|
2
|
+
readonly filterColumns: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("ll-plus/es/components").FilterColumn[]) | (() => import("ll-plus/es/components").FilterColumn[]) | ((new (...args: any[]) => import("ll-plus/es/components").FilterColumn[]) | (() => import("ll-plus/es/components").FilterColumn[]))[], unknown, unknown, () => never[], boolean>;
|
|
3
3
|
readonly value: import("ll-plus/es/utils").EpPropFinalized<ObjectConstructor, unknown, unknown, () => {}, boolean>;
|
|
4
4
|
readonly formOptions: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => Partial<import("vue").ExtractPropTypes<{
|
|
5
5
|
layout: import("vue-types").VueTypeDef<string>;
|
|
@@ -901,7 +901,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
901
901
|
}, boolean>;
|
|
902
902
|
}, {
|
|
903
903
|
props: import("@vue/shared").LooseRequired<{
|
|
904
|
-
readonly filterColumns:
|
|
904
|
+
readonly filterColumns: import("ll-plus/es/components").FilterColumn[];
|
|
905
905
|
readonly value: Record<string, any>;
|
|
906
906
|
readonly formOptions: Partial<import("vue").ExtractPropTypes<{
|
|
907
907
|
layout: import("vue-types").VueTypeDef<string>;
|
|
@@ -1587,7 +1587,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1587
1587
|
};
|
|
1588
1588
|
}>>, {}, {}>>;
|
|
1589
1589
|
AdvancedFilteringParams: import("vue").DefineComponent<{
|
|
1590
|
-
readonly filterColumns: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) =>
|
|
1590
|
+
readonly filterColumns: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("ll-plus/es/components").FilterColumn[]) | (() => import("ll-plus/es/components").FilterColumn[]) | ((new (...args: any[]) => import("ll-plus/es/components").FilterColumn[]) | (() => import("ll-plus/es/components").FilterColumn[]))[], unknown, unknown, () => never[], boolean>;
|
|
1591
1591
|
readonly value: import("ll-plus/es/utils").EpPropFinalized<ObjectConstructor, unknown, unknown, () => {}, boolean>;
|
|
1592
1592
|
readonly formOptions: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => Partial<import("vue").ExtractPropTypes<{
|
|
1593
1593
|
layout: import("vue-types").VueTypeDef<string>;
|
|
@@ -2487,7 +2487,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2487
2487
|
readonly showFooter: import("ll-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
2488
2488
|
}, {
|
|
2489
2489
|
props: import("@vue/shared").LooseRequired<{
|
|
2490
|
-
readonly filterColumns:
|
|
2490
|
+
readonly filterColumns: import("ll-plus/es/components").FilterColumn[];
|
|
2491
2491
|
readonly value: Record<string, any>;
|
|
2492
2492
|
readonly formOptions: Partial<import("vue").ExtractPropTypes<{
|
|
2493
2493
|
layout: import("vue-types").VueTypeDef<string>;
|
|
@@ -2714,11 +2714,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2714
2714
|
};
|
|
2715
2715
|
}>>;
|
|
2716
2716
|
readonly showFooter: import("ll-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
2717
|
+
readonly "onUpdate:value"?: ((value: Record<string, any>) => any) | undefined;
|
|
2717
2718
|
readonly onClose?: (() => any) | undefined;
|
|
2718
2719
|
readonly onConfirm?: (() => any) | undefined;
|
|
2719
2720
|
readonly onChangeValue?: ((value: Record<string, any>) => any) | undefined;
|
|
2720
2721
|
} & {}>;
|
|
2721
|
-
emits: ((event: "close") => void) & ((event: "confirm") => void) & ((event: "changeValue", value: Record<string, any>) => void);
|
|
2722
|
+
emits: ((event: "update:value", value: Record<string, any>) => void) & ((event: "close") => void) & ((event: "confirm") => void) & ((event: "changeValue", value: Record<string, any>) => void);
|
|
2722
2723
|
bem: {
|
|
2723
2724
|
b: (blockSuffix?: string) => string;
|
|
2724
2725
|
e: (element?: string) => string;
|
|
@@ -2729,10 +2730,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2729
2730
|
bem: (blockSuffix: string, element: string, modifier: string) => string;
|
|
2730
2731
|
is: (name?: string) => string;
|
|
2731
2732
|
};
|
|
2733
|
+
innerValue: import("vue").Ref<{}>;
|
|
2732
2734
|
key: import("vue").Ref<number>;
|
|
2735
|
+
computeFormColumns: import("vue").ComputedRef<import("ll-plus/es/components").FilterColumn[]>;
|
|
2733
2736
|
handleClose: () => void;
|
|
2734
2737
|
handleAdvancedFilterConfirm: () => void;
|
|
2735
2738
|
handleChange: (val: Record<string, any>) => void;
|
|
2739
|
+
setData: (val: Record<string, any>) => void;
|
|
2736
2740
|
readonly LlForm: import("ll-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
2737
2741
|
readonly formColumns: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => any[]) | (() => any[]) | ((new (...args: any[]) => any[]) | (() => any[]))[], unknown, unknown, () => never[], boolean>;
|
|
2738
2742
|
readonly formOptions: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => Partial<import("vue").ExtractPropTypes<{
|
|
@@ -4112,6 +4116,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4112
4116
|
formRef: import("vue").Ref<any>;
|
|
4113
4117
|
validate: () => Promise<any>;
|
|
4114
4118
|
resetFields: () => Promise<any>;
|
|
4119
|
+
clearValidate: (nameList?: import("ant-design-vue/es/form/interface").NamePath[] | undefined) => Promise<any>;
|
|
4120
|
+
scrollToField: (name: import("ant-design-vue/es/form/interface").NamePath, options?: ScrollOptions | undefined) => Promise<any>;
|
|
4115
4121
|
getBindValue: (item: any) => import("lodash").Omit<any, "label">;
|
|
4116
4122
|
getFormItemClass: (item?: any) => string;
|
|
4117
4123
|
readonly isEmpty: {
|
|
@@ -5528,8 +5534,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5528
5534
|
close: () => boolean;
|
|
5529
5535
|
confirm: () => boolean;
|
|
5530
5536
|
changeValue: (value: Record<string, any>) => boolean;
|
|
5537
|
+
'update:value': (value: Record<string, any>) => boolean;
|
|
5531
5538
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
5532
|
-
readonly filterColumns: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) =>
|
|
5539
|
+
readonly filterColumns: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("ll-plus/es/components").FilterColumn[]) | (() => import("ll-plus/es/components").FilterColumn[]) | ((new (...args: any[]) => import("ll-plus/es/components").FilterColumn[]) | (() => import("ll-plus/es/components").FilterColumn[]))[], unknown, unknown, () => never[], boolean>;
|
|
5533
5540
|
readonly value: import("ll-plus/es/utils").EpPropFinalized<ObjectConstructor, unknown, unknown, () => {}, boolean>;
|
|
5534
5541
|
readonly formOptions: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => Partial<import("vue").ExtractPropTypes<{
|
|
5535
5542
|
layout: import("vue-types").VueTypeDef<string>;
|
|
@@ -6428,11 +6435,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
6428
6435
|
}, boolean>;
|
|
6429
6436
|
readonly showFooter: import("ll-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
6430
6437
|
}>> & {
|
|
6438
|
+
"onUpdate:value"?: ((value: Record<string, any>) => any) | undefined;
|
|
6431
6439
|
onClose?: (() => any) | undefined;
|
|
6432
6440
|
onConfirm?: (() => any) | undefined;
|
|
6433
6441
|
onChangeValue?: ((value: Record<string, any>) => any) | undefined;
|
|
6434
6442
|
}, {
|
|
6435
|
-
readonly filterColumns:
|
|
6443
|
+
readonly filterColumns: import("ll-plus/es/components").FilterColumn[];
|
|
6436
6444
|
readonly value: Record<string, any>;
|
|
6437
6445
|
readonly formOptions: Partial<import("vue").ExtractPropTypes<{
|
|
6438
6446
|
layout: import("vue-types").VueTypeDef<string>;
|
|
@@ -6661,7 +6669,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
6661
6669
|
readonly showFooter: import("ll-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
6662
6670
|
}, {}>;
|
|
6663
6671
|
AdvancedFilteringTags: import("vue").DefineComponent<{
|
|
6664
|
-
readonly filterColumns: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) =>
|
|
6672
|
+
readonly filterColumns: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("ll-plus/es/components").FilterColumn[]) | (() => import("ll-plus/es/components").FilterColumn[]) | ((new (...args: any[]) => import("ll-plus/es/components").FilterColumn[]) | (() => import("ll-plus/es/components").FilterColumn[]))[], unknown, unknown, () => never[], boolean>;
|
|
6665
6673
|
readonly value: import("ll-plus/es/utils").EpPropFinalized<ObjectConstructor, unknown, unknown, () => {}, boolean>;
|
|
6666
6674
|
readonly formOptions: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => Partial<import("vue").ExtractPropTypes<{
|
|
6667
6675
|
layout: import("vue-types").VueTypeDef<string>;
|
|
@@ -7563,7 +7571,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
7563
7571
|
}, boolean>;
|
|
7564
7572
|
}, {
|
|
7565
7573
|
props: import("@vue/shared").LooseRequired<{
|
|
7566
|
-
readonly filterColumns:
|
|
7574
|
+
readonly filterColumns: import("ll-plus/es/components").FilterColumn[];
|
|
7567
7575
|
readonly value: Record<string, any>;
|
|
7568
7576
|
readonly formOptions: Partial<import("vue").ExtractPropTypes<{
|
|
7569
7577
|
layout: import("vue-types").VueTypeDef<string>;
|
|
@@ -7812,16 +7820,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
7812
7820
|
}[]>;
|
|
7813
7821
|
handleClean: (tag?: import("ll-plus/es/components").IAvancedFilteringTag | null) => void;
|
|
7814
7822
|
setData: (obj: Record<string, any>) => void;
|
|
7815
|
-
|
|
7816
|
-
[key: string]: string;
|
|
7817
|
-
}) => any[];
|
|
7818
|
-
findLabelByValue: (tree: any, value: any) => string;
|
|
7819
|
-
getTags: (filterColumns: any[], value: Record<string, any>) => import("ll-plus/es/components").IAvancedFilteringTag[];
|
|
7823
|
+
getTags: (filterColumns: any[], values: Record<string, any>) => import("ll-plus/es/components").IAvancedFilteringTag[];
|
|
7820
7824
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7821
7825
|
change: (value: Record<string, any>) => boolean;
|
|
7822
7826
|
'update:value': (value: Record<string, any>) => boolean;
|
|
7823
7827
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
7824
|
-
readonly filterColumns: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) =>
|
|
7828
|
+
readonly filterColumns: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("ll-plus/es/components").FilterColumn[]) | (() => import("ll-plus/es/components").FilterColumn[]) | ((new (...args: any[]) => import("ll-plus/es/components").FilterColumn[]) | (() => import("ll-plus/es/components").FilterColumn[]))[], unknown, unknown, () => never[], boolean>;
|
|
7825
7829
|
readonly value: import("ll-plus/es/utils").EpPropFinalized<ObjectConstructor, unknown, unknown, () => {}, boolean>;
|
|
7826
7830
|
readonly formOptions: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => Partial<import("vue").ExtractPropTypes<{
|
|
7827
7831
|
layout: import("vue-types").VueTypeDef<string>;
|
|
@@ -8725,7 +8729,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
8725
8729
|
onChange?: ((value: Record<string, any>) => any) | undefined;
|
|
8726
8730
|
"onUpdate:value"?: ((value: Record<string, any>) => any) | undefined;
|
|
8727
8731
|
}, {
|
|
8728
|
-
readonly filterColumns:
|
|
8732
|
+
readonly filterColumns: import("ll-plus/es/components").FilterColumn[];
|
|
8729
8733
|
readonly value: Record<string, any>;
|
|
8730
8734
|
readonly formOptions: Partial<import("vue").ExtractPropTypes<{
|
|
8731
8735
|
layout: import("vue-types").VueTypeDef<string>;
|
|
@@ -8957,7 +8961,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
8957
8961
|
change: (value: Record<string, any>) => boolean;
|
|
8958
8962
|
'update:value': (value: Record<string, any>) => boolean;
|
|
8959
8963
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
8960
|
-
readonly filterColumns: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) =>
|
|
8964
|
+
readonly filterColumns: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("ll-plus/es/components").FilterColumn[]) | (() => import("ll-plus/es/components").FilterColumn[]) | ((new (...args: any[]) => import("ll-plus/es/components").FilterColumn[]) | (() => import("ll-plus/es/components").FilterColumn[]))[], unknown, unknown, () => never[], boolean>;
|
|
8961
8965
|
readonly value: import("ll-plus/es/utils").EpPropFinalized<ObjectConstructor, unknown, unknown, () => {}, boolean>;
|
|
8962
8966
|
readonly formOptions: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => Partial<import("vue").ExtractPropTypes<{
|
|
8963
8967
|
layout: import("vue-types").VueTypeDef<string>;
|
|
@@ -9861,7 +9865,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
9861
9865
|
onChange?: ((value: Record<string, any>) => any) | undefined;
|
|
9862
9866
|
"onUpdate:value"?: ((value: Record<string, any>) => any) | undefined;
|
|
9863
9867
|
}, {
|
|
9864
|
-
readonly filterColumns:
|
|
9868
|
+
readonly filterColumns: import("ll-plus/es/components").FilterColumn[];
|
|
9865
9869
|
readonly value: Record<string, any>;
|
|
9866
9870
|
readonly formOptions: Partial<import("vue").ExtractPropTypes<{
|
|
9867
9871
|
layout: import("vue-types").VueTypeDef<string>;
|
|
@@ -51,8 +51,9 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
51
51
|
vue.watch(
|
|
52
52
|
filterValue,
|
|
53
53
|
(n) => {
|
|
54
|
-
|
|
55
|
-
emits("
|
|
54
|
+
const value = advancedFiltering.filterAllValue(n);
|
|
55
|
+
emits("update:value", value);
|
|
56
|
+
emits("change", value);
|
|
56
57
|
},
|
|
57
58
|
{
|
|
58
59
|
deep: true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"advanced-filtering.vue2.js","sources":["../../../../../packages/components/advanced-filtering/src/advanced-filtering.vue"],"sourcesContent":["<template>\n <a-popover\n :overlay-class-name=\"bem.b()\"\n placement=\"bottomRight\"\n :overlay-style=\"props.overlayStyle\"\n :open=\"showSelectBox\"\n >\n <template #content>\n <advanced-filtering-params\n v-model:value=\"filterValue\"\n :filter-columns=\"props.filterColumns\"\n :form-options=\"props.formOptions\"\n @close=\"handleClose\"\n />\n </template>\n <a-popover\n :overlay-class-name=\"bem.b()\"\n trigger=\"hover\"\n placement=\"bottomRight\"\n :open=\"showValueBox\"\n :overlay-style=\"props.overlayStyle\"\n @open-change=\"handleHoverChange\"\n >\n <template #content>\n <advanced-filtering-tags\n :value=\"filterValue\"\n :filter-columns=\"props.filterColumns\"\n @change=\"handleChange\"\n />\n </template>\n <ll-button @click.stop=\"handleClickChange\">\n <ll-icon icon-name=\"icon-Screening\" style=\"margin-right: 10px\" />\n <span>高级筛选</span>\n </ll-button>\n </a-popover>\n </a-popover>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, watch } from 'vue'\n\nimport { createNamespace } from '@ll-plus/utils'\n\nimport {\n advancedFilteringProps,\n advancedFilteringEmits\n} from './advanced-filtering'\n\nimport { LlButton, LlIcon } from '@ll-plus/components'\nimport AdvancedFilteringParams from './components/advanced-filtering-params.vue'\nimport AdvancedFilteringTags from './components/advanced-filtering-tags.vue'\n\ndefineOptions({ name: 'LlAdvancedFiltering' })\nconst props = defineProps(advancedFilteringProps)\nconst emits = defineEmits(advancedFilteringEmits)\nconst bem = createNamespace('advanced-filtering')\nconst filterValue = ref<any>(props.value)\nconst showSelectBox = ref<boolean>(false)\nconst showValueBox = ref<boolean>(false)\n\nconst handleHoverChange = (visible: boolean) => {\n if (showSelectBox.value) return\n showValueBox.value = visible\n}\n\nconst handleClickChange = () => {\n showSelectBox.value = !showSelectBox.value\n showValueBox.value = false\n}\n\nconst handleClose = () => {\n showSelectBox.value = false\n showValueBox.value = false\n}\n\nconst handleChange = val => {\n filterValue.value = val\n}\nwatch(\n filterValue,\n n => {\n emits('update:value',
|
|
1
|
+
{"version":3,"file":"advanced-filtering.vue2.js","sources":["../../../../../packages/components/advanced-filtering/src/advanced-filtering.vue"],"sourcesContent":["<template>\n <a-popover\n :overlay-class-name=\"bem.b()\"\n placement=\"bottomRight\"\n :overlay-style=\"props.overlayStyle\"\n :open=\"showSelectBox\"\n >\n <template #content>\n <advanced-filtering-params\n v-model:value=\"filterValue\"\n :filter-columns=\"props.filterColumns\"\n :form-options=\"props.formOptions\"\n @close=\"handleClose\"\n />\n </template>\n <a-popover\n :overlay-class-name=\"bem.b()\"\n trigger=\"hover\"\n placement=\"bottomRight\"\n :open=\"showValueBox\"\n :overlay-style=\"props.overlayStyle\"\n @open-change=\"handleHoverChange\"\n >\n <template #content>\n <advanced-filtering-tags\n :value=\"filterValue\"\n :filter-columns=\"props.filterColumns\"\n @change=\"handleChange\"\n />\n </template>\n <ll-button @click.stop=\"handleClickChange\">\n <ll-icon icon-name=\"icon-Screening\" style=\"margin-right: 10px\" />\n <span>高级筛选</span>\n </ll-button>\n </a-popover>\n </a-popover>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, watch } from 'vue'\n\nimport { createNamespace } from '@ll-plus/utils'\n\nimport {\n advancedFilteringProps,\n advancedFilteringEmits,\n filterAllValue\n} from './advanced-filtering'\n\nimport { LlButton, LlIcon } from '@ll-plus/components'\nimport AdvancedFilteringParams from './components/advanced-filtering-params.vue'\nimport AdvancedFilteringTags from './components/advanced-filtering-tags.vue'\n\ndefineOptions({ name: 'LlAdvancedFiltering' })\nconst props = defineProps(advancedFilteringProps)\nconst emits = defineEmits(advancedFilteringEmits)\nconst bem = createNamespace('advanced-filtering')\nconst filterValue = ref<any>(props.value)\nconst showSelectBox = ref<boolean>(false)\nconst showValueBox = ref<boolean>(false)\n\nconst handleHoverChange = (visible: boolean) => {\n if (showSelectBox.value) return\n showValueBox.value = visible\n}\n\nconst handleClickChange = () => {\n showSelectBox.value = !showSelectBox.value\n showValueBox.value = false\n}\n\nconst handleClose = () => {\n showSelectBox.value = false\n showValueBox.value = false\n}\n\nconst handleChange = val => {\n filterValue.value = val\n}\n\nwatch(\n filterValue,\n n => {\n const value = filterAllValue(n)\n emits('update:value', value)\n emits('change', value)\n },\n {\n deep: true\n }\n)\n</script>\n"],"names":["createNamespace","ref","watch","filterAllValue"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsDA,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AACd,IAAA,MAAM,KAAQ,GAAA,MAAA,CAAA;AACd,IAAM,MAAA,GAAA,GAAMA,gCAAgB,oBAAoB,CAAA,CAAA;AAChD,IAAM,MAAA,WAAA,GAAcC,OAAS,CAAA,KAAA,CAAM,KAAK,CAAA,CAAA;AACxC,IAAM,MAAA,aAAA,GAAgBA,QAAa,KAAK,CAAA,CAAA;AACxC,IAAM,MAAA,YAAA,GAAeA,QAAa,KAAK,CAAA,CAAA;AAEvC,IAAM,MAAA,iBAAA,GAAoB,CAAC,OAAqB,KAAA;AAC9C,MAAA,IAAI,aAAc,CAAA,KAAA;AAAO,QAAA,OAAA;AACzB,MAAA,YAAA,CAAa,KAAQ,GAAA,OAAA,CAAA;AAAA,KACvB,CAAA;AAEA,IAAA,MAAM,oBAAoB,MAAM;AAC9B,MAAc,aAAA,CAAA,KAAA,GAAQ,CAAC,aAAc,CAAA,KAAA,CAAA;AACrC,MAAA,YAAA,CAAa,KAAQ,GAAA,KAAA,CAAA;AAAA,KACvB,CAAA;AAEA,IAAA,MAAM,cAAc,MAAM;AACxB,MAAA,aAAA,CAAc,KAAQ,GAAA,KAAA,CAAA;AACtB,MAAA,YAAA,CAAa,KAAQ,GAAA,KAAA,CAAA;AAAA,KACvB,CAAA;AAEA,IAAA,MAAM,eAAe,CAAO,GAAA,KAAA;AAC1B,MAAA,WAAA,CAAY,KAAQ,GAAA,GAAA,CAAA;AAAA,KACtB,CAAA;AAEA,IAAAC,SAAA;AAAA,MACE,WAAA;AAAA,MACA,CAAK,CAAA,KAAA;AACH,QAAM,MAAA,KAAA,GAAQC,iCAAe,CAAC,CAAA,CAAA;AAC9B,QAAA,KAAA,CAAM,gBAAgB,KAAK,CAAA,CAAA;AAC3B,QAAA,KAAA,CAAM,UAAU,KAAK,CAAA,CAAA;AAAA,OACvB;AAAA,MACA;AAAA,QACE,IAAM,EAAA,IAAA;AAAA,OACR;AAAA,KACF,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{
|
|
2
|
-
readonly filterColumns: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) =>
|
|
2
|
+
readonly filterColumns: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("ll-plus/es/components").FilterColumn[]) | (() => import("ll-plus/es/components").FilterColumn[]) | ((new (...args: any[]) => import("ll-plus/es/components").FilterColumn[]) | (() => import("ll-plus/es/components").FilterColumn[]))[], unknown, unknown, () => never[], boolean>;
|
|
3
3
|
readonly value: import("ll-plus/es/utils").EpPropFinalized<ObjectConstructor, unknown, unknown, () => {}, boolean>;
|
|
4
4
|
readonly formOptions: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => Partial<import("vue").ExtractPropTypes<{
|
|
5
5
|
layout: import("vue-types").VueTypeDef<string>;
|
|
@@ -899,7 +899,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
899
899
|
readonly showFooter: import("ll-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
900
900
|
}, {
|
|
901
901
|
props: import("@vue/shared").LooseRequired<{
|
|
902
|
-
readonly filterColumns:
|
|
902
|
+
readonly filterColumns: import("ll-plus/es/components").FilterColumn[];
|
|
903
903
|
readonly value: Record<string, any>;
|
|
904
904
|
readonly formOptions: Partial<import("vue").ExtractPropTypes<{
|
|
905
905
|
layout: import("vue-types").VueTypeDef<string>;
|
|
@@ -1126,11 +1126,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1126
1126
|
};
|
|
1127
1127
|
}>>;
|
|
1128
1128
|
readonly showFooter: import("ll-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
1129
|
+
readonly "onUpdate:value"?: ((value: Record<string, any>) => any) | undefined;
|
|
1129
1130
|
readonly onClose?: (() => any) | undefined;
|
|
1130
1131
|
readonly onConfirm?: (() => any) | undefined;
|
|
1131
1132
|
readonly onChangeValue?: ((value: Record<string, any>) => any) | undefined;
|
|
1132
1133
|
} & {}>;
|
|
1133
|
-
emits: ((event: "close") => void) & ((event: "confirm") => void) & ((event: "changeValue", value: Record<string, any>) => void);
|
|
1134
|
+
emits: ((event: "update:value", value: Record<string, any>) => void) & ((event: "close") => void) & ((event: "confirm") => void) & ((event: "changeValue", value: Record<string, any>) => void);
|
|
1134
1135
|
bem: {
|
|
1135
1136
|
b: (blockSuffix?: string) => string;
|
|
1136
1137
|
e: (element?: string) => string;
|
|
@@ -1141,10 +1142,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1141
1142
|
bem: (blockSuffix: string, element: string, modifier: string) => string;
|
|
1142
1143
|
is: (name?: string) => string;
|
|
1143
1144
|
};
|
|
1145
|
+
innerValue: import("vue").Ref<{}>;
|
|
1144
1146
|
key: import("vue").Ref<number>;
|
|
1147
|
+
computeFormColumns: import("vue").ComputedRef<import("ll-plus/es/components").FilterColumn[]>;
|
|
1145
1148
|
handleClose: () => void;
|
|
1146
1149
|
handleAdvancedFilterConfirm: () => void;
|
|
1147
1150
|
handleChange: (val: Record<string, any>) => void;
|
|
1151
|
+
setData: (val: Record<string, any>) => void;
|
|
1148
1152
|
readonly LlForm: import("ll-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
1149
1153
|
readonly formColumns: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => any[]) | (() => any[]) | ((new (...args: any[]) => any[]) | (() => any[]))[], unknown, unknown, () => never[], boolean>;
|
|
1150
1154
|
readonly formOptions: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => Partial<import("vue").ExtractPropTypes<{
|
|
@@ -2524,6 +2528,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2524
2528
|
formRef: import("vue").Ref<any>;
|
|
2525
2529
|
validate: () => Promise<any>;
|
|
2526
2530
|
resetFields: () => Promise<any>;
|
|
2531
|
+
clearValidate: (nameList?: import("ant-design-vue/es/form/interface").NamePath[] | undefined) => Promise<any>;
|
|
2532
|
+
scrollToField: (name: import("ant-design-vue/es/form/interface").NamePath, options?: ScrollOptions | undefined) => Promise<any>;
|
|
2527
2533
|
getBindValue: (item: any) => import("lodash").Omit<any, "label">;
|
|
2528
2534
|
getFormItemClass: (item?: any) => string;
|
|
2529
2535
|
readonly isEmpty: {
|
|
@@ -3940,8 +3946,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3940
3946
|
close: () => boolean;
|
|
3941
3947
|
confirm: () => boolean;
|
|
3942
3948
|
changeValue: (value: Record<string, any>) => boolean;
|
|
3949
|
+
'update:value': (value: Record<string, any>) => boolean;
|
|
3943
3950
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
3944
|
-
readonly filterColumns: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) =>
|
|
3951
|
+
readonly filterColumns: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("ll-plus/es/components").FilterColumn[]) | (() => import("ll-plus/es/components").FilterColumn[]) | ((new (...args: any[]) => import("ll-plus/es/components").FilterColumn[]) | (() => import("ll-plus/es/components").FilterColumn[]))[], unknown, unknown, () => never[], boolean>;
|
|
3945
3952
|
readonly value: import("ll-plus/es/utils").EpPropFinalized<ObjectConstructor, unknown, unknown, () => {}, boolean>;
|
|
3946
3953
|
readonly formOptions: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => Partial<import("vue").ExtractPropTypes<{
|
|
3947
3954
|
layout: import("vue-types").VueTypeDef<string>;
|
|
@@ -4840,11 +4847,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4840
4847
|
}, boolean>;
|
|
4841
4848
|
readonly showFooter: import("ll-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
4842
4849
|
}>> & {
|
|
4850
|
+
"onUpdate:value"?: ((value: Record<string, any>) => any) | undefined;
|
|
4843
4851
|
onClose?: (() => any) | undefined;
|
|
4844
4852
|
onConfirm?: (() => any) | undefined;
|
|
4845
4853
|
onChangeValue?: ((value: Record<string, any>) => any) | undefined;
|
|
4846
4854
|
}, {
|
|
4847
|
-
readonly filterColumns:
|
|
4855
|
+
readonly filterColumns: import("ll-plus/es/components").FilterColumn[];
|
|
4848
4856
|
readonly value: Record<string, any>;
|
|
4849
4857
|
readonly formOptions: Partial<import("vue").ExtractPropTypes<{
|
|
4850
4858
|
layout: import("vue-types").VueTypeDef<string>;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var vue = require('vue');
|
|
6
|
+
var lodashEs = require('lodash-es');
|
|
6
7
|
require('../../../../utils/index.js');
|
|
7
8
|
require('../../../index.js');
|
|
8
9
|
var advancedFiltering = require('../advanced-filtering.js');
|
|
@@ -29,7 +30,25 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
29
30
|
const props = __props;
|
|
30
31
|
const emits = __emit;
|
|
31
32
|
const bem = createNamespace.createNamespace("advanced-filtering-params");
|
|
33
|
+
const innerValue = vue.ref({});
|
|
32
34
|
const key = vue.ref(0);
|
|
35
|
+
const computeFormColumns = vue.computed(() => {
|
|
36
|
+
return props.filterColumns.map((column) => {
|
|
37
|
+
if (lodashEs.has(column, "options")) {
|
|
38
|
+
if (column.options.length && column.options[0].value === advancedFiltering.ALL_VALUE || column.unUseDefaultOption) {
|
|
39
|
+
return column;
|
|
40
|
+
}
|
|
41
|
+
column.options = [
|
|
42
|
+
{
|
|
43
|
+
label: column?.defaultOptionLabel ?? "\u5168\u90E8",
|
|
44
|
+
value: advancedFiltering.ALL_VALUE
|
|
45
|
+
},
|
|
46
|
+
...column.options
|
|
47
|
+
];
|
|
48
|
+
}
|
|
49
|
+
return column;
|
|
50
|
+
});
|
|
51
|
+
});
|
|
33
52
|
const handleClose = () => {
|
|
34
53
|
emits("close");
|
|
35
54
|
};
|
|
@@ -37,12 +56,51 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
37
56
|
emits("confirm");
|
|
38
57
|
};
|
|
39
58
|
const handleChange = (val) => {
|
|
40
|
-
|
|
59
|
+
setData(val);
|
|
60
|
+
};
|
|
61
|
+
const setData = (val) => {
|
|
62
|
+
const value = lodashEs.cloneDeep(val);
|
|
63
|
+
const obj = {};
|
|
64
|
+
for (const i in value) {
|
|
65
|
+
obj[i] = advancedFiltering.filterAllValue(value[i]);
|
|
66
|
+
}
|
|
67
|
+
emits("update:value", obj);
|
|
68
|
+
emits("changeValue", obj);
|
|
41
69
|
};
|
|
42
70
|
vue.watch(
|
|
43
71
|
() => props.value,
|
|
44
|
-
() => {
|
|
45
|
-
|
|
72
|
+
(val) => {
|
|
73
|
+
const value = lodashEs.cloneDeep(val);
|
|
74
|
+
const cloneInnerValue = lodashEs.cloneDeep(innerValue.value);
|
|
75
|
+
const obj = {};
|
|
76
|
+
computeFormColumns.value.forEach((item) => {
|
|
77
|
+
obj[item.key] = advancedFiltering.initValue(item, value);
|
|
78
|
+
});
|
|
79
|
+
const comparedObj = {};
|
|
80
|
+
computeFormColumns.value.forEach((item) => {
|
|
81
|
+
comparedObj[item.key] = advancedFiltering.initValue(item, cloneInnerValue);
|
|
82
|
+
});
|
|
83
|
+
if (JSON.stringify(obj) !== JSON.stringify(comparedObj)) {
|
|
84
|
+
innerValue.value = lodashEs.cloneDeep(obj);
|
|
85
|
+
}
|
|
86
|
+
if (key.value === 0) {
|
|
87
|
+
innerValue.value = lodashEs.cloneDeep(obj);
|
|
88
|
+
key.value++;
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
deep: true,
|
|
93
|
+
immediate: true
|
|
94
|
+
}
|
|
95
|
+
);
|
|
96
|
+
vue.watch(
|
|
97
|
+
() => innerValue.value,
|
|
98
|
+
(val) => {
|
|
99
|
+
setData(val);
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
deep: true,
|
|
103
|
+
immediate: true
|
|
46
104
|
}
|
|
47
105
|
);
|
|
48
106
|
return (_ctx, _cache) => {
|
|
@@ -71,13 +129,12 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
71
129
|
class: vue.normalizeClass(vue.unref(bem).m("content"))
|
|
72
130
|
},
|
|
73
131
|
[
|
|
74
|
-
props.filterColumns.length > 0 ? (vue.openBlock(), vue.createBlock(vue.unref(index.LlForm), {
|
|
75
|
-
|
|
76
|
-
"form-columns": props.filterColumns,
|
|
132
|
+
props.filterColumns.length > 0 ? (vue.openBlock(), vue.createBlock(vue.unref(index.LlForm), vue.mergeProps({ key: 0 }, _ctx.$attrs, {
|
|
133
|
+
"form-columns": computeFormColumns.value,
|
|
77
134
|
"form-options": props.formOptions,
|
|
78
|
-
"form-data":
|
|
135
|
+
"form-data": innerValue.value,
|
|
79
136
|
onChange: handleChange
|
|
80
|
-
}, null,
|
|
137
|
+
}), null, 16, ["form-columns", "form-options", "form-data"])) : (vue.openBlock(), vue.createElementBlock(
|
|
81
138
|
"div",
|
|
82
139
|
{
|
|
83
140
|
key: 1,
|
package/lib/components/advanced-filtering/src/components/advanced-filtering-params.vue2.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"advanced-filtering-params.vue2.js","sources":["../../../../../../packages/components/advanced-filtering/src/components/advanced-filtering-params.vue"],"sourcesContent":["<template>\n <a-card\n title=\"高级筛选\"\n :class=\"bem.b()\"\n onselectstart=\"return false\"\n :bordered=\"false\"\n >\n <template #extra>\n <ll-icon\n icon-name=\"icon-close2\"\n :style=\"{\n cursor: 'pointer'\n }\"\n @click=\"handleClose\"\n />\n </template>\n <div :class=\"bem.m('content')\">\n <ll-form\n v-if=\"props.filterColumns.length > 0\"\n
|
|
1
|
+
{"version":3,"file":"advanced-filtering-params.vue2.js","sources":["../../../../../../packages/components/advanced-filtering/src/components/advanced-filtering-params.vue"],"sourcesContent":["<template>\n <a-card\n title=\"高级筛选\"\n :class=\"bem.b()\"\n onselectstart=\"return false\"\n :bordered=\"false\"\n >\n <template #extra>\n <ll-icon\n icon-name=\"icon-close2\"\n :style=\"{\n cursor: 'pointer'\n }\"\n @click=\"handleClose\"\n />\n </template>\n <div :class=\"bem.m('content')\">\n <ll-form\n v-if=\"props.filterColumns.length > 0\"\n v-bind=\"$attrs\"\n :form-columns=\"computeFormColumns\"\n :form-options=\"props.formOptions\"\n :form-data=\"innerValue\"\n @change=\"handleChange\"\n />\n <div v-else :class=\"bem.m('empty')\">\n <p>暂无数据</p>\n </div>\n </div>\n <div v-if=\"props.showFooter\" :class=\"bem.m('footer')\">\n <ll-button\n type=\"primary\"\n style=\"margin-right: 8px\"\n @click=\"handleAdvancedFilterConfirm\"\n >\n 确定\n </ll-button>\n <ll-button @click=\"handleClose\">取消</ll-button>\n </div>\n </a-card>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, watch, computed } from 'vue'\nimport { has, cloneDeep } from 'lodash-es'\nimport { createNamespace } from '@ll-plus/utils'\nimport { LlForm } from '@ll-plus/components'\nimport {\n advancedFilteringParamsProps,\n advancedFilteringParamsEmits,\n ALL_VALUE,\n initValue,\n filterAllValue\n} from '../advanced-filtering'\n\ndefineOptions({ name: 'LlAdvancedFilteringParams' })\n\nconst props = defineProps(advancedFilteringParamsProps)\n\nconst emits = defineEmits(advancedFilteringParamsEmits)\n\nconst bem = createNamespace('advanced-filtering-params')\n\nconst innerValue = ref({})\n\nconst key = ref(0)\n\nconst computeFormColumns = computed(() => {\n return props.filterColumns.map(column => {\n if (has(column, 'options')) {\n if (\n (column.options.length && column.options[0].value === ALL_VALUE) ||\n column.unUseDefaultOption\n ) {\n return column\n }\n column.options = [\n {\n label: column?.defaultOptionLabel ?? '全部',\n value: ALL_VALUE\n },\n ...column.options\n ]\n }\n return column\n })\n})\n\nconst handleClose = () => {\n emits('close')\n}\n\nconst handleAdvancedFilterConfirm = () => {\n emits('confirm')\n}\n\nconst handleChange = (val: Record<string, any>) => {\n setData(val)\n}\n\nconst setData = (val: Record<string, any>) => {\n const value = cloneDeep(val)\n const obj: Record<string, any> = {}\n for (const i in value) {\n obj[i] = filterAllValue(value[i])\n }\n emits('update:value', obj)\n emits('changeValue', obj)\n}\n\nwatch(\n () => props.value,\n val => {\n const value = cloneDeep(val)\n const cloneInnerValue = cloneDeep(innerValue.value)\n const obj: Record<string, any> = {}\n computeFormColumns.value.forEach(item => {\n obj[item.key] = initValue(item, value)\n })\n const comparedObj: Record<string, any> = {}\n computeFormColumns.value.forEach(item => {\n comparedObj[item.key] = initValue(item, cloneInnerValue)\n })\n if (JSON.stringify(obj) !== JSON.stringify(comparedObj)) {\n innerValue.value = cloneDeep(obj)\n }\n if (key.value === 0) {\n innerValue.value = cloneDeep(obj)\n key.value++\n }\n },\n {\n deep: true,\n immediate: true\n }\n)\nwatch(\n () => innerValue.value,\n val => {\n setData(val)\n },\n {\n deep: true,\n immediate: true\n }\n)\n</script>\n"],"names":["createNamespace","ref","computed","has","ALL_VALUE","cloneDeep","filterAllValue","watch","initValue"],"mappings":"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"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type IAvancedFilteringTag } from '../advanced-filtering';
|
|
2
2
|
import type { FormColumn } from 'll-plus/es/components';
|
|
3
3
|
declare const _default: import("vue").DefineComponent<{
|
|
4
|
-
readonly filterColumns: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) =>
|
|
4
|
+
readonly filterColumns: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("ll-plus/es/components").FilterColumn[]) | (() => import("ll-plus/es/components").FilterColumn[]) | ((new (...args: any[]) => import("ll-plus/es/components").FilterColumn[]) | (() => import("ll-plus/es/components").FilterColumn[]))[], unknown, unknown, () => never[], boolean>;
|
|
5
5
|
readonly value: import("ll-plus/es/utils").EpPropFinalized<ObjectConstructor, unknown, unknown, () => {}, boolean>;
|
|
6
6
|
readonly formOptions: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => Partial<import("vue").ExtractPropTypes<{
|
|
7
7
|
layout: import("vue-types").VueTypeDef<string>;
|
|
@@ -903,7 +903,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
903
903
|
}, boolean>;
|
|
904
904
|
}, {
|
|
905
905
|
props: import("@vue/shared").LooseRequired<{
|
|
906
|
-
readonly filterColumns:
|
|
906
|
+
readonly filterColumns: import("ll-plus/es/components").FilterColumn[];
|
|
907
907
|
readonly value: Record<string, any>;
|
|
908
908
|
readonly formOptions: Partial<import("vue").ExtractPropTypes<{
|
|
909
909
|
layout: import("vue-types").VueTypeDef<string>;
|
|
@@ -1152,16 +1152,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1152
1152
|
}[]>;
|
|
1153
1153
|
handleClean: (tag?: IAvancedFilteringTag | null) => void;
|
|
1154
1154
|
setData: (obj: Record<string, any>) => void;
|
|
1155
|
-
|
|
1156
|
-
[key: string]: string;
|
|
1157
|
-
}) => any[];
|
|
1158
|
-
findLabelByValue: (tree: FormColumn['options'], value: any) => string;
|
|
1159
|
-
getTags: (filterColumns: FormColumn[], value: Record<string, any>) => IAvancedFilteringTag[];
|
|
1155
|
+
getTags: (filterColumns: FormColumn[], values: Record<string, any>) => IAvancedFilteringTag[];
|
|
1160
1156
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
1161
1157
|
change: (value: Record<string, any>) => boolean;
|
|
1162
1158
|
'update:value': (value: Record<string, any>) => boolean;
|
|
1163
1159
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
1164
|
-
readonly filterColumns: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) =>
|
|
1160
|
+
readonly filterColumns: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("ll-plus/es/components").FilterColumn[]) | (() => import("ll-plus/es/components").FilterColumn[]) | ((new (...args: any[]) => import("ll-plus/es/components").FilterColumn[]) | (() => import("ll-plus/es/components").FilterColumn[]))[], unknown, unknown, () => never[], boolean>;
|
|
1165
1161
|
readonly value: import("ll-plus/es/utils").EpPropFinalized<ObjectConstructor, unknown, unknown, () => {}, boolean>;
|
|
1166
1162
|
readonly formOptions: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => Partial<import("vue").ExtractPropTypes<{
|
|
1167
1163
|
layout: import("vue-types").VueTypeDef<string>;
|
|
@@ -2065,7 +2061,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2065
2061
|
onChange?: ((value: Record<string, any>) => any) | undefined;
|
|
2066
2062
|
"onUpdate:value"?: ((value: Record<string, any>) => any) | undefined;
|
|
2067
2063
|
}, {
|
|
2068
|
-
readonly filterColumns:
|
|
2064
|
+
readonly filterColumns: import("ll-plus/es/components").FilterColumn[];
|
|
2069
2065
|
readonly value: Record<string, any>;
|
|
2070
2066
|
readonly formOptions: Partial<import("vue").ExtractPropTypes<{
|
|
2071
2067
|
layout: import("vue-types").VueTypeDef<string>;
|
|
@@ -54,94 +54,66 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
54
54
|
emits("update:value", obj);
|
|
55
55
|
emits("change", obj);
|
|
56
56
|
};
|
|
57
|
-
const
|
|
58
|
-
let options = [];
|
|
59
|
-
if (!arr)
|
|
60
|
-
return [];
|
|
61
|
-
options = arr.map((e) => {
|
|
62
|
-
const obj = {};
|
|
63
|
-
obj.label = e[fieldNames.label];
|
|
64
|
-
obj.value = e[fieldNames.value];
|
|
65
|
-
if (e[fieldNames.children] && e[fieldNames.children].length) {
|
|
66
|
-
obj.children = treeDataFormat(e[fieldNames.children], fieldNames);
|
|
67
|
-
}
|
|
68
|
-
return obj;
|
|
69
|
-
});
|
|
70
|
-
return options;
|
|
71
|
-
};
|
|
72
|
-
const findLabelByValue = (tree, value) => {
|
|
73
|
-
function _findLabel(nodes) {
|
|
74
|
-
const labels = [];
|
|
75
|
-
if (!nodes)
|
|
76
|
-
return [];
|
|
77
|
-
for (const node of nodes) {
|
|
78
|
-
if (node.value === value) {
|
|
79
|
-
labels.push(node.label);
|
|
80
|
-
}
|
|
81
|
-
if (node.children && node.children.length > 0) {
|
|
82
|
-
const childLabels = _findLabel(node.children);
|
|
83
|
-
if (childLabels) {
|
|
84
|
-
labels.push(...childLabels);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
return labels.length > 0 ? labels : [];
|
|
89
|
-
}
|
|
90
|
-
return _findLabel(tree).join(",");
|
|
91
|
-
};
|
|
92
|
-
const getTags = (filterColumns, value) => {
|
|
57
|
+
const getTags = (filterColumns, values) => {
|
|
93
58
|
const arr = [];
|
|
94
59
|
filterColumns.map((item) => {
|
|
95
|
-
|
|
60
|
+
const value = advancedFiltering.filterAllValue(values[item.key]);
|
|
61
|
+
if (!lodashEs.isNil(value)) {
|
|
96
62
|
let tagValue = "";
|
|
97
63
|
if (item?.options) {
|
|
98
64
|
let options = [];
|
|
99
65
|
if (item.fieldNames) {
|
|
100
|
-
options = treeDataFormat(options, item.fieldNames);
|
|
66
|
+
options = advancedFiltering.treeDataFormat(options, item.fieldNames);
|
|
101
67
|
} else {
|
|
102
68
|
options = item.options;
|
|
103
69
|
}
|
|
104
|
-
if (Array.isArray(value
|
|
70
|
+
if (Array.isArray(value)) {
|
|
105
71
|
let tagArr = [];
|
|
106
|
-
tagArr = value
|
|
107
|
-
return findLabelByValue(options, val);
|
|
72
|
+
tagArr = value.map((val) => {
|
|
73
|
+
return advancedFiltering.findLabelByValue(options, val);
|
|
108
74
|
});
|
|
109
75
|
tagValue = tagArr.join(",");
|
|
110
76
|
} else {
|
|
111
|
-
tagValue = findLabelByValue(options, value
|
|
77
|
+
tagValue = advancedFiltering.findLabelByValue(options, value);
|
|
112
78
|
}
|
|
113
79
|
} else {
|
|
114
|
-
tagValue = value
|
|
80
|
+
tagValue = value;
|
|
115
81
|
}
|
|
116
82
|
if (item.type === "date-picker") {
|
|
117
|
-
tagValue = dayjs(value
|
|
83
|
+
tagValue = dayjs(value).format(item?.format ?? "YYYY-MM-DD");
|
|
118
84
|
}
|
|
119
85
|
if (item.type === "time-picker") {
|
|
120
|
-
tagValue = dayjs(value
|
|
121
|
-
item?.format ?? "YYYY/MM/DD hh:mm:ss"
|
|
122
|
-
);
|
|
86
|
+
tagValue = dayjs(value).format(item?.format ?? "YYYY/MM/DD hh:mm:ss");
|
|
123
87
|
}
|
|
124
88
|
if (item.type === "date-range") {
|
|
125
|
-
tagValue = `${dayjs(value[
|
|
89
|
+
tagValue = `${dayjs(value[0]).format(
|
|
126
90
|
item?.format ?? "YYYY-MM-DD"
|
|
127
|
-
)}-${dayjs(value[
|
|
91
|
+
)}-${dayjs(value[1]).format(item?.format ?? "YYYY-MM-DD")}`;
|
|
128
92
|
}
|
|
129
93
|
if (item.type === "number-range") {
|
|
130
|
-
tagValue = `${value[
|
|
94
|
+
tagValue = `${value[0]}${value[1] ? `-${value[1]}` : ""}`;
|
|
131
95
|
}
|
|
132
|
-
if (item.type === "time-
|
|
133
|
-
tagValue = `${dayjs(value[
|
|
96
|
+
if (item.type === "time-range") {
|
|
97
|
+
tagValue = `${dayjs(value[0]).format(
|
|
134
98
|
item?.format ?? "YYYY/MM/DD HH:mm:ss"
|
|
135
|
-
)}-${dayjs(value[
|
|
136
|
-
|
|
137
|
-
|
|
99
|
+
)}-${dayjs(value[1]).format(item?.format ?? "YYYY/MM/DD HH:mm:ss")}`;
|
|
100
|
+
}
|
|
101
|
+
if (item.type === "switch") {
|
|
102
|
+
if (lodashEs.has(item, "checkedChildren") && lodashEs.has(item, "checkedValue") && lodashEs.has(item, "unCheckedChildren") && lodashEs.has(item, "unCheckedValue")) {
|
|
103
|
+
tagValue = value === item.checkedValue ? item.checkedChildren : item.unCheckedChildren;
|
|
104
|
+
}
|
|
105
|
+
if (lodashEs.has(item, "checkedChildren") && !lodashEs.has(item, "checkedValue")) {
|
|
106
|
+
tagValue = value ? item.checkedChildren : false;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
if (tagValue) {
|
|
110
|
+
arr.push({
|
|
111
|
+
label: item.label || "",
|
|
112
|
+
key: item.key,
|
|
113
|
+
value,
|
|
114
|
+
showValue: tagValue
|
|
115
|
+
});
|
|
138
116
|
}
|
|
139
|
-
arr.push({
|
|
140
|
-
label: item.label || "",
|
|
141
|
-
key: item.key,
|
|
142
|
-
value: value[item.key],
|
|
143
|
-
showValue: tagValue
|
|
144
|
-
});
|
|
145
117
|
}
|
|
146
118
|
});
|
|
147
119
|
return arr;
|