@vunk/form 0.0.1-alpha.32 → 0.0.1-alpha.34
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/components/checkbox/index.js +2 -2
- package/components/checkbox/src/ctx.d.ts +7 -32
- package/components/checkbox/src/ctx.js +2 -2
- package/components/checkbox/src/index.vue.d.ts +16 -73
- package/components/upload/index.css +9 -0
- package/components/upload/index.js +8 -2
- package/index.css +9 -0
- package/package.json +1 -1
- package/shared/element-plus/ctx.d.ts +1 -1
- package/shared/element-plus/index.js +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { _VkfFormItemCtx, VkfFormItem } from '@vunk/form/components/form-item';
|
|
2
|
-
import {
|
|
2
|
+
import { checkboxGroupProps, checkboxGroupEmits, ElCheckbox, ElCheckboxGroup, ElCheckboxButton } from 'element-plus';
|
|
3
3
|
import { defineComponent, computed, resolveComponent, openBlock, createBlock, normalizeProps, guardReactiveProps, withCtx, createVNode, mergeProps, toHandlers, createElementBlock, Fragment, renderList, resolveDynamicComponent, createTextVNode, toDisplayString } from 'vue';
|
|
4
4
|
import { createCheckboxGroupBindProps, createCheckboxGroupOnEmits } from '@vunk/form/shared/element-plus';
|
|
5
5
|
import { pickObject } from '@vunk/core/shared/utils-object';
|
|
@@ -24,7 +24,7 @@ var __spreadValues = (a, b) => {
|
|
|
24
24
|
return a;
|
|
25
25
|
};
|
|
26
26
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
27
|
-
const props = __spreadProps(__spreadValues(__spreadValues({}, _VkfFormItemCtx.props),
|
|
27
|
+
const props = __spreadProps(__spreadValues(__spreadValues({}, _VkfFormItemCtx.props), checkboxGroupProps), {
|
|
28
28
|
options: {
|
|
29
29
|
type: Array,
|
|
30
30
|
default: () => []
|
|
@@ -18,44 +18,19 @@ export declare const props: {
|
|
|
18
18
|
default: undefined;
|
|
19
19
|
};
|
|
20
20
|
disabled: BooleanConstructor;
|
|
21
|
-
min:
|
|
22
|
-
|
|
23
|
-
default: undefined;
|
|
24
|
-
};
|
|
25
|
-
max: {
|
|
26
|
-
type: NumberConstructor;
|
|
27
|
-
default: undefined;
|
|
28
|
-
};
|
|
21
|
+
min: NumberConstructor;
|
|
22
|
+
max: NumberConstructor;
|
|
29
23
|
size: {
|
|
30
24
|
readonly type: PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
31
25
|
readonly required: false;
|
|
32
26
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
33
27
|
__epPropKey: true;
|
|
34
28
|
};
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
type: StringConstructor;
|
|
41
|
-
default: undefined;
|
|
42
|
-
};
|
|
43
|
-
fill: {
|
|
44
|
-
type: StringConstructor;
|
|
45
|
-
default: undefined;
|
|
46
|
-
};
|
|
47
|
-
textColor: {
|
|
48
|
-
type: StringConstructor;
|
|
49
|
-
default: undefined;
|
|
50
|
-
};
|
|
51
|
-
tag: {
|
|
52
|
-
type: StringConstructor;
|
|
53
|
-
default: string;
|
|
54
|
-
};
|
|
55
|
-
validateEvent: {
|
|
56
|
-
type: BooleanConstructor;
|
|
57
|
-
default: boolean;
|
|
58
|
-
};
|
|
29
|
+
label: StringConstructor;
|
|
30
|
+
fill: StringConstructor;
|
|
31
|
+
textColor: StringConstructor;
|
|
32
|
+
tag: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "div", boolean>;
|
|
33
|
+
validateEvent: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
59
34
|
required: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
60
35
|
labelWidth: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
61
36
|
prop: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { _VkfFormItemCtx } from '@vunk/form/components/form-item';
|
|
2
|
-
import {
|
|
2
|
+
import { checkboxGroupProps, checkboxGroupEmits } from 'element-plus';
|
|
3
3
|
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __defProps = Object.defineProperties;
|
|
@@ -20,7 +20,7 @@ var __spreadValues = (a, b) => {
|
|
|
20
20
|
return a;
|
|
21
21
|
};
|
|
22
22
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
23
|
-
const props = __spreadProps(__spreadValues(__spreadValues({}, _VkfFormItemCtx.props),
|
|
23
|
+
const props = __spreadProps(__spreadValues(__spreadValues({}, _VkfFormItemCtx.props), checkboxGroupProps), {
|
|
24
24
|
options: {
|
|
25
25
|
type: Array,
|
|
26
26
|
default: () => []
|
|
@@ -16,44 +16,19 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
16
16
|
default: undefined;
|
|
17
17
|
};
|
|
18
18
|
disabled: BooleanConstructor;
|
|
19
|
-
min:
|
|
20
|
-
|
|
21
|
-
default: undefined;
|
|
22
|
-
};
|
|
23
|
-
max: {
|
|
24
|
-
type: NumberConstructor;
|
|
25
|
-
default: undefined;
|
|
26
|
-
};
|
|
19
|
+
min: NumberConstructor;
|
|
20
|
+
max: NumberConstructor;
|
|
27
21
|
size: {
|
|
28
22
|
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
29
23
|
readonly required: false;
|
|
30
24
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
31
25
|
__epPropKey: true;
|
|
32
26
|
};
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
type: StringConstructor;
|
|
39
|
-
default: undefined;
|
|
40
|
-
};
|
|
41
|
-
fill: {
|
|
42
|
-
type: StringConstructor;
|
|
43
|
-
default: undefined;
|
|
44
|
-
};
|
|
45
|
-
textColor: {
|
|
46
|
-
type: StringConstructor;
|
|
47
|
-
default: undefined;
|
|
48
|
-
};
|
|
49
|
-
tag: {
|
|
50
|
-
type: StringConstructor;
|
|
51
|
-
default: string;
|
|
52
|
-
};
|
|
53
|
-
validateEvent: {
|
|
54
|
-
type: BooleanConstructor;
|
|
55
|
-
default: boolean;
|
|
56
|
-
};
|
|
27
|
+
label: StringConstructor;
|
|
28
|
+
fill: StringConstructor;
|
|
29
|
+
textColor: StringConstructor;
|
|
30
|
+
tag: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "div", boolean>;
|
|
31
|
+
validateEvent: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
57
32
|
required: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
58
33
|
labelWidth: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
59
34
|
prop: {
|
|
@@ -120,8 +95,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
120
95
|
label: string | undefined;
|
|
121
96
|
size: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never> | undefined;
|
|
122
97
|
fill: string | undefined;
|
|
123
|
-
|
|
124
|
-
validateEvent: boolean;
|
|
98
|
+
validateEvent: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
125
99
|
modelValue: (string | number)[] | undefined;
|
|
126
100
|
max: number | undefined;
|
|
127
101
|
min: number | undefined;
|
|
@@ -159,44 +133,19 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
159
133
|
default: undefined;
|
|
160
134
|
};
|
|
161
135
|
disabled: BooleanConstructor;
|
|
162
|
-
min:
|
|
163
|
-
|
|
164
|
-
default: undefined;
|
|
165
|
-
};
|
|
166
|
-
max: {
|
|
167
|
-
type: NumberConstructor;
|
|
168
|
-
default: undefined;
|
|
169
|
-
};
|
|
136
|
+
min: NumberConstructor;
|
|
137
|
+
max: NumberConstructor;
|
|
170
138
|
size: {
|
|
171
139
|
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
172
140
|
readonly required: false;
|
|
173
141
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
174
142
|
__epPropKey: true;
|
|
175
143
|
};
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
type: StringConstructor;
|
|
182
|
-
default: undefined;
|
|
183
|
-
};
|
|
184
|
-
fill: {
|
|
185
|
-
type: StringConstructor;
|
|
186
|
-
default: undefined;
|
|
187
|
-
};
|
|
188
|
-
textColor: {
|
|
189
|
-
type: StringConstructor;
|
|
190
|
-
default: undefined;
|
|
191
|
-
};
|
|
192
|
-
tag: {
|
|
193
|
-
type: StringConstructor;
|
|
194
|
-
default: string;
|
|
195
|
-
};
|
|
196
|
-
validateEvent: {
|
|
197
|
-
type: BooleanConstructor;
|
|
198
|
-
default: boolean;
|
|
199
|
-
};
|
|
144
|
+
label: StringConstructor;
|
|
145
|
+
fill: StringConstructor;
|
|
146
|
+
textColor: StringConstructor;
|
|
147
|
+
tag: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "div", boolean>;
|
|
148
|
+
validateEvent: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
200
149
|
required: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
201
150
|
labelWidth: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
202
151
|
prop: {
|
|
@@ -247,7 +196,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
247
196
|
}, {
|
|
248
197
|
required: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
249
198
|
type: "default" | "button";
|
|
250
|
-
label: string;
|
|
251
199
|
labelWidth: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
252
200
|
inlineMessage: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, BooleanConstructor], unknown, unknown>;
|
|
253
201
|
showMessage: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
@@ -255,16 +203,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
255
203
|
formItemSlots: import("../../form-item/src/types").FormItemSlots;
|
|
256
204
|
inline: boolean;
|
|
257
205
|
readonly: boolean;
|
|
258
|
-
fill: string;
|
|
259
206
|
disabled: boolean;
|
|
260
|
-
|
|
261
|
-
validateEvent: boolean;
|
|
207
|
+
validateEvent: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
262
208
|
modelValue: (string | number)[];
|
|
263
209
|
options: import("../../../shared/types/form").CheckboxProps[];
|
|
264
210
|
defaultModelValue: any[];
|
|
265
|
-
max: number;
|
|
266
|
-
min: number;
|
|
267
|
-
textColor: string;
|
|
268
211
|
tag: string;
|
|
269
212
|
}>;
|
|
270
213
|
export default _default;
|
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
|
|
2
|
+
.vkf-upload-empty-tip{
|
|
3
|
+
display: none;
|
|
4
|
+
}
|
|
5
|
+
.vkf-upload-empty-tip.is-readonly{
|
|
6
|
+
display: block;
|
|
7
|
+
}
|
|
2
8
|
|
|
3
9
|
.vkf-upload.is-readonly .el-upload,
|
|
4
10
|
.vkf-upload.is-readonly .el-upload{
|
|
5
11
|
display: none;
|
|
6
12
|
}
|
|
13
|
+
.vkf-upload.is-readonly.is-empty {
|
|
14
|
+
display: none;
|
|
15
|
+
}
|
|
7
16
|
.vkf-upload .el-upload-list{
|
|
8
17
|
min-width: 100px;
|
|
9
18
|
}
|
|
@@ -441,7 +441,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
441
441
|
return [
|
|
442
442
|
createVNode(_component_ElUpload, mergeProps({
|
|
443
443
|
class: ["vkf-upload", {
|
|
444
|
-
"is-readonly": _ctx.readonly
|
|
444
|
+
"is-readonly": _ctx.readonly,
|
|
445
|
+
"is-empty": _ctx.fileList.length === 0
|
|
445
446
|
}]
|
|
446
447
|
}, _ctx.coreBindProps, {
|
|
447
448
|
fileList: (_a = _ctx.fileList) != null ? _a : [],
|
|
@@ -475,7 +476,12 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
475
476
|
createElementVNode("div", _hoisted_2, toDisplayString(_ctx.tip), 1)
|
|
476
477
|
])
|
|
477
478
|
} : void 0
|
|
478
|
-
]), 1040, ["class", "fileList", "disabled"])
|
|
479
|
+
]), 1040, ["class", "fileList", "disabled"]),
|
|
480
|
+
createElementVNode("span", {
|
|
481
|
+
class: normalizeClass(["vkf-upload-empty-tip", {
|
|
482
|
+
"is-readonly": _ctx.readonly
|
|
483
|
+
}])
|
|
484
|
+
}, "\u6682\u65E0", 2)
|
|
479
485
|
];
|
|
480
486
|
}),
|
|
481
487
|
_: 3
|
package/index.css
CHANGED
|
@@ -123,11 +123,20 @@
|
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
|
|
126
|
+
.vkf-upload-empty-tip{
|
|
127
|
+
display: none;
|
|
128
|
+
}
|
|
129
|
+
.vkf-upload-empty-tip.is-readonly{
|
|
130
|
+
display: block;
|
|
131
|
+
}
|
|
126
132
|
|
|
127
133
|
.vkf-upload.is-readonly .el-upload,
|
|
128
134
|
.vkf-upload.is-readonly .el-upload{
|
|
129
135
|
display: none;
|
|
130
136
|
}
|
|
137
|
+
.vkf-upload.is-readonly.is-empty {
|
|
138
|
+
display: none;
|
|
139
|
+
}
|
|
131
140
|
.vkf-upload .el-upload-list{
|
|
132
141
|
min-width: 100px;
|
|
133
142
|
}
|
package/package.json
CHANGED
|
@@ -58,7 +58,7 @@ export declare const createRadioGroupOnEmits: <T2 extends import("@vunk/core").A
|
|
|
58
58
|
"update:modelValue": (...e: import("@vunk/core").RestParameters<T2>) => void;
|
|
59
59
|
change: (...e: import("@vunk/core").RestParameters<T2>) => void;
|
|
60
60
|
}[P]; };
|
|
61
|
-
export declare const createCheckboxGroupBindProps: <T2 extends import("@vunk/core").NormalObject, EX extends (Extract<"size", keyof T2> | Extract<"label", keyof T2> | Extract<"fill", keyof T2> | Extract<"disabled", keyof T2> | Extract<"
|
|
61
|
+
export declare const createCheckboxGroupBindProps: <T2 extends import("@vunk/core").NormalObject, EX extends (Extract<"size", keyof T2> | Extract<"label", keyof T2> | Extract<"fill", keyof T2> | Extract<"disabled", keyof T2> | Extract<"validateEvent", keyof T2> | Extract<"modelValue", keyof T2> | Extract<"max", keyof T2> | Extract<"min", keyof T2> | Extract<"textColor", keyof T2> | Extract<"tag", keyof T2>)[] | undefined>(propsArg: T2, excludes?: EX | undefined) => import("vue").ComputedRef<{ [P in EX extends (infer KE)[] ? Exclude<Extract<"size", keyof T2>, KE> | Exclude<Extract<"label", keyof T2>, KE> | Exclude<Extract<"fill", keyof T2>, KE> | Exclude<Extract<"disabled", keyof T2>, KE> | Exclude<Extract<"validateEvent", keyof T2>, KE> | Exclude<Extract<"modelValue", keyof T2>, KE> | Exclude<Extract<"max", keyof T2>, KE> | Exclude<Extract<"min", keyof T2>, KE> | Exclude<Extract<"textColor", keyof T2>, KE> | Exclude<Extract<"tag", keyof T2>, KE> : Extract<"size", keyof T2> | Extract<"label", keyof T2> | Extract<"fill", keyof T2> | Extract<"disabled", keyof T2> | Extract<"validateEvent", keyof T2> | Extract<"modelValue", keyof T2> | Extract<"max", keyof T2> | Extract<"min", keyof T2> | Extract<"textColor", keyof T2> | Extract<"tag", keyof T2>]: { [k in Extract<"size", keyof T2> | Extract<"label", keyof T2> | Extract<"fill", keyof T2> | Extract<"disabled", keyof T2> | Extract<"validateEvent", keyof T2> | Extract<"modelValue", keyof T2> | Extract<"max", keyof T2> | Extract<"min", keyof T2> | Extract<"textColor", keyof T2> | Extract<"tag", keyof T2>]: T2[k]; }[P]; }>;
|
|
62
62
|
export declare const createCheckboxGroupOnEmits: <T2 extends import("@vunk/core").AnyFunc, EX extends ("change" | "update:modelValue")[] | undefined>(emit: T2, excludes?: EX | undefined) => { [P in EX extends (infer KE)[] ? Exclude<"change", KE> | Exclude<"update:modelValue", KE> : "change" | "update:modelValue"]: {
|
|
63
63
|
"update:modelValue": (...e: import("@vunk/core").RestParameters<T2>) => void;
|
|
64
64
|
change: (...e: import("@vunk/core").RestParameters<T2>) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { componentSizes, useTooltipContentProps, tagProps, timePickerDefaultProps, CommonProps, UPDATE_MODEL_EVENT, CHANGE_EVENT, inputProps, inputEmits, formProps, formEmits, formItemProps, switchProps, switchEmits, inputNumberProps, inputNumberEmits, radioGroupProps, radioGroupEmits,
|
|
1
|
+
import { componentSizes, useTooltipContentProps, tagProps, timePickerDefaultProps, CommonProps, UPDATE_MODEL_EVENT, CHANGE_EVENT, inputProps, inputEmits, formProps, formEmits, formItemProps, switchProps, switchEmits, inputNumberProps, inputNumberEmits, radioGroupProps, radioGroupEmits, checkboxGroupProps, checkboxGroupEmits, uploadProps, buttonProps, buttonEmits } from 'element-plus';
|
|
2
2
|
import { bindPropsFactory, onEmitsFactory } from '@vunk/core/shared/utils-vue';
|
|
3
3
|
import { openBlock, createElementBlock, createElementVNode } from 'vue';
|
|
4
4
|
|
|
@@ -275,7 +275,7 @@ const createInputNumberBindProps = bindPropsFactory(inputNumberProps);
|
|
|
275
275
|
const createInputNumberOnEmits = onEmitsFactory(inputNumberEmits);
|
|
276
276
|
const createRadioGroupBindProps = bindPropsFactory(radioGroupProps);
|
|
277
277
|
const createRadioGroupOnEmits = onEmitsFactory(radioGroupEmits);
|
|
278
|
-
const createCheckboxGroupBindProps = bindPropsFactory(
|
|
278
|
+
const createCheckboxGroupBindProps = bindPropsFactory(checkboxGroupProps);
|
|
279
279
|
const createCheckboxGroupOnEmits = onEmitsFactory(checkboxGroupEmits);
|
|
280
280
|
const createUploadBindProps = bindPropsFactory(uploadProps);
|
|
281
281
|
const createColorPickerBindProps = bindPropsFactory(colorPickerProps);
|