@yimou6/common-ui 1.12.14 → 1.12.16
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/cdn/index.cdn.js +2 -2
- package/cdn/index.cdn.js.map +1 -1
- package/cdn/index.cdn.mjs +2 -2
- package/cdn/index.cdn.mjs.map +1 -1
- package/es/components/form/src/form.d.ts +12 -12
- package/es/components/form/src/form.mjs.map +1 -1
- package/es/components/radio/index.d.ts +59 -30
- package/es/components/radio/src/radio.d.ts +19 -8
- package/es/components/radio/src/radio.mjs +15 -4
- package/es/components/radio/src/radio.mjs.map +1 -1
- package/es/components/radio/src/radio.vue.d.ts +59 -30
- package/es/components/radio/src/radio.vue2.mjs +3 -0
- package/es/components/radio/src/radio.vue2.mjs.map +1 -1
- package/es/components/select/index.d.ts +9 -0
- package/es/components/select/src/select.d.ts +5 -2
- package/es/components/select/src/select.mjs +4 -1
- package/es/components/select/src/select.mjs.map +1 -1
- package/es/components/select/src/select.vue.d.ts +9 -0
- package/es/components/select/src/select.vue2.mjs +5 -1
- package/es/components/select/src/select.vue2.mjs.map +1 -1
- package/es/element-plus.types.d.ts +170 -32
- package/lib/components/form/src/form.d.ts +12 -12
- package/lib/components/form/src/form.js.map +1 -1
- package/lib/components/radio/index.d.ts +59 -30
- package/lib/components/radio/src/radio.d.ts +19 -8
- package/lib/components/radio/src/radio.js +15 -4
- package/lib/components/radio/src/radio.js.map +1 -1
- package/lib/components/radio/src/radio.vue.d.ts +59 -30
- package/lib/components/radio/src/radio.vue2.js +3 -0
- package/lib/components/radio/src/radio.vue2.js.map +1 -1
- package/lib/components/select/index.d.ts +9 -0
- package/lib/components/select/src/select.d.ts +5 -2
- package/lib/components/select/src/select.js +4 -1
- package/lib/components/select/src/select.js.map +1 -1
- package/lib/components/select/src/select.vue.d.ts +9 -0
- package/lib/components/select/src/select.vue2.js +5 -1
- package/lib/components/select/src/select.vue2.js.map +1 -1
- package/lib/element-plus.types.d.ts +170 -32
- package/package.json +1 -1
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
export declare const IRadio: import("../../types").SFCWithInstall<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
-
modelValue:
|
|
2
|
+
modelValue: {
|
|
3
|
+
type: import("vue").PropType<import("../../element-plus.types").ElRadioGroupProps["modelValue"]>;
|
|
4
|
+
};
|
|
3
5
|
size: {
|
|
4
|
-
type: import("vue").PropType<"
|
|
6
|
+
type: import("vue").PropType<import("../../element-plus.types").ElRadioGroupProps["size"]>;
|
|
5
7
|
default: string;
|
|
6
8
|
};
|
|
7
|
-
disabled:
|
|
9
|
+
disabled: import("vue").PropType<import("../../element-plus.types").ElRadioGroupProps["disabled"]>;
|
|
8
10
|
textColor: {
|
|
9
|
-
type:
|
|
11
|
+
type: import("vue").PropType<import("../../element-plus.types").ElRadioGroupProps["textColor"]>;
|
|
10
12
|
default: string;
|
|
11
13
|
};
|
|
12
|
-
fill:
|
|
13
|
-
|
|
14
|
+
fill: {
|
|
15
|
+
type: import("vue").PropType<import("../../element-plus.types").ElRadioGroupProps["fill"]>;
|
|
16
|
+
};
|
|
17
|
+
validateEvent: {
|
|
18
|
+
type: import("vue").PropType<import("../../element-plus.types").ElRadioGroupProps["validateEvent"]>;
|
|
19
|
+
};
|
|
14
20
|
type: {
|
|
15
21
|
type: import("vue").PropType<"button" | "">;
|
|
16
22
|
default: string;
|
|
@@ -30,20 +36,30 @@ export declare const IRadio: import("../../types").SFCWithInstall<import("vue").
|
|
|
30
36
|
type: StringConstructor;
|
|
31
37
|
default: string;
|
|
32
38
|
};
|
|
39
|
+
changeHandler: {
|
|
40
|
+
type: import("vue").PropType<(value: string | number | boolean | undefined) => void>;
|
|
41
|
+
default: undefined;
|
|
42
|
+
};
|
|
33
43
|
}>, {
|
|
34
44
|
props: import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
35
|
-
modelValue:
|
|
45
|
+
modelValue: {
|
|
46
|
+
type: import("vue").PropType<import("../../element-plus.types").ElRadioGroupProps["modelValue"]>;
|
|
47
|
+
};
|
|
36
48
|
size: {
|
|
37
|
-
type: import("vue").PropType<"
|
|
49
|
+
type: import("vue").PropType<import("../../element-plus.types").ElRadioGroupProps["size"]>;
|
|
38
50
|
default: string;
|
|
39
51
|
};
|
|
40
|
-
disabled:
|
|
52
|
+
disabled: import("vue").PropType<import("../../element-plus.types").ElRadioGroupProps["disabled"]>;
|
|
41
53
|
textColor: {
|
|
42
|
-
type:
|
|
54
|
+
type: import("vue").PropType<import("../../element-plus.types").ElRadioGroupProps["textColor"]>;
|
|
43
55
|
default: string;
|
|
44
56
|
};
|
|
45
|
-
fill:
|
|
46
|
-
|
|
57
|
+
fill: {
|
|
58
|
+
type: import("vue").PropType<import("../../element-plus.types").ElRadioGroupProps["fill"]>;
|
|
59
|
+
};
|
|
60
|
+
validateEvent: {
|
|
61
|
+
type: import("vue").PropType<import("../../element-plus.types").ElRadioGroupProps["validateEvent"]>;
|
|
62
|
+
};
|
|
47
63
|
type: {
|
|
48
64
|
type: import("vue").PropType<"button" | "">;
|
|
49
65
|
default: string;
|
|
@@ -63,11 +79,15 @@ export declare const IRadio: import("../../types").SFCWithInstall<import("vue").
|
|
|
63
79
|
type: StringConstructor;
|
|
64
80
|
default: string;
|
|
65
81
|
};
|
|
82
|
+
changeHandler: {
|
|
83
|
+
type: import("vue").PropType<(value: string | number | boolean | undefined) => void>;
|
|
84
|
+
default: undefined;
|
|
85
|
+
};
|
|
66
86
|
}>> & Readonly<{
|
|
67
|
-
"onUpdate:modelValue"?: ((_value: string | number | boolean) => any) | undefined;
|
|
68
|
-
onChange?: ((_value: string | number | boolean) => any) | undefined;
|
|
87
|
+
"onUpdate:modelValue"?: ((_value: string | number | boolean | undefined) => any) | undefined;
|
|
88
|
+
onChange?: ((_value: string | number | boolean | undefined) => any) | undefined;
|
|
69
89
|
}> & {}>;
|
|
70
|
-
emit: ((event: "update:modelValue", _value: string | number | boolean) => void) & ((event: "change", _value: string | number | boolean) => void);
|
|
90
|
+
emit: ((event: "update:modelValue", _value: string | number | boolean | undefined) => void) & ((event: "change", _value: string | number | boolean | undefined) => void);
|
|
71
91
|
dictStore: {
|
|
72
92
|
dict: import("vue").Ref<Record<string, any>>;
|
|
73
93
|
getDict: (dictType: string) => Promise<any[]>;
|
|
@@ -77,7 +97,7 @@ export declare const IRadio: import("../../types").SFCWithInstall<import("vue").
|
|
|
77
97
|
setOptions: () => Promise<void>;
|
|
78
98
|
getList: () => Promise<any[]>;
|
|
79
99
|
value: import("vue").Ref<string, string>;
|
|
80
|
-
handleChange: (val: string | number | boolean) => void;
|
|
100
|
+
handleChange: (val: string | number | boolean | undefined) => void;
|
|
81
101
|
readonly ElRadio: import("element-plus/es/utils").SFCWithInstall<{
|
|
82
102
|
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
|
|
83
103
|
readonly border: BooleanConstructor;
|
|
@@ -516,21 +536,27 @@ export declare const IRadio: import("../../types").SFCWithInstall<import("vue").
|
|
|
516
536
|
};
|
|
517
537
|
})>;
|
|
518
538
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
519
|
-
"update:modelValue": (_value: string | number | boolean) => boolean;
|
|
520
|
-
change: (_value: string | number | boolean) => boolean;
|
|
539
|
+
"update:modelValue": (_value: string | number | boolean | undefined) => boolean;
|
|
540
|
+
change: (_value: string | number | boolean | undefined) => boolean;
|
|
521
541
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
522
|
-
modelValue:
|
|
542
|
+
modelValue: {
|
|
543
|
+
type: import("vue").PropType<import("../../element-plus.types").ElRadioGroupProps["modelValue"]>;
|
|
544
|
+
};
|
|
523
545
|
size: {
|
|
524
|
-
type: import("vue").PropType<"
|
|
546
|
+
type: import("vue").PropType<import("../../element-plus.types").ElRadioGroupProps["size"]>;
|
|
525
547
|
default: string;
|
|
526
548
|
};
|
|
527
|
-
disabled:
|
|
549
|
+
disabled: import("vue").PropType<import("../../element-plus.types").ElRadioGroupProps["disabled"]>;
|
|
528
550
|
textColor: {
|
|
529
|
-
type:
|
|
551
|
+
type: import("vue").PropType<import("../../element-plus.types").ElRadioGroupProps["textColor"]>;
|
|
530
552
|
default: string;
|
|
531
553
|
};
|
|
532
|
-
fill:
|
|
533
|
-
|
|
554
|
+
fill: {
|
|
555
|
+
type: import("vue").PropType<import("../../element-plus.types").ElRadioGroupProps["fill"]>;
|
|
556
|
+
};
|
|
557
|
+
validateEvent: {
|
|
558
|
+
type: import("vue").PropType<import("../../element-plus.types").ElRadioGroupProps["validateEvent"]>;
|
|
559
|
+
};
|
|
534
560
|
type: {
|
|
535
561
|
type: import("vue").PropType<"button" | "">;
|
|
536
562
|
default: string;
|
|
@@ -550,17 +576,20 @@ export declare const IRadio: import("../../types").SFCWithInstall<import("vue").
|
|
|
550
576
|
type: StringConstructor;
|
|
551
577
|
default: string;
|
|
552
578
|
};
|
|
579
|
+
changeHandler: {
|
|
580
|
+
type: import("vue").PropType<(value: string | number | boolean | undefined) => void>;
|
|
581
|
+
default: undefined;
|
|
582
|
+
};
|
|
553
583
|
}>> & Readonly<{
|
|
554
|
-
"onUpdate:modelValue"?: ((_value: string | number | boolean) => any) | undefined;
|
|
555
|
-
onChange?: ((_value: string | number | boolean) => any) | undefined;
|
|
584
|
+
"onUpdate:modelValue"?: ((_value: string | number | boolean | undefined) => any) | undefined;
|
|
585
|
+
onChange?: ((_value: string | number | boolean | undefined) => any) | undefined;
|
|
556
586
|
}>, {
|
|
557
|
-
size: "" | "small" | "large" | "default";
|
|
587
|
+
size: "" | "small" | "large" | "default" | undefined;
|
|
558
588
|
type: "" | "button";
|
|
559
589
|
data: string | Record<string, any>[];
|
|
560
590
|
optLabel: string;
|
|
561
591
|
optValue: string;
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
validateEvent: boolean;
|
|
592
|
+
textColor: string | undefined;
|
|
593
|
+
changeHandler: (value: string | number | boolean | undefined) => void;
|
|
565
594
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>>;
|
|
566
595
|
export default IRadio;
|
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
import type { ExtractPropTypes, ExtractPublicPropTypes, PropType } from "vue";
|
|
2
|
+
import type { ElRadioGroupProps } from "../../../element-plus.types";
|
|
2
3
|
import type Radio from "./radio.vue";
|
|
3
4
|
export declare const RadioProps: {
|
|
4
|
-
modelValue:
|
|
5
|
+
modelValue: {
|
|
6
|
+
type: PropType<ElRadioGroupProps["modelValue"]>;
|
|
7
|
+
};
|
|
5
8
|
size: {
|
|
6
|
-
type: PropType<"
|
|
9
|
+
type: PropType<ElRadioGroupProps["size"]>;
|
|
7
10
|
default: string;
|
|
8
11
|
};
|
|
9
|
-
disabled:
|
|
12
|
+
disabled: PropType<ElRadioGroupProps["disabled"]>;
|
|
10
13
|
textColor: {
|
|
11
|
-
type:
|
|
14
|
+
type: PropType<ElRadioGroupProps["textColor"]>;
|
|
12
15
|
default: string;
|
|
13
16
|
};
|
|
14
|
-
fill:
|
|
15
|
-
|
|
17
|
+
fill: {
|
|
18
|
+
type: PropType<ElRadioGroupProps["fill"]>;
|
|
19
|
+
};
|
|
20
|
+
validateEvent: {
|
|
21
|
+
type: PropType<ElRadioGroupProps["validateEvent"]>;
|
|
22
|
+
};
|
|
16
23
|
type: {
|
|
17
24
|
type: PropType<"button" | "">;
|
|
18
25
|
default: string;
|
|
@@ -32,10 +39,14 @@ export declare const RadioProps: {
|
|
|
32
39
|
type: StringConstructor;
|
|
33
40
|
default: string;
|
|
34
41
|
};
|
|
42
|
+
changeHandler: {
|
|
43
|
+
type: PropType<(value: string | number | boolean | undefined) => void>;
|
|
44
|
+
default: undefined;
|
|
45
|
+
};
|
|
35
46
|
};
|
|
36
47
|
export declare const RadioEmits: {
|
|
37
|
-
"update:modelValue": (_value: string | number | boolean) => boolean;
|
|
38
|
-
change: (_value: string | number | boolean) => boolean;
|
|
48
|
+
"update:modelValue": (_value: string | number | boolean | undefined) => boolean;
|
|
49
|
+
change: (_value: string | number | boolean | undefined) => boolean;
|
|
39
50
|
};
|
|
40
51
|
export declare const excludeRadioKeys: string[];
|
|
41
52
|
export type RadioPropsType = ExtractPropTypes<typeof RadioProps>;
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
5
5
|
const RadioProps = {
|
|
6
|
-
modelValue:
|
|
6
|
+
modelValue: {
|
|
7
|
+
type: [String, Number, Boolean]
|
|
8
|
+
},
|
|
7
9
|
size: {
|
|
8
10
|
type: String,
|
|
9
11
|
default: ""
|
|
@@ -13,8 +15,12 @@ const RadioProps = {
|
|
|
13
15
|
type: String,
|
|
14
16
|
default: ""
|
|
15
17
|
},
|
|
16
|
-
fill:
|
|
17
|
-
|
|
18
|
+
fill: {
|
|
19
|
+
type: String
|
|
20
|
+
},
|
|
21
|
+
validateEvent: {
|
|
22
|
+
type: Boolean
|
|
23
|
+
},
|
|
18
24
|
type: {
|
|
19
25
|
type: String,
|
|
20
26
|
default: ""
|
|
@@ -33,6 +39,10 @@ const RadioProps = {
|
|
|
33
39
|
optValue: {
|
|
34
40
|
type: String,
|
|
35
41
|
default: "value"
|
|
42
|
+
},
|
|
43
|
+
changeHandler: {
|
|
44
|
+
type: Function,
|
|
45
|
+
default: void 0
|
|
36
46
|
}
|
|
37
47
|
};
|
|
38
48
|
const RadioEmits = {
|
|
@@ -45,7 +55,8 @@ const excludeRadioKeys = [
|
|
|
45
55
|
"dataCallback",
|
|
46
56
|
"optLabel",
|
|
47
57
|
"optValue",
|
|
48
|
-
"modelValue"
|
|
58
|
+
"modelValue",
|
|
59
|
+
"changeHandler"
|
|
49
60
|
];
|
|
50
61
|
|
|
51
62
|
exports.RadioEmits = RadioEmits;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio.js","sources":["../../../../../../../packages/components/radio/src/radio.ts"],"sourcesContent":["import type { ExtractPropTypes, ExtractPublicPropTypes, PropType } from \"vue\";\nimport type Radio from \"./radio.vue\";\n\nexport const RadioProps = {\n modelValue: [String, Number, Boolean],\n size: {\n type: String as PropType
|
|
1
|
+
{"version":3,"file":"radio.js","sources":["../../../../../../../packages/components/radio/src/radio.ts"],"sourcesContent":["import type { ExtractPropTypes, ExtractPublicPropTypes, PropType } from \"vue\";\nimport type { ElRadioGroupProps } from \"../../../element-plus.types\";\nimport type Radio from \"./radio.vue\";\n\nexport const RadioProps = {\n modelValue: {\n type: [String, Number, Boolean] as PropType<\n ElRadioGroupProps[\"modelValue\"]\n >,\n },\n size: {\n type: String as PropType<ElRadioGroupProps[\"size\"]>,\n default: \"\",\n },\n disabled: Boolean as PropType<ElRadioGroupProps[\"disabled\"]>,\n textColor: {\n type: String as PropType<ElRadioGroupProps[\"textColor\"]>,\n default: \"\",\n },\n fill: {\n type: String as PropType<ElRadioGroupProps[\"fill\"]>,\n },\n validateEvent: {\n type: Boolean as PropType<ElRadioGroupProps[\"validateEvent\"]>,\n },\n type: {\n type: String as PropType<\"button\" | \"\">,\n default: \"\",\n },\n data: {\n type: [String, Array] as PropType<string | Record<string, any>[]>,\n default: () => [],\n },\n dataCallback: {\n type: Function as PropType<(list: Record<string, any>[]) => any[]>,\n },\n optLabel: {\n type: String,\n default: \"label\",\n },\n optValue: {\n type: String,\n default: \"value\",\n },\n changeHandler: {\n type: Function as unknown as PropType<\n (value: string | number | boolean | undefined) => void\n >,\n default: undefined,\n },\n};\n\nexport const RadioEmits = {\n \"update:modelValue\": (_value: string | number | boolean | undefined) => true,\n change: (_value: string | number | boolean | undefined) => true,\n};\n\nexport const excludeRadioKeys = [\n \"type\",\n \"data\",\n \"dataCallback\",\n \"optLabel\",\n \"optValue\",\n \"modelValue\",\n \"changeHandler\",\n];\n\nexport type RadioPropsType = ExtractPropTypes<typeof RadioProps>;\nexport type RadioPublicPropsType = ExtractPublicPropTypes<typeof RadioProps>;\nexport type RadioInstance = InstanceType<typeof Radio>;\nexport type RadioEmitsType = typeof RadioEmits;\n"],"names":[],"mappings":";;;;AAIO,MAAM,UAAa,GAAA;AAAA,EACxB,UAAY,EAAA;AAAA,IACV,IAAM,EAAA,CAAC,MAAQ,EAAA,MAAA,EAAQ,OAAO;AAAA,GAGhC;AAAA,EACA,IAAM,EAAA;AAAA,IACJ,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA;AAAA,GACX;AAAA,EACA,QAAU,EAAA,OAAA;AAAA,EACV,SAAW,EAAA;AAAA,IACT,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA;AAAA,GACX;AAAA,EACA,IAAM,EAAA;AAAA,IACJ,IAAM,EAAA;AAAA,GACR;AAAA,EACA,aAAe,EAAA;AAAA,IACb,IAAM,EAAA;AAAA,GACR;AAAA,EACA,IAAM,EAAA;AAAA,IACJ,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA;AAAA,GACX;AAAA,EACA,IAAM,EAAA;AAAA,IACJ,IAAA,EAAM,CAAC,MAAA,EAAQ,KAAK,CAAA;AAAA,IACpB,OAAA,kBAAe,MAAA,CAAA,MAAA,EAAN,EAAA,SAAA;AAAA,GACX;AAAA,EACA,YAAc,EAAA;AAAA,IACZ,IAAM,EAAA;AAAA,GACR;AAAA,EACA,QAAU,EAAA;AAAA,IACR,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA;AAAA,GACX;AAAA,EACA,QAAU,EAAA;AAAA,IACR,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA;AAAA,GACX;AAAA,EACA,aAAe,EAAA;AAAA,IACb,IAAM,EAAA,QAAA;AAAA,IAGN,OAAS,EAAA,KAAA;AAAA;AAEb;AAEO,MAAM,UAAa,GAAA;AAAA,EACxB,mBAAA,kBAAsB,MAAA,CAAA,CAAA,MAAA,KAAkD,IAAnD,EAAA,mBAAA,CAAA;AAAA,EACrB,MAAA,kBAAS,MAAA,CAAA,CAAA,MAAA,KAAkD,IAAnD,EAAA,QAAA;AACV;AAEO,MAAM,gBAAmB,GAAA;AAAA,EAC9B,MAAA;AAAA,EACA,MAAA;AAAA,EACA,cAAA;AAAA,EACA,UAAA;AAAA,EACA,UAAA;AAAA,EACA,YAAA;AAAA,EACA;AACF;;;;;;"}
|
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
-
modelValue:
|
|
2
|
+
modelValue: {
|
|
3
|
+
type: import("vue").PropType<import("../../../element-plus.types").ElRadioGroupProps["modelValue"]>;
|
|
4
|
+
};
|
|
3
5
|
size: {
|
|
4
|
-
type: import("vue").PropType<"
|
|
6
|
+
type: import("vue").PropType<import("../../../element-plus.types").ElRadioGroupProps["size"]>;
|
|
5
7
|
default: string;
|
|
6
8
|
};
|
|
7
|
-
disabled:
|
|
9
|
+
disabled: import("vue").PropType<import("../../../element-plus.types").ElRadioGroupProps["disabled"]>;
|
|
8
10
|
textColor: {
|
|
9
|
-
type:
|
|
11
|
+
type: import("vue").PropType<import("../../../element-plus.types").ElRadioGroupProps["textColor"]>;
|
|
10
12
|
default: string;
|
|
11
13
|
};
|
|
12
|
-
fill:
|
|
13
|
-
|
|
14
|
+
fill: {
|
|
15
|
+
type: import("vue").PropType<import("../../../element-plus.types").ElRadioGroupProps["fill"]>;
|
|
16
|
+
};
|
|
17
|
+
validateEvent: {
|
|
18
|
+
type: import("vue").PropType<import("../../../element-plus.types").ElRadioGroupProps["validateEvent"]>;
|
|
19
|
+
};
|
|
14
20
|
type: {
|
|
15
21
|
type: import("vue").PropType<"button" | "">;
|
|
16
22
|
default: string;
|
|
@@ -30,20 +36,30 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
30
36
|
type: StringConstructor;
|
|
31
37
|
default: string;
|
|
32
38
|
};
|
|
39
|
+
changeHandler: {
|
|
40
|
+
type: import("vue").PropType<(value: string | number | boolean | undefined) => void>;
|
|
41
|
+
default: undefined;
|
|
42
|
+
};
|
|
33
43
|
}>, {
|
|
34
44
|
props: import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
35
|
-
modelValue:
|
|
45
|
+
modelValue: {
|
|
46
|
+
type: import("vue").PropType<import("../../../element-plus.types").ElRadioGroupProps["modelValue"]>;
|
|
47
|
+
};
|
|
36
48
|
size: {
|
|
37
|
-
type: import("vue").PropType<"
|
|
49
|
+
type: import("vue").PropType<import("../../../element-plus.types").ElRadioGroupProps["size"]>;
|
|
38
50
|
default: string;
|
|
39
51
|
};
|
|
40
|
-
disabled:
|
|
52
|
+
disabled: import("vue").PropType<import("../../../element-plus.types").ElRadioGroupProps["disabled"]>;
|
|
41
53
|
textColor: {
|
|
42
|
-
type:
|
|
54
|
+
type: import("vue").PropType<import("../../../element-plus.types").ElRadioGroupProps["textColor"]>;
|
|
43
55
|
default: string;
|
|
44
56
|
};
|
|
45
|
-
fill:
|
|
46
|
-
|
|
57
|
+
fill: {
|
|
58
|
+
type: import("vue").PropType<import("../../../element-plus.types").ElRadioGroupProps["fill"]>;
|
|
59
|
+
};
|
|
60
|
+
validateEvent: {
|
|
61
|
+
type: import("vue").PropType<import("../../../element-plus.types").ElRadioGroupProps["validateEvent"]>;
|
|
62
|
+
};
|
|
47
63
|
type: {
|
|
48
64
|
type: import("vue").PropType<"button" | "">;
|
|
49
65
|
default: string;
|
|
@@ -63,11 +79,15 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
63
79
|
type: StringConstructor;
|
|
64
80
|
default: string;
|
|
65
81
|
};
|
|
82
|
+
changeHandler: {
|
|
83
|
+
type: import("vue").PropType<(value: string | number | boolean | undefined) => void>;
|
|
84
|
+
default: undefined;
|
|
85
|
+
};
|
|
66
86
|
}>> & Readonly<{
|
|
67
|
-
"onUpdate:modelValue"?: ((_value: string | number | boolean) => any) | undefined;
|
|
68
|
-
onChange?: ((_value: string | number | boolean) => any) | undefined;
|
|
87
|
+
"onUpdate:modelValue"?: ((_value: string | number | boolean | undefined) => any) | undefined;
|
|
88
|
+
onChange?: ((_value: string | number | boolean | undefined) => any) | undefined;
|
|
69
89
|
}> & {}>;
|
|
70
|
-
emit: ((event: "update:modelValue", _value: string | number | boolean) => void) & ((event: "change", _value: string | number | boolean) => void);
|
|
90
|
+
emit: ((event: "update:modelValue", _value: string | number | boolean | undefined) => void) & ((event: "change", _value: string | number | boolean | undefined) => void);
|
|
71
91
|
dictStore: {
|
|
72
92
|
dict: import("vue").Ref<Record<string, any>>;
|
|
73
93
|
getDict: (dictType: string) => Promise<any[]>;
|
|
@@ -77,7 +97,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
77
97
|
setOptions: () => Promise<void>;
|
|
78
98
|
getList: () => Promise<any[]>;
|
|
79
99
|
value: import("vue").Ref<string, string>;
|
|
80
|
-
handleChange: (val: string | number | boolean) => void;
|
|
100
|
+
handleChange: (val: string | number | boolean | undefined) => void;
|
|
81
101
|
readonly ElRadio: import("element-plus/es/utils").SFCWithInstall<{
|
|
82
102
|
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
|
|
83
103
|
readonly border: BooleanConstructor;
|
|
@@ -516,21 +536,27 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
516
536
|
};
|
|
517
537
|
})>;
|
|
518
538
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
519
|
-
"update:modelValue": (_value: string | number | boolean) => boolean;
|
|
520
|
-
change: (_value: string | number | boolean) => boolean;
|
|
539
|
+
"update:modelValue": (_value: string | number | boolean | undefined) => boolean;
|
|
540
|
+
change: (_value: string | number | boolean | undefined) => boolean;
|
|
521
541
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
522
|
-
modelValue:
|
|
542
|
+
modelValue: {
|
|
543
|
+
type: import("vue").PropType<import("../../../element-plus.types").ElRadioGroupProps["modelValue"]>;
|
|
544
|
+
};
|
|
523
545
|
size: {
|
|
524
|
-
type: import("vue").PropType<"
|
|
546
|
+
type: import("vue").PropType<import("../../../element-plus.types").ElRadioGroupProps["size"]>;
|
|
525
547
|
default: string;
|
|
526
548
|
};
|
|
527
|
-
disabled:
|
|
549
|
+
disabled: import("vue").PropType<import("../../../element-plus.types").ElRadioGroupProps["disabled"]>;
|
|
528
550
|
textColor: {
|
|
529
|
-
type:
|
|
551
|
+
type: import("vue").PropType<import("../../../element-plus.types").ElRadioGroupProps["textColor"]>;
|
|
530
552
|
default: string;
|
|
531
553
|
};
|
|
532
|
-
fill:
|
|
533
|
-
|
|
554
|
+
fill: {
|
|
555
|
+
type: import("vue").PropType<import("../../../element-plus.types").ElRadioGroupProps["fill"]>;
|
|
556
|
+
};
|
|
557
|
+
validateEvent: {
|
|
558
|
+
type: import("vue").PropType<import("../../../element-plus.types").ElRadioGroupProps["validateEvent"]>;
|
|
559
|
+
};
|
|
534
560
|
type: {
|
|
535
561
|
type: import("vue").PropType<"button" | "">;
|
|
536
562
|
default: string;
|
|
@@ -550,17 +576,20 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
550
576
|
type: StringConstructor;
|
|
551
577
|
default: string;
|
|
552
578
|
};
|
|
579
|
+
changeHandler: {
|
|
580
|
+
type: import("vue").PropType<(value: string | number | boolean | undefined) => void>;
|
|
581
|
+
default: undefined;
|
|
582
|
+
};
|
|
553
583
|
}>> & Readonly<{
|
|
554
|
-
"onUpdate:modelValue"?: ((_value: string | number | boolean) => any) | undefined;
|
|
555
|
-
onChange?: ((_value: string | number | boolean) => any) | undefined;
|
|
584
|
+
"onUpdate:modelValue"?: ((_value: string | number | boolean | undefined) => any) | undefined;
|
|
585
|
+
onChange?: ((_value: string | number | boolean | undefined) => any) | undefined;
|
|
556
586
|
}>, {
|
|
557
|
-
size: "" | "small" | "large" | "default";
|
|
587
|
+
size: "" | "small" | "large" | "default" | undefined;
|
|
558
588
|
type: "" | "button";
|
|
559
589
|
data: string | Record<string, any>[];
|
|
560
590
|
optLabel: string;
|
|
561
591
|
optValue: string;
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
validateEvent: boolean;
|
|
592
|
+
textColor: string | undefined;
|
|
593
|
+
changeHandler: (value: string | number | boolean | undefined) => void;
|
|
565
594
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
566
595
|
export default _default;
|
|
@@ -52,6 +52,9 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
52
52
|
{ deep: true, immediate: true }
|
|
53
53
|
);
|
|
54
54
|
const handleChange = /* @__PURE__ */ __name((val) => {
|
|
55
|
+
if (typeof props.changeHandler === "function") {
|
|
56
|
+
props.changeHandler(val);
|
|
57
|
+
}
|
|
55
58
|
emit("change", val);
|
|
56
59
|
emit("update:modelValue", val);
|
|
57
60
|
}, "handleChange");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio.vue2.js","sources":["../../../../../../../packages/components/radio/src/radio.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ElRadio, ElRadioButton, ElRadioGroup } from \"element-plus\";\nimport { computed, inject, onMounted, ref, watch } from \"vue\";\nimport { DICT_STORE, excludeObjectKeys } from \"../../../utils\";\nimport { excludeRadioKeys, RadioEmits, RadioProps } from \"./radio\";\n\ndefineOptions({\n name: \"IRadio\",\n});\nconst props = defineProps(RadioProps);\nconst emit = defineEmits(RadioEmits);\nconst dictStore = inject(DICT_STORE);\nconst bindAttrs = computed(() => excludeObjectKeys(props, excludeRadioKeys));\n\nconst radioOptions = ref<Record<string, any>[]>([]);\nonMounted(() => setOptions());\nwatch(\n () => props.data,\n () => setOptions(),\n { deep: true },\n);\nasync function setOptions() {\n const list = await getList();\n radioOptions.value = props.dataCallback ? props.dataCallback(list) : list;\n}\n\nasync function getList() {\n if (Array.isArray(props.data)) {\n return props.data;\n }\n if (dictStore) {\n return await dictStore.getDict(props.data);\n }\n return [];\n}\n\nconst value = ref(\"\");\nwatch(\n () => props.modelValue,\n (val: any) => (value.value = val),\n { deep: true, immediate: true },\n);\nconst handleChange = (val: string | number | boolean) => {\n emit(\"change\", val);\n emit(\"update:modelValue\", val);\n};\n</script>\n\n<template>\n <ElRadioGroup v-model=\"value\" v-bind=\"bindAttrs\" @change=\"handleChange\">\n <template v-if=\"type === 'button'\">\n <ElRadioButton\n v-for=\"item of radioOptions\"\n :key=\"item[optValue]\"\n :label=\"item[optValue]\"\n :disabled=\"item.disabled\"\n >\n {{ item[optLabel] }}\n </ElRadioButton>\n </template>\n <template v-else>\n <ElRadio\n v-for=\"item of radioOptions\"\n :key=\"item[optValue]\"\n :label=\"item[optValue]\"\n :disabled=\"item.disabled\"\n >\n {{ item[optLabel] }}\n </ElRadio>\n </template>\n </ElRadioGroup>\n</template>\n"],"names":["inject","DICT_STORE","computed","excludeObjectKeys","excludeRadioKeys","ref","onMounted","watch","_openBlock","_createBlock","_unref","_mergeProps","type","_createElementBlock","_Fragment","_renderList","ElRadioButton","optValue","_createTextVNode","_toDisplayString","optLabel","ElRadio"],"mappings":";;;;;;;;;;;;;;;;;;;;;AASA,IAAA,MAAM,KAAQ,GAAA,OAAA;AACd,IAAA,MAAM,IAAO,GAAA,MAAA;AACb,IAAM,MAAA,SAAA,GAAYA,WAAOC,kBAAU,CAAA;AACnC,IAAA,MAAM,YAAYC,YAAS,CAAA,MAAMC,sBAAkB,CAAA,KAAA,EAAOC,sBAAgB,CAAC,CAAA;AAE3E,IAAM,MAAA,YAAA,GAAeC,OAA2B,CAAA,EAAE,CAAA;AAClD,IAAUC,aAAA,CAAA,MAAM,YAAY,CAAA;AAC5B,IAAAC,SAAA;AAAA,MACE,MAAM,KAAM,CAAA,IAAA;AAAA,MACZ,MAAM,UAAW,EAAA;AAAA,MACjB,EAAE,MAAM,IAAK;AAAA,KACf;AACA,IAAA,eAAe,UAAa,GAAA;AAC1B,MAAM,MAAA,IAAA,GAAO,MAAM,OAAQ,EAAA;AAC3B,MAAA,YAAA,CAAa,QAAQ,KAAM,CAAA,YAAA,GAAe,KAAM,CAAA,YAAA,CAAa,IAAI,CAAI,GAAA,IAAA;AAAA;AAFxD,IAAA,MAAA,CAAA,UAAA,EAAA,YAAA,CAAA;AAKf,IAAA,eAAe,OAAU,GAAA;AACvB,MAAA,IAAI,KAAM,CAAA,OAAA,CAAQ,KAAM,CAAA,IAAI,CAAG,EAAA;AAC7B,QAAA,OAAO,KAAM,CAAA,IAAA;AAAA;AAEf,MAAA,IAAI,SAAW,EAAA;AACb,QAAA,OAAO,MAAM,SAAA,CAAU,OAAQ,CAAA,KAAA,CAAM,IAAI,CAAA;AAAA;AAE3C,MAAA,OAAO,EAAC;AAAA;AAPK,IAAA,MAAA,CAAA,OAAA,EAAA,SAAA,CAAA;AAUf,IAAM,MAAA,KAAA,GAAQF,QAAI,EAAE,CAAA;AACpB,IAAAE,SAAA;AAAA,MACE,MAAM,KAAM,CAAA,UAAA;AAAA,MACZ,CAAC,GAAc,KAAA,KAAA,CAAM,KAAQ,GAAA,GAAA;AAAA,MAC7B,EAAE,IAAA,EAAM,IAAM,EAAA,SAAA,EAAW,IAAK;AAAA,KAChC;AACA,IAAM,MAAA,YAAA,2BAAgB,
|
|
1
|
+
{"version":3,"file":"radio.vue2.js","sources":["../../../../../../../packages/components/radio/src/radio.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ElRadio, ElRadioButton, ElRadioGroup } from \"element-plus\";\nimport { computed, inject, onMounted, ref, watch } from \"vue\";\nimport { DICT_STORE, excludeObjectKeys } from \"../../../utils\";\nimport { excludeRadioKeys, RadioEmits, RadioProps } from \"./radio\";\n\ndefineOptions({\n name: \"IRadio\",\n});\nconst props = defineProps(RadioProps);\nconst emit = defineEmits(RadioEmits);\nconst dictStore = inject(DICT_STORE);\nconst bindAttrs = computed(() => excludeObjectKeys(props, excludeRadioKeys));\n\nconst radioOptions = ref<Record<string, any>[]>([]);\nonMounted(() => setOptions());\nwatch(\n () => props.data,\n () => setOptions(),\n { deep: true },\n);\nasync function setOptions() {\n const list = await getList();\n radioOptions.value = props.dataCallback ? props.dataCallback(list) : list;\n}\n\nasync function getList() {\n if (Array.isArray(props.data)) {\n return props.data;\n }\n if (dictStore) {\n return await dictStore.getDict(props.data);\n }\n return [];\n}\n\nconst value = ref(\"\");\nwatch(\n () => props.modelValue,\n (val: any) => (value.value = val),\n { deep: true, immediate: true },\n);\nconst handleChange = (val: string | number | boolean | undefined) => {\n if (typeof props.changeHandler === \"function\") {\n props.changeHandler(val);\n }\n emit(\"change\", val);\n emit(\"update:modelValue\", val);\n};\n</script>\n\n<template>\n <ElRadioGroup v-model=\"value\" v-bind=\"bindAttrs\" @change=\"handleChange\">\n <template v-if=\"type === 'button'\">\n <ElRadioButton\n v-for=\"item of radioOptions\"\n :key=\"item[optValue]\"\n :label=\"item[optValue]\"\n :disabled=\"item.disabled\"\n >\n {{ item[optLabel] }}\n </ElRadioButton>\n </template>\n <template v-else>\n <ElRadio\n v-for=\"item of radioOptions\"\n :key=\"item[optValue]\"\n :label=\"item[optValue]\"\n :disabled=\"item.disabled\"\n >\n {{ item[optLabel] }}\n </ElRadio>\n </template>\n </ElRadioGroup>\n</template>\n"],"names":["inject","DICT_STORE","computed","excludeObjectKeys","excludeRadioKeys","ref","onMounted","watch","_openBlock","_createBlock","_unref","_mergeProps","type","_createElementBlock","_Fragment","_renderList","ElRadioButton","optValue","_createTextVNode","_toDisplayString","optLabel","ElRadio"],"mappings":";;;;;;;;;;;;;;;;;;;;;AASA,IAAA,MAAM,KAAQ,GAAA,OAAA;AACd,IAAA,MAAM,IAAO,GAAA,MAAA;AACb,IAAM,MAAA,SAAA,GAAYA,WAAOC,kBAAU,CAAA;AACnC,IAAA,MAAM,YAAYC,YAAS,CAAA,MAAMC,sBAAkB,CAAA,KAAA,EAAOC,sBAAgB,CAAC,CAAA;AAE3E,IAAM,MAAA,YA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hB,MAAoB;AAAA,kBAAjBC,mBAAA;AAAA,oBAAAC,mBAAA,CAAA,IAAA,CAAKC,IAAQ,CAAA,QAAA,CAAA,CAAA;AAAA,oBAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;;;;;;"}
|
|
@@ -73,6 +73,9 @@ export declare const ISelect: import("../../types").SFCWithInstall<import("vue")
|
|
|
73
73
|
default: string;
|
|
74
74
|
};
|
|
75
75
|
action: ObjectConstructor;
|
|
76
|
+
changeHandler: {
|
|
77
|
+
type: import("vue").PropType<(value: any) => void>;
|
|
78
|
+
};
|
|
76
79
|
}>, {
|
|
77
80
|
props: import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
78
81
|
multiple: {
|
|
@@ -149,6 +152,9 @@ export declare const ISelect: import("../../types").SFCWithInstall<import("vue")
|
|
|
149
152
|
default: string;
|
|
150
153
|
};
|
|
151
154
|
action: ObjectConstructor;
|
|
155
|
+
changeHandler: {
|
|
156
|
+
type: import("vue").PropType<(value: any) => void>;
|
|
157
|
+
};
|
|
152
158
|
}>> & Readonly<{
|
|
153
159
|
onClear?: (() => any) | undefined;
|
|
154
160
|
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
@@ -785,6 +791,9 @@ export declare const ISelect: import("../../types").SFCWithInstall<import("vue")
|
|
|
785
791
|
default: string;
|
|
786
792
|
};
|
|
787
793
|
action: ObjectConstructor;
|
|
794
|
+
changeHandler: {
|
|
795
|
+
type: import("vue").PropType<(value: any) => void>;
|
|
796
|
+
};
|
|
788
797
|
}>> & Readonly<{
|
|
789
798
|
onClear?: (() => any) | undefined;
|
|
790
799
|
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ExtractPropTypes, ExtractPublicPropTypes, PropType } from
|
|
2
|
-
import type Select from
|
|
1
|
+
import type { ExtractPropTypes, ExtractPublicPropTypes, PropType } from "vue";
|
|
2
|
+
import type Select from "./select.vue";
|
|
3
3
|
export declare const SelectProps: {
|
|
4
4
|
multiple: {
|
|
5
5
|
type: BooleanConstructor;
|
|
@@ -75,6 +75,9 @@ export declare const SelectProps: {
|
|
|
75
75
|
default: string;
|
|
76
76
|
};
|
|
77
77
|
action: ObjectConstructor;
|
|
78
|
+
changeHandler: {
|
|
79
|
+
type: PropType<(value: any) => void>;
|
|
80
|
+
};
|
|
78
81
|
};
|
|
79
82
|
export type SelectPropsType = ExtractPropTypes<typeof SelectProps>;
|
|
80
83
|
export type SelectPublicPropsType = ExtractPublicPropTypes<typeof SelectProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.js","sources":["../../../../../../../packages/components/select/src/select.ts"],"sourcesContent":["import type { ExtractPropTypes, ExtractPublicPropTypes, PropType } from
|
|
1
|
+
{"version":3,"file":"select.js","sources":["../../../../../../../packages/components/select/src/select.ts"],"sourcesContent":["import type { ExtractPropTypes, ExtractPublicPropTypes, PropType } from \"vue\";\nimport type Select from \"./select.vue\";\n\nexport const SelectProps = {\n multiple: {\n type: Boolean,\n default: false,\n },\n disabled: {\n type: Boolean,\n default: false,\n },\n valueKey: {\n type: String,\n default: \"value\",\n },\n size: String as PropType<\"\" | \"large\" | \"default\" | \"small\">,\n collapseTags: Boolean,\n collapseTagsTooltip: Boolean,\n multipleLimit: Number,\n name: String,\n effect: String as PropType<\"dark\" | \"light\">,\n autocomplete: String,\n placeholder: {\n type: String,\n default: \"请选择\",\n },\n filterable: Boolean,\n allowCreate: Boolean,\n filterMethod: Object as PropType<() => void>,\n remote: Boolean,\n remoteMethod: Object as PropType<() => void>,\n remoteShowSuffix: Boolean,\n loading: {\n type: Boolean,\n default: false,\n },\n noMatchText: String,\n noDataText: String,\n popperClass: String,\n reserveKeyword: Boolean,\n defaultFirstOption: Boolean,\n teleported: Boolean,\n persistent: {\n type: Boolean,\n default: true,\n },\n clearIcon: [String, Object],\n fitInputWidth: Boolean,\n placement: {\n type: String as PropType<\n | \"top\"\n | \"top-start\"\n | \"top-end\"\n | \"bottom\"\n | \"bottom-start\"\n | \"bottom-end\"\n | \"left\"\n | \"left-start\"\n | \"left-end\"\n | \"right\"\n | \"right-start\"\n | \"right-end\"\n >,\n default: \"bottom-start\",\n },\n modelValue: [String, Number, Array, null],\n clearable: {\n type: Boolean,\n default: true,\n },\n loadingText: {\n type: String,\n default: \"数据加载中\",\n },\n data: {\n type: [Array, String],\n default: () => [],\n },\n dataCallback: {\n type: Function,\n },\n optLabel: {\n type: String,\n default: \"label\",\n },\n optValue: {\n type: String,\n default: \"value\",\n },\n /**\n * pinia useDictStore\n */\n action: Object,\n changeHandler: {\n type: Function as PropType<(value: any) => void>,\n },\n};\n\nexport type SelectPropsType = ExtractPropTypes<typeof SelectProps>;\nexport type SelectPublicPropsType = ExtractPublicPropTypes<typeof SelectProps>;\nexport type SelectInstance = InstanceType<typeof Select>;\n"],"names":[],"mappings":";;;;AAGO,MAAM,WAAc,GAAA;AAAA,EACzB,QAAU,EAAA;AAAA,IACR,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA;AAAA,GACX;AAAA,EACA,QAAU,EAAA;AAAA,IACR,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA;AAAA,GACX;AAAA,EACA,QAAU,EAAA;AAAA,IACR,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA;AAAA,GACX;AAAA,EACA,IAAM,EAAA,MAAA;AAAA,EACN,YAAc,EAAA,OAAA;AAAA,EACd,mBAAqB,EAAA,OAAA;AAAA,EACrB,aAAe,EAAA,MAAA;AAAA,EACf,IAAM,EAAA,MAAA;AAAA,EACN,MAAQ,EAAA,MAAA;AAAA,EACR,YAAc,EAAA,MAAA;AAAA,EACd,WAAa,EAAA;AAAA,IACX,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA;AAAA,GACX;AAAA,EACA,UAAY,EAAA,OAAA;AAAA,EACZ,WAAa,EAAA,OAAA;AAAA,EACb,YAAc,EAAA,MAAA;AAAA,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;AAAA;AAAA;AAAA;AAAA,EAIA,MAAQ,EAAA,MAAA;AAAA,EACR,aAAe,EAAA;AAAA,IACb,IAAM,EAAA;AAAA;AAEV;;;;"}
|
|
@@ -73,6 +73,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
73
73
|
default: string;
|
|
74
74
|
};
|
|
75
75
|
action: ObjectConstructor;
|
|
76
|
+
changeHandler: {
|
|
77
|
+
type: import("vue").PropType<(value: any) => void>;
|
|
78
|
+
};
|
|
76
79
|
}>, {
|
|
77
80
|
props: import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
78
81
|
multiple: {
|
|
@@ -149,6 +152,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
149
152
|
default: string;
|
|
150
153
|
};
|
|
151
154
|
action: ObjectConstructor;
|
|
155
|
+
changeHandler: {
|
|
156
|
+
type: import("vue").PropType<(value: any) => void>;
|
|
157
|
+
};
|
|
152
158
|
}>> & Readonly<{
|
|
153
159
|
onClear?: (() => any) | undefined;
|
|
154
160
|
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
@@ -785,6 +791,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
785
791
|
default: string;
|
|
786
792
|
};
|
|
787
793
|
action: ObjectConstructor;
|
|
794
|
+
changeHandler: {
|
|
795
|
+
type: import("vue").PropType<(value: any) => void>;
|
|
796
|
+
};
|
|
788
797
|
}>> & Readonly<{
|
|
789
798
|
onClear?: (() => any) | undefined;
|
|
790
799
|
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
@@ -37,7 +37,8 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
37
37
|
"optLabel",
|
|
38
38
|
"optValue",
|
|
39
39
|
"modelValue",
|
|
40
|
-
"action"
|
|
40
|
+
"action",
|
|
41
|
+
"changeHandler"
|
|
41
42
|
]);
|
|
42
43
|
});
|
|
43
44
|
const _loading = vue.ref(false);
|
|
@@ -71,6 +72,9 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
71
72
|
}
|
|
72
73
|
});
|
|
73
74
|
const handleChange = /* @__PURE__ */ __name((value) => {
|
|
75
|
+
if (typeof props.changeHandler === "function") {
|
|
76
|
+
props.changeHandler(value);
|
|
77
|
+
}
|
|
74
78
|
emits("update:modelValue", value);
|
|
75
79
|
emits("change", value);
|
|
76
80
|
}, "handleChange");
|