@silver-formily/element-plus 2.2.0 → 2.4.0
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/LICENSE +21 -21
- package/README.en-US.md +2 -2
- package/README.md +2 -2
- package/esm/__builtins__/configs/index.mjs.map +1 -1
- package/esm/__builtins__/index.mjs +18 -21
- package/esm/__builtins__/index.mjs.map +1 -1
- package/esm/__builtins__/shared/index.d.ts +0 -1
- package/esm/__builtins__/shared/index.mjs +18 -21
- package/esm/__builtins__/shared/index.mjs.map +1 -1
- package/esm/__builtins__/shared/loading.mjs +5 -5
- package/esm/__builtins__/shared/loading.mjs.map +1 -1
- package/esm/__builtins__/shared/simple-version-compare.mjs.map +1 -1
- package/esm/__builtins__/shared/transform-component.mjs.map +1 -1
- package/esm/__builtins__/shared/use-enter-submit.d.ts +9 -0
- package/esm/__builtins__/shared/use-enter-submit.mjs +25 -0
- package/esm/__builtins__/shared/use-enter-submit.mjs.map +1 -0
- package/esm/__builtins__/shared/utils.d.ts +1 -0
- package/esm/__builtins__/shared/utils.mjs +23 -17
- package/esm/__builtins__/shared/utils.mjs.map +1 -1
- package/esm/array-base/index.mjs +56 -52
- package/esm/array-base/index.mjs.map +1 -1
- package/esm/array-base/symbols.mjs.map +1 -1
- package/esm/array-base/utils.d.ts +0 -1
- package/esm/array-base/utils.mjs +45 -46
- package/esm/array-base/utils.mjs.map +1 -1
- package/esm/array-cards/index.mjs +36 -33
- package/esm/array-cards/index.mjs.map +1 -1
- package/esm/array-collapse/index.mjs +39 -37
- package/esm/array-collapse/index.mjs.map +1 -1
- package/esm/array-collapse/utils.mjs +9 -2
- package/esm/array-collapse/utils.mjs.map +1 -1
- package/esm/array-items/index.mjs +38 -34
- package/esm/array-items/index.mjs.map +1 -1
- package/esm/array-list-tabs/index.mjs +38 -36
- package/esm/array-list-tabs/index.mjs.map +1 -1
- package/esm/array-list-tabs/utils.mjs +12 -5
- package/esm/array-list-tabs/utils.mjs.map +1 -1
- package/esm/array-table/index.mjs +63 -60
- package/esm/array-table/index.mjs.map +1 -1
- package/esm/array-table/utils.mjs +18 -11
- package/esm/array-table/utils.mjs.map +1 -1
- package/esm/array-tabs/index.mjs +28 -25
- package/esm/array-tabs/index.mjs.map +1 -1
- package/esm/autocomplete/autocomplete.d.ts +1222 -0
- package/esm/autocomplete/index.d.ts +639 -0
- package/esm/autocomplete/index.mjs +116 -0
- package/esm/autocomplete/index.mjs.map +1 -0
- package/esm/cascader/index.mjs +22 -18
- package/esm/cascader/index.mjs.map +1 -1
- package/esm/checkbox/index.d.ts +42 -42
- package/esm/checkbox/index.mjs +20 -16
- package/esm/checkbox/index.mjs.map +1 -1
- package/esm/color-picker/index.d.ts +210 -0
- package/esm/color-picker/index.mjs +17 -0
- package/esm/color-picker/index.mjs.map +1 -0
- package/esm/color-picker-panel/index.d.ts +129 -0
- package/esm/color-picker-panel/index.mjs +25 -0
- package/esm/color-picker-panel/index.mjs.map +1 -0
- package/esm/date-picker/index.mjs +18 -37
- package/esm/date-picker/index.mjs.map +1 -1
- package/esm/date-picker/utils.d.ts +4 -0
- package/esm/date-picker/utils.mjs +27 -0
- package/esm/date-picker/utils.mjs.map +1 -0
- package/esm/date-picker-panel/index.d.ts +143 -0
- package/esm/date-picker-panel/index.mjs +30 -0
- package/esm/date-picker-panel/index.mjs.map +1 -0
- package/esm/editable/editable.d.ts +2 -0
- package/esm/editable/index.d.ts +1 -0
- package/esm/editable/index.mjs +71 -66
- package/esm/editable/index.mjs.map +1 -1
- package/esm/env.d.mjs +2 -0
- package/esm/env.d.mjs.map +1 -0
- package/esm/form/form.mjs +6 -6
- package/esm/form/form.mjs.map +1 -1
- package/esm/form-button-group/form-button-group.d.ts +10 -1
- package/esm/form-button-group/index.d.ts +18 -3
- package/esm/form-button-group/index.mjs +47 -28
- package/esm/form-button-group/index.mjs.map +1 -1
- package/esm/form-button-group/utils.mjs +9 -2
- package/esm/form-button-group/utils.mjs.map +1 -1
- package/esm/form-collapse/index.mjs +21 -18
- package/esm/form-collapse/index.mjs.map +1 -1
- package/esm/form-collapse/utils.mjs.map +1 -1
- package/esm/form-dialog/dialog-content.d.ts +789 -3
- package/esm/form-dialog/index.mjs +97 -86
- package/esm/form-dialog/index.mjs.map +1 -1
- package/esm/form-dialog/types.d.ts +1 -0
- package/esm/form-drawer/drawer-content.d.ts +919 -3
- package/esm/form-drawer/index.mjs +92 -82
- package/esm/form-drawer/index.mjs.map +1 -1
- package/esm/form-drawer/types.d.ts +1 -0
- package/esm/form-grid/hooks.mjs.map +1 -1
- package/esm/form-grid/index.mjs +26 -22
- package/esm/form-grid/index.mjs.map +1 -1
- package/esm/form-item/index.d.ts +1 -0
- package/esm/form-item/index.mjs +102 -99
- package/esm/form-item/index.mjs.map +1 -1
- package/esm/form-item/types.d.ts +4 -0
- package/esm/form-item/utils.mjs.map +1 -1
- package/esm/form-layout/form-layout.mjs +18 -14
- package/esm/form-layout/form-layout.mjs.map +1 -1
- package/esm/form-layout/utils.mjs +23 -23
- package/esm/form-layout/utils.mjs.map +1 -1
- package/esm/form-step/index.mjs +30 -27
- package/esm/form-step/index.mjs.map +1 -1
- package/esm/form-step/utils.mjs.map +1 -1
- package/esm/form-tab/hooks.mjs.map +1 -1
- package/esm/form-tab/index.mjs +24 -22
- package/esm/form-tab/index.mjs.map +1 -1
- package/esm/form-tab/utils.mjs.map +1 -1
- package/esm/index.d.ts +8 -0
- package/esm/index.mjs +90 -74
- package/esm/index.mjs.map +1 -1
- package/esm/input/index.mjs +30 -26
- package/esm/input/index.mjs.map +1 -1
- package/esm/input-number/index.d.ts +21 -21
- package/esm/input-number/index.mjs +11 -8
- package/esm/input-number/index.mjs.map +1 -1
- package/esm/input-tag/index.d.ts +32 -0
- package/esm/input-tag/index.mjs +50 -0
- package/esm/input-tag/index.mjs.map +1 -0
- package/esm/input-tag/input-tag.d.ts +32 -0
- package/esm/mention/index.d.ts +50 -0
- package/esm/mention/index.mjs +97 -0
- package/esm/mention/index.mjs.map +1 -0
- package/esm/mention/mention.d.ts +51 -0
- package/esm/pagination/components/jumper.mjs.map +1 -1
- package/esm/pagination/components/next.mjs.map +1 -1
- package/esm/pagination/components/pager.mjs.map +1 -1
- package/esm/pagination/components/prev.mjs.map +1 -1
- package/esm/pagination/components/total.mjs.map +1 -1
- package/esm/pagination/pagination.mjs.map +1 -1
- package/esm/password/index.mjs.map +1 -1
- package/esm/preview-text/color-picker.d.ts +5 -0
- package/esm/preview-text/index.d.ts +5 -0
- package/esm/preview-text/index.mjs +184 -145
- package/esm/preview-text/index.mjs.map +1 -1
- package/esm/preview-text/utils.mjs.map +1 -1
- package/esm/query-form/default-components.d.ts +5 -0
- package/esm/query-form/default-components.mjs +47 -0
- package/esm/query-form/default-components.mjs.map +1 -0
- package/esm/query-form/hooks.d.ts +25 -0
- package/esm/query-form/hooks.mjs +29 -0
- package/esm/query-form/hooks.mjs.map +1 -0
- package/esm/query-form/index.d.ts +117 -0
- package/esm/query-form/index.mjs +337 -0
- package/esm/query-form/index.mjs.map +1 -0
- package/esm/query-form/query-form-light.d.ts +27 -0
- package/esm/query-form/query-form.d.ts +52 -0
- package/esm/query-form/types.d.ts +44 -0
- package/esm/query-form/types.mjs +2 -0
- package/esm/query-form/types.mjs.map +1 -0
- package/esm/query-form-item/index.d.ts +151 -0
- package/esm/query-form-item/index.mjs +188 -0
- package/esm/query-form-item/index.mjs.map +1 -0
- package/esm/query-form-item/query-form-item.d.ts +96 -0
- package/esm/query-form-item/types.d.ts +46 -0
- package/esm/query-form-item/types.mjs +2 -0
- package/esm/query-form-item/types.mjs.map +1 -0
- package/esm/radio/index.d.ts +36 -36
- package/esm/radio/index.mjs +29 -25
- package/esm/radio/index.mjs.map +1 -1
- package/esm/rate/index.mjs +13 -10
- package/esm/rate/index.mjs.map +1 -1
- package/esm/reset/index.mjs.map +1 -1
- package/esm/segmented/index.mjs +16 -12
- package/esm/segmented/index.mjs.map +1 -1
- package/esm/select/index.mjs +26 -22
- package/esm/select/index.mjs.map +1 -1
- package/esm/select-table/index.mjs +36 -33
- package/esm/select-table/index.mjs.map +1 -1
- package/esm/shared/overlay-elements.d.ts +6 -0
- package/esm/shared/overlay-elements.mjs +19 -0
- package/esm/shared/overlay-elements.mjs.map +1 -0
- package/esm/slider/index.mjs +13 -10
- package/esm/slider/index.mjs.map +1 -1
- package/esm/styles/form-button-group/index.css +1 -1
- package/esm/styles/form-item/index.css +1 -1
- package/esm/styles/preview-text/index.css +1 -1
- package/esm/styles/query-form/index.css +1 -0
- package/esm/styles/query-form-item/index.css +1 -0
- package/esm/submit/index.mjs.map +1 -1
- package/esm/switch/index.d.ts +12 -12
- package/esm/switch/index.mjs.map +1 -1
- package/esm/time-picker/index.mjs +9 -6
- package/esm/time-picker/index.mjs.map +1 -1
- package/esm/time-select/index.mjs +9 -6
- package/esm/time-select/index.mjs.map +1 -1
- package/esm/transfer/index.mjs.map +1 -1
- package/esm/tree/index.mjs +33 -29
- package/esm/tree/index.mjs.map +1 -1
- package/esm/tree/utils.mjs.map +1 -1
- package/esm/tree-select/index.mjs +18 -14
- package/esm/tree-select/index.mjs.map +1 -1
- package/esm/upload/index.d.ts +1 -1
- package/esm/upload/index.mjs +10 -7
- package/esm/upload/index.mjs.map +1 -1
- package/esm/upload/upload.d.ts +2 -2
- package/esm/vendor/lodash.mjs +751 -663
- package/esm/vendor/lodash.mjs.map +1 -1
- package/esm/vendor/sizes.mjs.map +1 -1
- package/package.json +115 -113
- package/esm/__builtins__/shared/hooks.d.ts +0 -7
- package/esm/__builtins__/shared/hooks.mjs +0 -59
- package/esm/__builtins__/shared/hooks.mjs.map +0 -1
package/esm/radio/index.d.ts
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
export declare const Radio: {
|
|
2
2
|
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
|
|
3
|
-
value: {
|
|
4
|
-
type: import('vue').PropType<string | number | boolean>;
|
|
5
|
-
default: undefined;
|
|
6
|
-
};
|
|
7
3
|
size: {
|
|
8
4
|
type: import('vue').PropType<"" | "small" | "default" | "large">;
|
|
9
5
|
};
|
|
@@ -11,10 +7,18 @@ export declare const Radio: {
|
|
|
11
7
|
type: import('vue').PropType<string | number | boolean>;
|
|
12
8
|
default: undefined;
|
|
13
9
|
};
|
|
10
|
+
border: {
|
|
11
|
+
type: import('vue').PropType<boolean>;
|
|
12
|
+
default: false;
|
|
13
|
+
};
|
|
14
14
|
name: {
|
|
15
15
|
type: import('vue').PropType<string>;
|
|
16
16
|
default: undefined;
|
|
17
17
|
};
|
|
18
|
+
value: {
|
|
19
|
+
type: import('vue').PropType<string | number | boolean>;
|
|
20
|
+
default: undefined;
|
|
21
|
+
};
|
|
18
22
|
disabled: {
|
|
19
23
|
type: import('vue').PropType<boolean>;
|
|
20
24
|
default: undefined;
|
|
@@ -23,10 +27,6 @@ export declare const Radio: {
|
|
|
23
27
|
type: import('vue').PropType<string | number | boolean>;
|
|
24
28
|
default: undefined;
|
|
25
29
|
};
|
|
26
|
-
border: {
|
|
27
|
-
type: import('vue').PropType<boolean>;
|
|
28
|
-
default: false;
|
|
29
|
-
};
|
|
30
30
|
}>> & {
|
|
31
31
|
"onUpdate:modelValue"?: ((val: string | number | boolean | undefined) => any) | undefined;
|
|
32
32
|
onChange?: ((val: string | number | boolean | undefined) => any) | undefined;
|
|
@@ -48,10 +48,6 @@ export declare const Radio: {
|
|
|
48
48
|
M: {};
|
|
49
49
|
Defaults: {};
|
|
50
50
|
}, Readonly<import('vue').ExtractPropTypes<{
|
|
51
|
-
value: {
|
|
52
|
-
type: import('vue').PropType<string | number | boolean>;
|
|
53
|
-
default: undefined;
|
|
54
|
-
};
|
|
55
51
|
size: {
|
|
56
52
|
type: import('vue').PropType<"" | "small" | "default" | "large">;
|
|
57
53
|
};
|
|
@@ -59,10 +55,18 @@ export declare const Radio: {
|
|
|
59
55
|
type: import('vue').PropType<string | number | boolean>;
|
|
60
56
|
default: undefined;
|
|
61
57
|
};
|
|
58
|
+
border: {
|
|
59
|
+
type: import('vue').PropType<boolean>;
|
|
60
|
+
default: false;
|
|
61
|
+
};
|
|
62
62
|
name: {
|
|
63
63
|
type: import('vue').PropType<string>;
|
|
64
64
|
default: undefined;
|
|
65
65
|
};
|
|
66
|
+
value: {
|
|
67
|
+
type: import('vue').PropType<string | number | boolean>;
|
|
68
|
+
default: undefined;
|
|
69
|
+
};
|
|
66
70
|
disabled: {
|
|
67
71
|
type: import('vue').PropType<boolean>;
|
|
68
72
|
default: undefined;
|
|
@@ -71,10 +75,6 @@ export declare const Radio: {
|
|
|
71
75
|
type: import('vue').PropType<string | number | boolean>;
|
|
72
76
|
default: undefined;
|
|
73
77
|
};
|
|
74
|
-
border: {
|
|
75
|
-
type: import('vue').PropType<boolean>;
|
|
76
|
-
default: false;
|
|
77
|
-
};
|
|
78
78
|
}>> & {
|
|
79
79
|
"onUpdate:modelValue"?: ((val: string | number | boolean | undefined) => any) | undefined;
|
|
80
80
|
onChange?: ((val: string | number | boolean | undefined) => any) | undefined;
|
|
@@ -90,10 +90,6 @@ export declare const Radio: {
|
|
|
90
90
|
__isTeleport?: never;
|
|
91
91
|
__isSuspense?: never;
|
|
92
92
|
} & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
|
|
93
|
-
value: {
|
|
94
|
-
type: import('vue').PropType<string | number | boolean>;
|
|
95
|
-
default: undefined;
|
|
96
|
-
};
|
|
97
93
|
size: {
|
|
98
94
|
type: import('vue').PropType<"" | "small" | "default" | "large">;
|
|
99
95
|
};
|
|
@@ -101,10 +97,18 @@ export declare const Radio: {
|
|
|
101
97
|
type: import('vue').PropType<string | number | boolean>;
|
|
102
98
|
default: undefined;
|
|
103
99
|
};
|
|
100
|
+
border: {
|
|
101
|
+
type: import('vue').PropType<boolean>;
|
|
102
|
+
default: false;
|
|
103
|
+
};
|
|
104
104
|
name: {
|
|
105
105
|
type: import('vue').PropType<string>;
|
|
106
106
|
default: undefined;
|
|
107
107
|
};
|
|
108
|
+
value: {
|
|
109
|
+
type: import('vue').PropType<string | number | boolean>;
|
|
110
|
+
default: undefined;
|
|
111
|
+
};
|
|
108
112
|
disabled: {
|
|
109
113
|
type: import('vue').PropType<boolean>;
|
|
110
114
|
default: undefined;
|
|
@@ -113,10 +117,6 @@ export declare const Radio: {
|
|
|
113
117
|
type: import('vue').PropType<string | number | boolean>;
|
|
114
118
|
default: undefined;
|
|
115
119
|
};
|
|
116
|
-
border: {
|
|
117
|
-
type: import('vue').PropType<boolean>;
|
|
118
|
-
default: false;
|
|
119
|
-
};
|
|
120
120
|
}>> & {
|
|
121
121
|
"onUpdate:modelValue"?: ((val: string | number | boolean | undefined) => any) | undefined;
|
|
122
122
|
onChange?: ((val: string | number | boolean | undefined) => any) | undefined;
|
|
@@ -137,10 +137,6 @@ export declare const Radio: {
|
|
|
137
137
|
}) & import('vue').ObjectPlugin & {
|
|
138
138
|
RadioButton: {
|
|
139
139
|
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
|
|
140
|
-
value: {
|
|
141
|
-
type: import('vue').PropType<string | number | boolean>;
|
|
142
|
-
default: undefined;
|
|
143
|
-
};
|
|
144
140
|
size: {
|
|
145
141
|
type: import('vue').PropType<"" | "small" | "default" | "large">;
|
|
146
142
|
};
|
|
@@ -152,6 +148,10 @@ export declare const Radio: {
|
|
|
152
148
|
type: import('vue').PropType<string>;
|
|
153
149
|
default: undefined;
|
|
154
150
|
};
|
|
151
|
+
value: {
|
|
152
|
+
type: import('vue').PropType<string | number | boolean>;
|
|
153
|
+
default: undefined;
|
|
154
|
+
};
|
|
155
155
|
disabled: {
|
|
156
156
|
type: import('vue').PropType<boolean>;
|
|
157
157
|
default: undefined;
|
|
@@ -174,10 +174,6 @@ export declare const Radio: {
|
|
|
174
174
|
M: {};
|
|
175
175
|
Defaults: {};
|
|
176
176
|
}, Readonly<import('vue').ExtractPropTypes<{
|
|
177
|
-
value: {
|
|
178
|
-
type: import('vue').PropType<string | number | boolean>;
|
|
179
|
-
default: undefined;
|
|
180
|
-
};
|
|
181
177
|
size: {
|
|
182
178
|
type: import('vue').PropType<"" | "small" | "default" | "large">;
|
|
183
179
|
};
|
|
@@ -189,6 +185,10 @@ export declare const Radio: {
|
|
|
189
185
|
type: import('vue').PropType<string>;
|
|
190
186
|
default: undefined;
|
|
191
187
|
};
|
|
188
|
+
value: {
|
|
189
|
+
type: import('vue').PropType<string | number | boolean>;
|
|
190
|
+
default: undefined;
|
|
191
|
+
};
|
|
192
192
|
disabled: {
|
|
193
193
|
type: import('vue').PropType<boolean>;
|
|
194
194
|
default: undefined;
|
|
@@ -208,10 +208,6 @@ export declare const Radio: {
|
|
|
208
208
|
__isTeleport?: never;
|
|
209
209
|
__isSuspense?: never;
|
|
210
210
|
} & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
|
|
211
|
-
value: {
|
|
212
|
-
type: import('vue').PropType<string | number | boolean>;
|
|
213
|
-
default: undefined;
|
|
214
|
-
};
|
|
215
211
|
size: {
|
|
216
212
|
type: import('vue').PropType<"" | "small" | "default" | "large">;
|
|
217
213
|
};
|
|
@@ -223,6 +219,10 @@ export declare const Radio: {
|
|
|
223
219
|
type: import('vue').PropType<string>;
|
|
224
220
|
default: undefined;
|
|
225
221
|
};
|
|
222
|
+
value: {
|
|
223
|
+
type: import('vue').PropType<string | number | boolean>;
|
|
224
|
+
default: undefined;
|
|
225
|
+
};
|
|
226
226
|
disabled: {
|
|
227
227
|
type: import('vue').PropType<boolean>;
|
|
228
228
|
default: undefined;
|
package/esm/radio/index.mjs
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { connect as E, mapProps as T } from "@silver-formily/vue";
|
|
2
2
|
import { ElRadioButton as B, ElRadio as v, ElRadioGroup as C, version as G } from "element-plus";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
3
|
+
import "@formily/reactive";
|
|
4
|
+
import "@vueuse/core";
|
|
5
|
+
import { defineComponent as O, computed as c, useSlots as x, createBlock as p, openBlock as t, unref as u, normalizeProps as A, guardReactiveProps as L, withCtx as i, createElementBlock as f, Fragment as d, renderList as _, resolveDynamicComponent as y, mergeProps as b, createTextVNode as h, toDisplayString as j, renderSlot as w } from "vue";
|
|
6
|
+
import { mapReadPretty as D } from "../__builtins__/shared/transform-component.mjs";
|
|
7
|
+
import { useCleanAttrs as F, composeExport as N } from "../__builtins__/shared/utils.mjs";
|
|
8
|
+
import { PreviewText as z } from "../preview-text/index.mjs";
|
|
9
|
+
import { isPlainObj as H } from "@formily/shared";
|
|
10
|
+
import { lt as I } from "../__builtins__/shared/simple-version-compare.mjs";
|
|
11
|
+
import "@formily/core";
|
|
12
|
+
import "@silver-formily/reactive-vue";
|
|
13
|
+
import '../styles/radio/index.css';const V = /* @__PURE__ */ O({
|
|
10
14
|
name: "FRadioGroup",
|
|
11
15
|
__name: "radio-group",
|
|
12
16
|
props: {
|
|
@@ -20,15 +24,15 @@ import '../styles/radio/index.css';const V = /* @__PURE__ */ x({
|
|
|
20
24
|
}
|
|
21
25
|
},
|
|
22
26
|
setup(P) {
|
|
23
|
-
const o = P, { props: R } =
|
|
24
|
-
function
|
|
25
|
-
return
|
|
27
|
+
const o = P, { props: R } = F(), s = c(() => o.optionType === "button" ? B : v), S = I(G, "2.6.0");
|
|
28
|
+
function l(e) {
|
|
29
|
+
return H(e);
|
|
26
30
|
}
|
|
27
31
|
function g(e, n) {
|
|
28
|
-
return
|
|
32
|
+
return l(o.options[n]) ? o.options[n].label : e.label;
|
|
29
33
|
}
|
|
30
34
|
const m = c(() => o.options.map((e) => {
|
|
31
|
-
if (!
|
|
35
|
+
if (!l(e))
|
|
32
36
|
return {
|
|
33
37
|
label: e,
|
|
34
38
|
value: e
|
|
@@ -38,17 +42,17 @@ import '../styles/radio/index.css';const V = /* @__PURE__ */ x({
|
|
|
38
42
|
...e,
|
|
39
43
|
label: e.value
|
|
40
44
|
} : e;
|
|
41
|
-
})), k =
|
|
42
|
-
return (e, n) => (t(), p(u(C), L(
|
|
43
|
-
default:
|
|
44
|
-
u(k).option ? (t(!0), f(d, { key: 1 }, _(m.value, (r, a) => (t(), p(y(
|
|
45
|
-
default:
|
|
46
|
-
|
|
45
|
+
})), k = x();
|
|
46
|
+
return (e, n) => (t(), p(u(C), A(L(u(R))), {
|
|
47
|
+
default: i(() => [
|
|
48
|
+
u(k).option ? (t(!0), f(d, { key: 1 }, _(m.value, (r, a) => (t(), p(y(s.value), b({ key: a }, { ref_for: !0 }, r), {
|
|
49
|
+
default: i(() => [
|
|
50
|
+
w(e.$slots, "option", { option: r })
|
|
47
51
|
]),
|
|
48
52
|
_: 2
|
|
49
|
-
}, 1040))), 128)) : (t(!0), f(d, { key: 0 }, _(m.value, (r, a) => (t(), p(y(
|
|
50
|
-
default:
|
|
51
|
-
j(
|
|
53
|
+
}, 1040))), 128)) : (t(!0), f(d, { key: 0 }, _(m.value, (r, a) => (t(), p(y(s.value), b({ key: a }, { ref_for: !0 }, r), {
|
|
54
|
+
default: i(() => [
|
|
55
|
+
h(j(g(r, a)), 1)
|
|
52
56
|
]),
|
|
53
57
|
_: 2
|
|
54
58
|
}, 1040))), 128))
|
|
@@ -59,12 +63,12 @@ import '../styles/radio/index.css';const V = /* @__PURE__ */ x({
|
|
|
59
63
|
}), $ = E(
|
|
60
64
|
V,
|
|
61
65
|
T({ dataSource: "options", disabled: !0 }),
|
|
62
|
-
|
|
63
|
-
),
|
|
66
|
+
D(z.Select)
|
|
67
|
+
), te = N(v, {
|
|
64
68
|
Group: $
|
|
65
69
|
});
|
|
66
70
|
export {
|
|
67
|
-
|
|
68
|
-
|
|
71
|
+
te as Radio,
|
|
72
|
+
te as default
|
|
69
73
|
};
|
|
70
74
|
//# sourceMappingURL=index.mjs.map
|
package/esm/radio/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/radio/radio-group.vue","../../src/radio/index.ts"],"sourcesContent":["<script setup lang=\"ts\">\
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../src/radio/radio-group.vue","../../src/radio/index.ts"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { RadioProps } from 'element-plus'\nimport type { PropType } from 'vue'\nimport { isPlainObj } from '@formily/shared'\nimport { ElRadio, ElRadioButton, ElRadioGroup, version } from 'element-plus'\nimport { computed, useSlots } from 'vue'\nimport { lt, useCleanAttrs } from '../__builtins__'\n\ndefineOptions({\n name: 'FRadioGroup',\n})\n\nconst props = defineProps({\n options: {\n type: Array as PropType<Array<RadioProps | string | number>>,\n default: () => [],\n },\n optionType: {\n type: String as PropType<'default' | 'button'>,\n default: 'default',\n },\n})\n\nconst { props: radioProps } = useCleanAttrs()\n\nconst OptionType = computed(() => {\n return props.optionType === 'button' ? ElRadioButton : ElRadio\n})\nconst IS_LESS_THAN_2_6_0 = lt(version, '2.6.0')\n\nfunction isRadioPropsObject(option: any): option is RadioProps {\n return isPlainObj(option)\n}\n\nfunction getOptionLabel(option: any, index: number) {\n if (isRadioPropsObject(props.options[index])) {\n return props.options[index].label\n }\n return option.label\n}\n\nconst compatiableProps = computed(() => {\n return props.options.map((option) => {\n if (!isRadioPropsObject(option)) {\n return {\n label: option,\n value: option,\n }\n }\n /* istanbul ignore if -- @preserve */\n if (IS_LESS_THAN_2_6_0) {\n return {\n ...option,\n label: option.value,\n }\n }\n return option\n })\n})\n\nconst slots = useSlots()\n</script>\n\n<template>\n <ElRadioGroup v-bind=\"radioProps\">\n <template v-if=\"!slots.option\">\n <component :is=\"OptionType\" v-for=\"(option, index) of compatiableProps\" :key=\"index\" v-bind=\"option\">\n {{ getOptionLabel(option, index) }}\n </component>\n </template>\n <template v-else>\n <component :is=\"OptionType\" v-for=\"(option, index) of compatiableProps\" :key=\"index\" v-bind=\"option\">\n <slot name=\"option\" :option=\"option\" />\n </component>\n </template>\n </ElRadioGroup>\n</template>\n","import { connect, mapProps } from '@silver-formily/vue'\nimport { ElRadio } from 'element-plus'\nimport { composeExport, mapReadPretty } from '../__builtins__'\nimport { PreviewText } from '../preview-text'\nimport FRadioGroup from './radio-group.vue'\nimport './style.scss'\n\nconst RadioGroup = connect<typeof FRadioGroup>(\n FRadioGroup,\n mapProps({ dataSource: 'options', disabled: true }),\n mapReadPretty(PreviewText.Select),\n)\nexport const Radio = composeExport(ElRadio, {\n Group: RadioGroup,\n})\n\nexport default Radio\n"],"names":["props","__props","radioProps","useCleanAttrs","OptionType","computed","ElRadioButton","ElRadio","IS_LESS_THAN_2_6_0","lt","version","isRadioPropsObject","option","isPlainObj","getOptionLabel","index","compatiableProps","slots","useSlots","_openBlock","_createBlock","_unref","_createElementBlock","_Fragment","_renderList","_resolveDynamicComponent","_mergeProps","_renderSlot","_ctx","RadioGroup","connect","FRadioGroup","mapProps","mapReadPretty","PreviewText","Radio","composeExport"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,UAAMA,IAAQC,GAWR,EAAE,OAAOC,EAAA,IAAeC,EAAA,GAExBC,IAAaC,EAAS,MACnBL,EAAM,eAAe,WAAWM,IAAgBC,CACxD,GACKC,IAAqBC,EAAGC,GAAS,OAAO;AAE9C,aAASC,EAAmBC,GAAmC;AAC7D,aAAOC,EAAWD,CAAM;AAAA,IAC1B;AAEA,aAASE,EAAeF,GAAaG,GAAe;AAClD,aAAIJ,EAAmBX,EAAM,QAAQe,CAAK,CAAC,IAClCf,EAAM,QAAQe,CAAK,EAAE,QAEvBH,EAAO;AAAA,IAChB;AAEA,UAAMI,IAAmBX,EAAS,MACzBL,EAAM,QAAQ,IAAI,CAACY,MAAW;AACnC,UAAI,CAACD,EAAmBC,CAAM;AAC5B,eAAO;AAAA,UACL,OAAOA;AAAA,UACP,OAAOA;AAAA,QAAA;AAAA,MAEX;AAEA,aAAIJ,IACK;AAAA,QACL,GAAGI;AAAA,QACH,OAAOA,EAAO;AAAA,MAAA,IAGXA;AAAA,IACT,CAAC,CACF,GAEKK,IAAQC,EAAA;sBAIZC,EAAA,GAAAC,EAWeC,UAXOA,EAAAnB,CAAA,CAAU,CAAA,GAAA;AAAA,iBAC9B,MAIW;AAAA,QAJMmB,EAAAJ,CAAA,EAAM,UAMrBE,EAAA,EAAA,GAAAG,EAEYC,GAAA,EAAA,KAAA,KAAAC,EAF0CR,EAAA,OAAgB,CAAlCJ,GAAQG,YAA5CK,EAEYK,EAFIrB,OAAU,GAA1BsB,EAEY,EAF6D,KAAKX,KAAK,EAAA,SAAA,GAAA,GAAUH,CAAM,GAAA;AAAA,qBACjG,MAAuC;AAAA,YAAvCe,EAAuCC,EAAA,QAAA,UAAA,EAAlB,QAAAhB,GAAc;AAAA,UAAA;;6BANrCO,EAAA,EAAA,GAAAG,EAEYC,GAAA,EAAA,KAAA,KAAAC,EAF0CR,EAAA,OAAgB,CAAlCJ,GAAQG,YAA5CK,EAEYK,EAFIrB,OAAU,GAA1BsB,EAEY,EAF6D,KAAKX,KAAK,EAAA,SAAA,GAAA,GAAUH,CAAM,GAAA;AAAA,qBACjG,MAAmC;AAAA,gBAAhCE,EAAeF,GAAQG,CAAK,CAAA,GAAA,CAAA;AAAA,UAAA;;;;;;;IC5DjCc,IAAaC;AAAA,EACjBC;AAAAA,EACAC,EAAS,EAAE,YAAY,WAAW,UAAU,IAAM;AAAA,EAClDC,EAAcC,EAAY,MAAM;AAClC,GACaC,KAAQC,EAAc7B,GAAS;AAAA,EAC1C,OAAOsB;AACT,CAAC;"}
|
package/esm/rate/index.mjs
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
import { connect as
|
|
2
|
-
import { ElRate as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { connect as r, mapProps as t } from "@silver-formily/vue";
|
|
2
|
+
import { ElRate as o } from "element-plus";
|
|
3
|
+
import "@formily/reactive";
|
|
4
|
+
import "@vueuse/core";
|
|
5
|
+
import "vue";
|
|
6
|
+
import { mapReadPretty as e } from "../__builtins__/shared/transform-component.mjs";
|
|
7
|
+
import { PreviewText as m } from "../preview-text/index.mjs";
|
|
8
|
+
const s = r(
|
|
9
|
+
o,
|
|
10
|
+
t({ readOnly: "readonly", disabled: !0 }),
|
|
11
|
+
e(m.Rate)
|
|
9
12
|
);
|
|
10
13
|
export {
|
|
11
|
-
|
|
12
|
-
|
|
14
|
+
s as Rate,
|
|
15
|
+
s as default
|
|
13
16
|
};
|
|
14
17
|
//# sourceMappingURL=index.mjs.map
|
package/esm/rate/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/rate/index.ts"],"sourcesContent":["import { connect, mapProps } from '@silver-formily/vue'\nimport { ElRate } from 'element-plus'\nimport { mapReadPretty } from '../__builtins__'\nimport { PreviewText } from '../preview-text'\n\nexport type RateProps = typeof ElRate\n\nexport const Rate = connect<typeof ElRate>(\n ElRate,\n mapProps({ readOnly: 'readonly', disabled: true }),\n mapReadPretty(PreviewText.Rate),\n)\n\nexport default Rate\n"],"names":["Rate","connect","ElRate","mapProps","mapReadPretty","PreviewText"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../src/rate/index.ts"],"sourcesContent":["import { connect, mapProps } from '@silver-formily/vue'\nimport { ElRate } from 'element-plus'\nimport { mapReadPretty } from '../__builtins__'\nimport { PreviewText } from '../preview-text'\n\nexport type RateProps = typeof ElRate\n\nexport const Rate = connect<typeof ElRate>(\n ElRate,\n mapProps({ readOnly: 'readonly', disabled: true }),\n mapReadPretty(PreviewText.Rate),\n)\n\nexport default Rate\n"],"names":["Rate","connect","ElRate","mapProps","mapReadPretty","PreviewText"],"mappings":";;;;;;;AAOO,MAAMA,IAAOC;AAAA,EAClBC;AAAA,EACAC,EAAS,EAAE,UAAU,YAAY,UAAU,IAAM;AAAA,EACjDC,EAAcC,EAAY,IAAI;AAChC;"}
|
package/esm/reset/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/reset/reset.vue","../../src/reset/index.ts"],"sourcesContent":["<script lang=\"ts\" setup>\
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../src/reset/reset.vue","../../src/reset/index.ts"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { PropType } from 'vue'\nimport { useParentForm } from '@silver-formily/vue'\nimport { ElButton } from 'element-plus'\n\ndefineOptions({\n name: 'FReset',\n inheritAttrs: false,\n})\n\nconst props = defineProps({\n onClick: Function as PropType<(e: MouseEvent) => void | boolean>,\n forceClear: {\n type: Boolean,\n default: false,\n },\n validate: {\n type: Boolean,\n default: false,\n },\n onResetValidateSuccess: Function as PropType<(payload: any) => void>,\n onResetValidateFailed: Function as PropType<(error: any) => void>,\n})\n\nconst formRef = useParentForm()\n\nfunction handleClick(e: MouseEvent) {\n if (props.onClick && (props.onClick)?.(e) === false)\n return\n\n const form = formRef?.value\n form?.reset('*', {\n forceClear: props.forceClear,\n })\n props.validate && form?.validate()\n .then(props.onResetValidateSuccess)\n .catch(error => props.onResetValidateFailed?.(error))\n}\n</script>\n\n<template>\n <ElButton v-bind=\"$attrs\" @click=\"handleClick\">\n <slot />\n </ElButton>\n</template>\n","import { observer } from '@silver-formily/reactive-vue'\nimport FReset from './reset.vue'\n\nexport const Reset = observer(FReset)\n\nexport default Reset\n"],"names":["props","__props","formRef","useParentForm","handleClick","e","form","error","_openBlock","_createBlock","_unref","_mergeProps","_ctx","_renderSlot","Reset","observer","FReset"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAUA,UAAMA,IAAQC,GAcRC,IAAUC,EAAA;AAEhB,aAASC,EAAYC,GAAe;AAClC,UAAIL,EAAM,WAAYA,EAAM,UAAWK,CAAC,MAAM;AAC5C;AAEF,YAAMC,IAAOJ,GAAS;AACtB,MAAAI,GAAM,MAAM,KAAK;AAAA,QACf,YAAYN,EAAM;AAAA,MAAA,CACnB,GACDA,EAAM,YAAYM,GAAM,SAAA,EACrB,KAAKN,EAAM,sBAAsB,EACjC,MAAM,CAAAO,MAASP,EAAM,wBAAwBO,CAAK,CAAC;AAAA,IACxD;sBAIEC,EAAA,GAAAC,EAEWC,MAFXC,EAEWC,UAFa,EAAG,SAAOR,EAAA,CAAW,GAAA;AAAA,iBAC3C,MAAQ;AAAA,QAARS,EAAQD,EAAA,QAAA,SAAA;AAAA,MAAA;;;;ICvCCE,IAAQC,EAASC,CAAM;"}
|
package/esm/segmented/index.mjs
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import { connect as m, mapProps as
|
|
2
|
-
import {
|
|
1
|
+
import { connect as m, mapProps as i } from "@silver-formily/vue";
|
|
2
|
+
import { ElSegmented as a } from "element-plus";
|
|
3
|
+
import "@formily/reactive";
|
|
4
|
+
import "@vueuse/core";
|
|
3
5
|
import { defineComponent as c, useSlots as d, createBlock as l, openBlock as f, unref as e, mergeProps as u, createSlots as S, withCtx as g, renderSlot as P, normalizeProps as _, guardReactiveProps as h } from "vue";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
6
|
+
import { mapReadPretty as k } from "../__builtins__/shared/transform-component.mjs";
|
|
7
|
+
import { PreviewText as v } from "../preview-text/index.mjs";
|
|
8
|
+
import "@formily/core";
|
|
9
|
+
import "@silver-formily/reactive-vue";
|
|
10
|
+
import { useCleanAttrs as x } from "../__builtins__/shared/utils.mjs";
|
|
7
11
|
const C = /* @__PURE__ */ c({
|
|
8
12
|
name: "FSegmented",
|
|
9
13
|
inheritAttrs: !1,
|
|
@@ -12,8 +16,8 @@ const C = /* @__PURE__ */ c({
|
|
|
12
16
|
options: {}
|
|
13
17
|
},
|
|
14
18
|
setup(t) {
|
|
15
|
-
const o = t, r = d(), { props: s } =
|
|
16
|
-
return (n, w) => (f(), l(e(
|
|
19
|
+
const o = t, r = d(), { props: s } = x();
|
|
20
|
+
return (n, w) => (f(), l(e(a), u(e(s), {
|
|
17
21
|
options: o.options
|
|
18
22
|
}), S({ _: 2 }, [
|
|
19
23
|
e(r).default ? {
|
|
@@ -25,13 +29,13 @@ const C = /* @__PURE__ */ c({
|
|
|
25
29
|
} : void 0
|
|
26
30
|
]), 1040, ["options"]));
|
|
27
31
|
}
|
|
28
|
-
}),
|
|
32
|
+
}), j = m(
|
|
29
33
|
C,
|
|
30
|
-
|
|
31
|
-
|
|
34
|
+
i({ dataSource: "options", disabled: !0 }),
|
|
35
|
+
k(v.Select)
|
|
32
36
|
);
|
|
33
37
|
export {
|
|
34
|
-
|
|
35
|
-
|
|
38
|
+
j as Segmented,
|
|
39
|
+
j as default
|
|
36
40
|
};
|
|
37
41
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/segmented/segmented.vue","../../src/segmented/index.ts"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ElSegmented } from 'element-plus'\nimport { useSlots } from 'vue'\nimport { useCleanAttrs } from '../__builtins__'\n\ndefineOptions({\n name: 'FSegmented',\n inheritAttrs: false,\n})\n\nconst props = defineProps<{\n options?: SegmentedOptions\n}>()\n\ntype SegmentedOption = NonNullable<InstanceType<typeof ElSegmented>['$props']['options']>[number]\n\ntype SegmentedOptions = SegmentedOption[]\n\nconst slots = useSlots()\nconst { props: segmentedProps } = useCleanAttrs()\n</script>\n\n<template>\n <ElSegmented v-bind=\"segmentedProps\" :options=\"props.options\">\n <template v-if=\"slots.default\" #default=\"slotData\">\n <slot v-bind=\"slotData\" />\n </template>\n </ElSegmented>\n</template>\n","import { connect, mapProps } from '@silver-formily/vue'\nimport { mapReadPretty } from '../__builtins__'\nimport { PreviewText } from '../preview-text'\nimport FSegmented from './segmented.vue'\n\nexport const Segmented = connect<typeof FSegmented>(\n FSegmented,\n mapProps({ dataSource: 'options', disabled: true }),\n mapReadPretty(PreviewText.Select),\n)\n\nexport default Segmented\n"],"names":["props","__props","slots","useSlots","segmentedProps","useCleanAttrs","_createBlock","_unref","ElSegmented","_mergeProps","_withCtx","slotData","_renderSlot","_ctx","Segmented","connect","FSegmented","mapProps","mapReadPretty","PreviewText"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../src/segmented/segmented.vue","../../src/segmented/index.ts"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ElSegmented } from 'element-plus'\nimport { useSlots } from 'vue'\nimport { useCleanAttrs } from '../__builtins__'\n\ndefineOptions({\n name: 'FSegmented',\n inheritAttrs: false,\n})\n\nconst props = defineProps<{\n options?: SegmentedOptions\n}>()\n\ntype SegmentedOption = NonNullable<InstanceType<typeof ElSegmented>['$props']['options']>[number]\n\ntype SegmentedOptions = SegmentedOption[]\n\nconst slots = useSlots()\nconst { props: segmentedProps } = useCleanAttrs()\n</script>\n\n<template>\n <ElSegmented v-bind=\"segmentedProps\" :options=\"props.options\">\n <template v-if=\"slots.default\" #default=\"slotData\">\n <slot v-bind=\"slotData\" />\n </template>\n </ElSegmented>\n</template>\n","import { connect, mapProps } from '@silver-formily/vue'\nimport { mapReadPretty } from '../__builtins__'\nimport { PreviewText } from '../preview-text'\nimport FSegmented from './segmented.vue'\n\nexport const Segmented = connect<typeof FSegmented>(\n FSegmented,\n mapProps({ dataSource: 'options', disabled: true }),\n mapReadPretty(PreviewText.Select),\n)\n\nexport default Segmented\n"],"names":["props","__props","slots","useSlots","segmentedProps","useCleanAttrs","_createBlock","_unref","ElSegmented","_mergeProps","_withCtx","slotData","_renderSlot","_ctx","Segmented","connect","FSegmented","mapProps","mapReadPretty","PreviewText"],"mappings":";;;;;;;;;;;;;;;;;;AAUA,UAAMA,IAAQC,GAQRC,IAAQC,EAAA,GACR,EAAE,OAAOC,EAAA,IAAmBC,EAAA;2BAIhCC,EAIcC,EAAAC,CAAA,GAJdC,EAIcF,EAAAH,CAAA,GAJqB;AAAA,MAAG,SAASJ,EAAM;AAAA,IAAA;MACnCO,EAAAL,CAAA,EAAM;cAAU;AAAA,QAC9B,IAAAQ,EAAA,CADuCC,MAAQ;AAAA,UAC/CC,EAA0BC,yBAAZF,CAAQ,CAAA,CAAA;AAAA,QAAA;;;;;ICpBfG,IAAYC;AAAA,EACvBC;AAAAA,EACAC,EAAS,EAAE,YAAY,WAAW,UAAU,IAAM;AAAA,EAClDC,EAAcC,EAAY,MAAM;AAClC;"}
|
package/esm/select/index.mjs
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { useField as S, connect as b, mapProps as P } from "@silver-formily/vue";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
2
|
+
import { ElSelect as h, ElOptionGroup as C, ElOption as y } from "element-plus";
|
|
3
|
+
import "@formily/reactive";
|
|
4
|
+
import "@vueuse/core";
|
|
5
|
+
import { defineComponent as E, useSlots as K, createBlock as p, openBlock as s, unref as e, normalizeProps as _, guardReactiveProps as B, createSlots as F, withCtx as t, createElementBlock as m, Fragment as u, renderList as c, mergeProps as d, renderSlot as n, createCommentVNode as k } from "vue";
|
|
6
|
+
import { mapReadPretty as R } from "../__builtins__/shared/transform-component.mjs";
|
|
7
|
+
import { PreviewText as w } from "../preview-text/index.mjs";
|
|
8
|
+
import "@formily/core";
|
|
9
|
+
import "@silver-formily/reactive-vue";
|
|
6
10
|
import { useCleanAttrs as A } from "../__builtins__/shared/utils.mjs";
|
|
7
|
-
import {
|
|
8
|
-
const O = /* @__PURE__ */
|
|
11
|
+
import { o as G } from "../vendor/lodash.mjs";
|
|
12
|
+
const O = /* @__PURE__ */ E({
|
|
9
13
|
name: "FSelect",
|
|
10
14
|
inheritAttrs: !1,
|
|
11
15
|
__name: "select",
|
|
@@ -13,34 +17,34 @@ const O = /* @__PURE__ */ C({
|
|
|
13
17
|
options: {}
|
|
14
18
|
},
|
|
15
19
|
setup(v) {
|
|
16
|
-
const g = v, l =
|
|
20
|
+
const g = v, l = K(), { props: i } = A(), f = S();
|
|
17
21
|
function $(o) {
|
|
18
22
|
return o.options !== void 0;
|
|
19
23
|
}
|
|
20
|
-
return (o, z) => (s(),
|
|
24
|
+
return (o, z) => (s(), p(e(h), _(B(e(i))), F({
|
|
21
25
|
default: t(() => [
|
|
22
|
-
(s(!0), u
|
|
23
|
-
$(r) ? (s(),
|
|
26
|
+
(s(!0), m(u, null, c(g.options, (r) => (s(), m(u, null, [
|
|
27
|
+
$(r) ? (s(), p(e(C), d({
|
|
24
28
|
key: 0,
|
|
25
29
|
ref_for: !0
|
|
26
|
-
}, e(
|
|
30
|
+
}, e(G)(r, "options"), {
|
|
27
31
|
key: r.label
|
|
28
32
|
}), {
|
|
29
33
|
default: t(() => [
|
|
30
|
-
(s(!0), u
|
|
34
|
+
(s(!0), m(u, null, c(r.options, (a) => (s(), p(e(y), d({
|
|
31
35
|
key: e(i).valueKey ? a[e(i).valueKey] : a.label
|
|
32
36
|
}, { ref_for: !0 }, a), {
|
|
33
37
|
default: t(() => [
|
|
34
38
|
l.option ? n(o.$slots, "option", {
|
|
35
39
|
key: 0,
|
|
36
40
|
option: a
|
|
37
|
-
}) :
|
|
41
|
+
}) : k("", !0)
|
|
38
42
|
]),
|
|
39
43
|
_: 2
|
|
40
44
|
}, 1040))), 128))
|
|
41
45
|
]),
|
|
42
46
|
_: 2
|
|
43
|
-
}, 1040)) : (s(),
|
|
47
|
+
}, 1040)) : (s(), p(e(y), d({
|
|
44
48
|
key: 1,
|
|
45
49
|
ref_for: !0
|
|
46
50
|
}, r, {
|
|
@@ -50,7 +54,7 @@ const O = /* @__PURE__ */ C({
|
|
|
50
54
|
l.option ? n(o.$slots, "option", {
|
|
51
55
|
key: 0,
|
|
52
56
|
option: r
|
|
53
|
-
}) :
|
|
57
|
+
}) : k("", !0)
|
|
54
58
|
]),
|
|
55
59
|
_: 2
|
|
56
60
|
}, 1040))
|
|
@@ -61,14 +65,14 @@ const O = /* @__PURE__ */ C({
|
|
|
61
65
|
l.header ? {
|
|
62
66
|
name: "header",
|
|
63
67
|
fn: t(() => [
|
|
64
|
-
n(o.$slots, "header", { field: e(
|
|
68
|
+
n(o.$slots, "header", { field: e(f) })
|
|
65
69
|
]),
|
|
66
70
|
key: "0"
|
|
67
71
|
} : void 0,
|
|
68
72
|
l.footer ? {
|
|
69
73
|
name: "footer",
|
|
70
74
|
fn: t(() => [
|
|
71
|
-
n(o.$slots, "footer", { field: e(
|
|
75
|
+
n(o.$slots, "footer", { field: e(f) })
|
|
72
76
|
]),
|
|
73
77
|
key: "1"
|
|
74
78
|
} : void 0,
|
|
@@ -89,7 +93,7 @@ const O = /* @__PURE__ */ C({
|
|
|
89
93
|
l.tag ? {
|
|
90
94
|
name: "tag",
|
|
91
95
|
fn: t(() => [
|
|
92
|
-
n(o.$slots, "tag", { field: e(
|
|
96
|
+
n(o.$slots, "tag", { field: e(f) })
|
|
93
97
|
]),
|
|
94
98
|
key: "4"
|
|
95
99
|
} : void 0,
|
|
@@ -112,13 +116,13 @@ const O = /* @__PURE__ */ C({
|
|
|
112
116
|
} : void 0
|
|
113
117
|
]), 1040));
|
|
114
118
|
}
|
|
115
|
-
}),
|
|
119
|
+
}), Q = b(
|
|
116
120
|
O,
|
|
117
121
|
P({ dataSource: "options", loading: !0, disabled: !0 }),
|
|
118
|
-
|
|
122
|
+
R(w.Select)
|
|
119
123
|
);
|
|
120
124
|
export {
|
|
121
|
-
|
|
122
|
-
|
|
125
|
+
Q as Select,
|
|
126
|
+
Q as default
|
|
123
127
|
};
|
|
124
128
|
//# sourceMappingURL=index.mjs.map
|
package/esm/select/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/select/select.vue","../../src/select/index.ts"],"sourcesContent":["<script setup lang=\"ts\">\
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../src/select/select.vue","../../src/select/index.ts"],"sourcesContent":["<script setup lang=\"ts\">\nimport { useField } from '@silver-formily/vue'\nimport { ElOption, ElOptionGroup, ElSelect } from 'element-plus'\nimport { omit } from 'lodash-es'\nimport { useCleanAttrs } from '../__builtins__'\n\ndefineOptions({\n name: 'FSelect',\n inheritAttrs: false,\n})\n\nconst props = defineProps<{\n options?: Array<OptionType | OptionGroupType>\n}>()\n\nconst slots = defineSlots<{\n option?: (props: { option: OptionType }) => any\n header?: () => any\n footer?: () => any\n prefix?: () => any\n empty?: () => any\n tag?: () => any\n loading?: () => any\n label?: () => any\n}>()\n\ntype OptionType = InstanceType<typeof ElOption>['$props']\ntype OptionGroupType = InstanceType<typeof ElOptionGroup>['$props'] & {\n options: OptionType[]\n}\n\nconst { props: selectProps } = useCleanAttrs()\n\nconst fieldRef = useField()\n\nfunction isGroup(option: OptionType | OptionGroupType): option is OptionGroupType {\n return (option as OptionGroupType).options !== undefined\n}\n</script>\n\n<template>\n <ElSelect v-bind=\"selectProps\">\n <template v-for=\"option of props.options\">\n <template v-if=\"isGroup(option)\">\n <ElOptionGroup v-bind=\"omit(option, 'options')\" :key=\"option.label\">\n <ElOption v-for=\"i of option.options\" :key=\"selectProps.valueKey ? i[selectProps.valueKey] : i.label\" v-bind=\"i\">\n <slot v-if=\"slots.option\" name=\"option\" :option=\"i\" />\n </ElOption>\n </ElOptionGroup>\n </template>\n <ElOption v-else v-bind=\"option\" :key=\"selectProps.valueKey ? option[selectProps.valueKey] : option.label\">\n <slot v-if=\"slots.option\" name=\"option\" :option=\"option\" />\n </ElOption>\n </template>\n <template v-if=\"slots.header\" #header>\n <slot name=\"header\" :field=\"fieldRef\" />\n </template>\n <template v-if=\"slots.footer\" #footer>\n <slot name=\"footer\" :field=\"fieldRef\" />\n </template>\n <template v-if=\"slots.prefix\" #prefix>\n <slot name=\"prefix\" />\n </template>\n <template v-if=\"slots.empty\" #empty>\n <slot name=\"empty\" />\n </template>\n <template v-if=\"slots.tag\" #tag>\n <slot name=\"tag\" :field=\"fieldRef\" />\n </template>\n <template v-if=\"slots.loading\" #loading>\n <slot name=\"loading\" />\n </template>\n <template v-if=\"slots.label\" #label=\"{ label, value: labelValue }\">\n <slot name=\"label\" :label=\"label\" :value=\"labelValue\" />\n </template>\n </ElSelect>\n</template>\n","import { connect, mapProps } from '@silver-formily/vue'\nimport { mapReadPretty } from '../__builtins__'\nimport { PreviewText } from '../preview-text'\nimport FSelect from './select.vue'\n\nexport const Select = connect<typeof FSelect>(\n FSelect,\n mapProps({ dataSource: 'options', loading: true, disabled: true }),\n mapReadPretty(PreviewText.Select),\n)\n\nexport default Select\n"],"names":["props","__props","slots","_useSlots","selectProps","useCleanAttrs","fieldRef","useField","isGroup","option","_openBlock","_createBlock","_unref","_createSlots","_createElementBlock","_Fragment","_renderList","_mergeProps","omit","i","_renderSlot","_ctx","label","labelValue","Select","connect","FSelect","mapProps","mapReadPretty","PreviewText"],"mappings":";;;;;;;;;;;;;;;;;;;AAWA,UAAMA,IAAQC,GAIRC,IAAQC,EAAA,GAgBR,EAAE,OAAOC,EAAA,IAAgBC,EAAA,GAEzBC,IAAWC,EAAA;AAEjB,aAASC,EAAQC,GAAiE;AAChF,aAAQA,EAA2B,YAAY;AAAA,IACjD;sBAIEC,EAAA,GAAAC,EAkCWC,UAlCOA,EAAAR,CAAA,CAAW,CAAA,GAAAS,EAAA;AAAA,iBACjB,MAA+B;AAAA,SAAzCH,EAAA,EAAA,GAAAI,EAWWC,GAAA,MAAAC,EAXgBhB,EAAM,UAAhBS;UACCD,EAAQC,CAAM,KAC5BC,EAAA,GAAAC,EAIgBC,MAJhBK,EAIgB;AAAA;;aAJOL,EAAAM,CAAA,EAAKT,GAAM,SAAA,GAAA;AAAA,YAAe,KAAKA,EAAO;AAAA,UAAA;uBACjD,MAA2B;AAAA,eAArCC,EAAA,EAAA,GAAAI,EAEWC,GAAA,MAAAC,EAFWP,EAAO,UAAZU,OAAjBT,KAAAC,EAEWC,MAFXK,EAEW;AAAA,gBAF4B,KAAKL,EAAAR,CAAA,EAAY,WAAWe,EAAEP,EAAAR,CAAA,EAAY,QAAQ,IAAIe,EAAE;AAAA,cAAA,oBAAeA,CAAC,GAAA;AAAA,2BAC7G,MAAsD;AAAA,kBAA1CjB,EAAM,SAAlBkB,EAAsDC,EAAA,QAAA,UAAA;AAAA;oBAAb,QAAQF;AAAA,kBAAA;;;;;;uBAIvDT,EAAA,GAAAC,EAEWC,MAFXK,EAEW;AAAA;;aAFcR,GAAM;AAAA,YAAG,KAAKG,EAAAR,CAAA,EAAY,WAAWK,EAAOG,EAAAR,CAAA,EAAY,QAAQ,IAAIK,EAAO;AAAA,UAAA;uBAClG,MAA2D;AAAA,cAA/CP,EAAM,SAAlBkB,EAA2DC,EAAA,QAAA,UAAA;AAAA;gBAAlB,QAAAZ;AAAA,cAAA;;;;;;;;MAG7BP,EAAM;cAAS;AAAA,cAC7B,MAAwC;AAAA,UAAxCkB,EAAwCC,EAAA,QAAA,UAAA,EAAnB,OAAOT,EAAAN,CAAA,EAAA,CAAQ;AAAA,QAAA;;;MAEtBJ,EAAM;cAAS;AAAA,cAC7B,MAAwC;AAAA,UAAxCkB,EAAwCC,EAAA,QAAA,UAAA,EAAnB,OAAOT,EAAAN,CAAA,EAAA,CAAQ;AAAA,QAAA;;;MAEtBJ,EAAM;cAAS;AAAA,cAC7B,MAAsB;AAAA,UAAtBkB,EAAsBC,EAAA,QAAA,QAAA;AAAA,QAAA;;;MAERnB,EAAM;cAAQ;AAAA,cAC5B,MAAqB;AAAA,UAArBkB,EAAqBC,EAAA,QAAA,OAAA;AAAA,QAAA;;;MAEPnB,EAAM;cAAM;AAAA,cAC1B,MAAqC;AAAA,UAArCkB,EAAqCC,EAAA,QAAA,OAAA,EAAnB,OAAOT,EAAAN,CAAA,EAAA,CAAQ;AAAA,QAAA;;;MAEnBJ,EAAM;cAAU;AAAA,cAC9B,MAAuB;AAAA,UAAvBkB,EAAuBC,EAAA,QAAA,SAAA;AAAA,QAAA;;;MAETnB,EAAM;cAAQ;AAAA,cAC5B,CAAwD,EADnB,OAAAoB,GAAK,OAASC,QAAU;AAAA,UAC7DH,EAAwDC,EAAA,QAAA,SAAA;AAAA,YAApC,OAAAC;AAAA,YAAe,OAAOC;AAAA,UAAA;;;;;;ICpEnCC,IAASC;AAAA,EACpBC;AAAAA,EACAC,EAAS,EAAE,YAAY,WAAW,SAAS,IAAM,UAAU,IAAM;AAAA,EACjEC,EAAcC,EAAY,MAAM;AAClC;"}
|