@vunk/form 2.5.6 → 2.5.8
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/date-picker/src/ctx.d.ts +1 -1
- package/components/date-picker/src/index.vue.d.ts +1 -1
- package/components/date-picker-range/src/ctx.d.ts +4 -4
- package/components/date-picker-range/src/index.vue.d.ts +9 -9
- package/components/input-collection/index.cjs +14 -6
- package/components/input-collection/index.mjs +15 -7
- package/components/input-collection/src/ctx.d.ts +8 -2
- package/components/input-collection/src/index.vue.d.ts +12 -3
- package/components/input-collection/src/types.d.ts +4 -4
- package/package.json +1 -1
|
@@ -162,7 +162,7 @@ export declare const props: {
|
|
|
162
162
|
};
|
|
163
163
|
isRange: BooleanConstructor;
|
|
164
164
|
};
|
|
165
|
-
export declare const createBindProps: <T2 extends import("@vunk/core").NormalObject, EX extends (Extract<"size", keyof T2> | Extract<"type", keyof T2> | Extract<"required", keyof T2> | Extract<"formItemSize", keyof T2> | Extract<"formItemSlots", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"formItemTip", keyof T2> | Extract<"formItemTipClass", keyof T2> | Extract<"labelTip", keyof T2> | Extract<"information", keyof T2> | Extract<"label", keyof T2> | Extract<"labelWidth", keyof T2> | Extract<"labelPosition", keyof T2> | Extract<"prop", keyof T2> | Extract<"rules", keyof T2> | Extract<"error", keyof T2> | Extract<"validateStatus", keyof T2> | Extract<"for", keyof T2> | Extract<"inlineMessage", keyof T2> | Extract<"showMessage", keyof T2> | Extract<"disabled", keyof T2> | Extract<"id", keyof T2> | Extract<"ariaLabel", keyof T2> | Extract<"popperClass", keyof T2> | Extract<"fallbackPlacements", keyof T2> | Extract<"placement", keyof T2> | Extract<"popperOptions", keyof T2> | Extract<"name", keyof T2> | Extract<"modelValue", keyof T2> | Extract<"clearable", keyof T2> | Extract<"placeholder", keyof T2> | Extract<"cellClassName", keyof T2> | Extract<"emptyValues", keyof T2> | Extract<"valueOnClear", keyof T2> | Extract<"validateEvent", keyof T2> | Extract<"tabindex", keyof T2> | Extract<"showNow", keyof T2> | Extract<"disabledDate", keyof T2> | Extract<"shortcuts", keyof T2> | Extract<"arrowControl", keyof T2> | Extract<"unlinkPanels", keyof T2> | Extract<"disabledHours", keyof T2> | Extract<"disabledMinutes", keyof T2> | Extract<"disabledSeconds", keyof T2> | Extract<"format", keyof T2> | Extract<"valueFormat", keyof T2> | Extract<"dateFormat", keyof T2> | Extract<"timeFormat", keyof T2> | Extract<"clearIcon", keyof T2> | Extract<"editable", keyof T2> | Extract<"prefixIcon", keyof T2> | Extract<"rangeSeparator", keyof T2> | Extract<"startPlaceholder", keyof T2> | Extract<"endPlaceholder", keyof T2> | Extract<"defaultValue", keyof T2> | Extract<"defaultTime", keyof T2> | Extract<"isRange", keyof T2>
|
|
165
|
+
export declare const createBindProps: <T2 extends import("@vunk/core").NormalObject, EX extends (Extract<"size", keyof T2> | Extract<"type", keyof T2> | Extract<"required", keyof T2> | Extract<"formItemSize", keyof T2> | Extract<"formItemSlots", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"formItemTip", keyof T2> | Extract<"formItemTipClass", keyof T2> | Extract<"labelTip", keyof T2> | Extract<"information", keyof T2> | Extract<"label", keyof T2> | Extract<"labelWidth", keyof T2> | Extract<"labelPosition", keyof T2> | Extract<"prop", keyof T2> | Extract<"rules", keyof T2> | Extract<"error", keyof T2> | Extract<"validateStatus", keyof T2> | Extract<"for", keyof T2> | Extract<"inlineMessage", keyof T2> | Extract<"showMessage", keyof T2> | Extract<"disabled", keyof T2> | Extract<"id", keyof T2> | Extract<"ariaLabel", keyof T2> | Extract<"popperClass", keyof T2> | Extract<"fallbackPlacements", keyof T2> | Extract<"placement", keyof T2> | Extract<"popperOptions", keyof T2> | Extract<"name", keyof T2> | Extract<"modelValue", keyof T2> | Extract<"clearable", keyof T2> | Extract<"placeholder", keyof T2> | Extract<"cellClassName", keyof T2> | Extract<"emptyValues", keyof T2> | Extract<"valueOnClear", keyof T2> | Extract<"validateEvent", keyof T2> | Extract<"tabindex", keyof T2> | Extract<"datePickerSlots", keyof T2> | Extract<"showNow", keyof T2> | Extract<"disabledDate", keyof T2> | Extract<"shortcuts", keyof T2> | Extract<"arrowControl", keyof T2> | Extract<"unlinkPanels", keyof T2> | Extract<"disabledHours", keyof T2> | Extract<"disabledMinutes", keyof T2> | Extract<"disabledSeconds", keyof T2> | Extract<"format", keyof T2> | Extract<"valueFormat", keyof T2> | Extract<"dateFormat", keyof T2> | Extract<"timeFormat", keyof T2> | Extract<"clearIcon", keyof T2> | Extract<"editable", keyof T2> | Extract<"prefixIcon", keyof T2> | Extract<"rangeSeparator", keyof T2> | Extract<"startPlaceholder", keyof T2> | Extract<"endPlaceholder", keyof T2> | Extract<"defaultValue", keyof T2> | Extract<"defaultTime", keyof T2> | Extract<"isRange", keyof T2>)[]>(propsArg: T2, excludes?: EX) => import("vue").ComputedRef<{ [P in EX extends (infer KE)[] ? Exclude<Extract<"size" | "type" | "required" | "formItemSize" | "formItemSlots" | "elRef" | "inline" | "readonly" | "formItemTip" | "formItemTipClass" | "labelTip" | "information" | "label" | "labelWidth" | "labelPosition" | "prop" | "rules" | "error" | "validateStatus" | "for" | "inlineMessage" | "showMessage" | "disabled" | "id" | "ariaLabel" | "popperClass" | "fallbackPlacements" | "placement" | "popperOptions" | "name" | "modelValue" | "clearable" | "placeholder" | "cellClassName" | "emptyValues" | "valueOnClear" | "validateEvent" | "tabindex" | "datePickerSlots" | "showNow" | "disabledDate" | "shortcuts" | "arrowControl" | "unlinkPanels" | "disabledHours" | "disabledMinutes" | "disabledSeconds" | "format" | "valueFormat" | "dateFormat" | "timeFormat" | "clearIcon" | "editable" | "prefixIcon" | "rangeSeparator" | "startPlaceholder" | "endPlaceholder" | "defaultValue" | "defaultTime" | "isRange", keyof T2>, KE> : Extract<"size" | "type" | "required" | "formItemSize" | "formItemSlots" | "elRef" | "inline" | "readonly" | "formItemTip" | "formItemTipClass" | "labelTip" | "information" | "label" | "labelWidth" | "labelPosition" | "prop" | "rules" | "error" | "validateStatus" | "for" | "inlineMessage" | "showMessage" | "disabled" | "id" | "ariaLabel" | "popperClass" | "fallbackPlacements" | "placement" | "popperOptions" | "name" | "modelValue" | "clearable" | "placeholder" | "cellClassName" | "emptyValues" | "valueOnClear" | "validateEvent" | "tabindex" | "datePickerSlots" | "showNow" | "disabledDate" | "shortcuts" | "arrowControl" | "unlinkPanels" | "disabledHours" | "disabledMinutes" | "disabledSeconds" | "format" | "valueFormat" | "dateFormat" | "timeFormat" | "clearIcon" | "editable" | "prefixIcon" | "rangeSeparator" | "startPlaceholder" | "endPlaceholder" | "defaultValue" | "defaultTime" | "isRange", keyof T2>]: { [k in Extract<"size" | "type" | "required" | "formItemSize" | "formItemSlots" | "elRef" | "inline" | "readonly" | "formItemTip" | "formItemTipClass" | "labelTip" | "information" | "label" | "labelWidth" | "labelPosition" | "prop" | "rules" | "error" | "validateStatus" | "for" | "inlineMessage" | "showMessage" | "disabled" | "id" | "ariaLabel" | "popperClass" | "fallbackPlacements" | "placement" | "popperOptions" | "name" | "modelValue" | "clearable" | "placeholder" | "cellClassName" | "emptyValues" | "valueOnClear" | "validateEvent" | "tabindex" | "datePickerSlots" | "showNow" | "disabledDate" | "shortcuts" | "arrowControl" | "unlinkPanels" | "disabledHours" | "disabledMinutes" | "disabledSeconds" | "format" | "valueFormat" | "dateFormat" | "timeFormat" | "clearIcon" | "editable" | "prefixIcon" | "rangeSeparator" | "startPlaceholder" | "endPlaceholder" | "defaultValue" | "defaultTime" | "isRange", keyof T2>]: T2[k]; }[P]; }>;
|
|
166
166
|
export declare const emits: {
|
|
167
167
|
'update:modelValue': any;
|
|
168
168
|
change: any;
|
|
@@ -408,6 +408,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
408
408
|
valueOnClear: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor, BooleanConstructor, FunctionConstructor], unknown, unknown>;
|
|
409
409
|
validateEvent: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
410
410
|
tabindex: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string | number) | (() => string | number) | ((new (...args: any[]) => string | number) | (() => string | number))[], unknown, unknown>;
|
|
411
|
+
datePickerSlots: import("./types").DatePickerSlots;
|
|
411
412
|
showNow: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
412
413
|
shortcuts: unknown[];
|
|
413
414
|
arrowControl: boolean;
|
|
@@ -416,7 +417,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
416
417
|
prefixIcon: "";
|
|
417
418
|
rangeSeparator: string;
|
|
418
419
|
isRange: boolean;
|
|
419
|
-
datePickerSlots: import("./types").DatePickerSlots;
|
|
420
420
|
}, {}, {
|
|
421
421
|
VkfFormItem: {
|
|
422
422
|
new (...args: any[]): any;
|
|
@@ -124,6 +124,10 @@ export declare const props: {
|
|
|
124
124
|
valueOnClear: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor, BooleanConstructor, FunctionConstructor], unknown, unknown, undefined, boolean>;
|
|
125
125
|
validateEvent: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
126
126
|
tabindex: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => string | number) | (() => string | number) | ((new (...args: any[]) => string | number) | (() => string | number))[], unknown, unknown, 0, boolean>;
|
|
127
|
+
datePickerSlots: {
|
|
128
|
+
type: PropType<import("@vunk/form/components/date-picker/src/types").DatePickerSlots>;
|
|
129
|
+
default: any;
|
|
130
|
+
};
|
|
127
131
|
showNow: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
128
132
|
disabledDate: {
|
|
129
133
|
readonly type: import("vue").PropType<Function>;
|
|
@@ -177,10 +181,6 @@ export declare const props: {
|
|
|
177
181
|
__epPropKey: true;
|
|
178
182
|
};
|
|
179
183
|
isRange: BooleanConstructor;
|
|
180
|
-
datePickerSlots: {
|
|
181
|
-
type: PropType<import("@vunk/form/components/date-picker/src/types").DatePickerSlots>;
|
|
182
|
-
default: any;
|
|
183
|
-
};
|
|
184
184
|
};
|
|
185
185
|
export declare const emits: {
|
|
186
186
|
'update:startValue': any;
|
|
@@ -124,6 +124,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
124
124
|
valueOnClear: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor, BooleanConstructor, FunctionConstructor], unknown, unknown, undefined, boolean>;
|
|
125
125
|
validateEvent: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
126
126
|
tabindex: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => string | number) | (() => string | number) | ((new (...args: any[]) => string | number) | (() => string | number))[], unknown, unknown, 0, boolean>;
|
|
127
|
+
datePickerSlots: {
|
|
128
|
+
type: import("vue").PropType<import("@vunk/form/components/date-picker/src/types").DatePickerSlots>;
|
|
129
|
+
default: any;
|
|
130
|
+
};
|
|
127
131
|
showNow: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
128
132
|
disabledDate: {
|
|
129
133
|
readonly type: import("vue").PropType<Function>;
|
|
@@ -177,10 +181,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
177
181
|
__epPropKey: true;
|
|
178
182
|
};
|
|
179
183
|
isRange: BooleanConstructor;
|
|
180
|
-
datePickerSlots: {
|
|
181
|
-
type: import("vue").PropType<import("@vunk/form/components/date-picker/src/types").DatePickerSlots>;
|
|
182
|
-
default: any;
|
|
183
|
-
};
|
|
184
184
|
}>, {
|
|
185
185
|
coreProps: import("vue").ComputedRef<{}>;
|
|
186
186
|
coreEmits: {
|
|
@@ -329,6 +329,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
329
329
|
valueOnClear: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor, BooleanConstructor, FunctionConstructor], unknown, unknown, undefined, boolean>;
|
|
330
330
|
validateEvent: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
331
331
|
tabindex: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => string | number) | (() => string | number) | ((new (...args: any[]) => string | number) | (() => string | number))[], unknown, unknown, 0, boolean>;
|
|
332
|
+
datePickerSlots: {
|
|
333
|
+
type: import("vue").PropType<import("@vunk/form/components/date-picker/src/types").DatePickerSlots>;
|
|
334
|
+
default: any;
|
|
335
|
+
};
|
|
332
336
|
showNow: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
333
337
|
disabledDate: {
|
|
334
338
|
readonly type: import("vue").PropType<Function>;
|
|
@@ -382,10 +386,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
382
386
|
__epPropKey: true;
|
|
383
387
|
};
|
|
384
388
|
isRange: BooleanConstructor;
|
|
385
|
-
datePickerSlots: {
|
|
386
|
-
type: import("vue").PropType<import("@vunk/form/components/date-picker/src/types").DatePickerSlots>;
|
|
387
|
-
default: any;
|
|
388
|
-
};
|
|
389
389
|
}>> & Readonly<{
|
|
390
390
|
onFocus?: (...args: any[] | unknown[]) => any;
|
|
391
391
|
onChange?: (...args: any[] | unknown[]) => any;
|
|
@@ -421,6 +421,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
421
421
|
valueOnClear: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor, BooleanConstructor, FunctionConstructor], unknown, unknown>;
|
|
422
422
|
validateEvent: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
423
423
|
tabindex: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string | number) | (() => string | number) | ((new (...args: any[]) => string | number) | (() => string | number))[], unknown, unknown>;
|
|
424
|
+
datePickerSlots: import("@vunk/form/components/date-picker/src/types").DatePickerSlots;
|
|
424
425
|
showNow: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
425
426
|
shortcuts: unknown[];
|
|
426
427
|
arrowControl: boolean;
|
|
@@ -432,7 +433,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
432
433
|
startPlaceholder: string;
|
|
433
434
|
endPlaceholder: string;
|
|
434
435
|
isRange: boolean;
|
|
435
|
-
datePickerSlots: import("@vunk/form/components/date-picker/src/types").DatePickerSlots;
|
|
436
436
|
startValue: string;
|
|
437
437
|
endValue: string;
|
|
438
438
|
selectOptions: import("./types").SelectMedia[];
|
|
@@ -61,6 +61,13 @@ const props = {
|
|
|
61
61
|
defaultExpandAll: {
|
|
62
62
|
type: Boolean,
|
|
63
63
|
default: false
|
|
64
|
+
},
|
|
65
|
+
/**
|
|
66
|
+
* @description 添加记录时的默认值
|
|
67
|
+
*/
|
|
68
|
+
defaultItemValue: {
|
|
69
|
+
type: Object,
|
|
70
|
+
default: () => ({})
|
|
64
71
|
}
|
|
65
72
|
};
|
|
66
73
|
const emits = {
|
|
@@ -105,7 +112,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
105
112
|
prop: [props2.prop ?? [], e.$index, column.prop].flat(),
|
|
106
113
|
templateType: column.templateType,
|
|
107
114
|
readonly: readonly.value,
|
|
108
|
-
|
|
115
|
+
templateProps: column.templateProps,
|
|
109
116
|
...column.createTemplateProps?.(e)
|
|
110
117
|
}]
|
|
111
118
|
}, null)
|
|
@@ -167,7 +174,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
167
174
|
});
|
|
168
175
|
function handlePlus(index) {
|
|
169
176
|
const data = cloneDeep.cloneDeep(props2.modelValue);
|
|
170
|
-
data.splice(index + 1, 0,
|
|
177
|
+
data.splice(index + 1, 0, cloneDeep.cloneDeep(props2.defaultItemValue));
|
|
171
178
|
emit("update:modelValue", data);
|
|
172
179
|
setExpandRowKeys([]);
|
|
173
180
|
}
|
|
@@ -178,7 +185,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
178
185
|
setExpandRowKeys([]);
|
|
179
186
|
}
|
|
180
187
|
const addToFirst = () => {
|
|
181
|
-
emit("update:modelValue", [
|
|
188
|
+
emit("update:modelValue", [cloneDeep.cloneDeep(props2.defaultItemValue), ...(props2.modelValue ?? [])]);
|
|
182
189
|
setExpandRowKeys([]);
|
|
183
190
|
};
|
|
184
191
|
const handleFormSetData = e => {
|
|
@@ -301,10 +308,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
301
308
|
]),
|
|
302
309
|
_: 1
|
|
303
310
|
/* STABLE */
|
|
304
|
-
}, 8, ["data", "onSetData"])
|
|
311
|
+
}, 8, ["data", "onSetData"]),
|
|
312
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
305
313
|
]),
|
|
306
|
-
_:
|
|
307
|
-
/*
|
|
314
|
+
_: 3
|
|
315
|
+
/* FORWARDED */
|
|
308
316
|
});
|
|
309
317
|
}
|
|
310
318
|
var VkfInputCollection = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/private-vunk-form/private-vunk-form/packages/components/input-collection/src/index.vue"]]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, computed, createVNode, Fragment, ref, resolveComponent, openBlock, createBlock, withCtx, normalizeProps, guardReactiveProps, createSlots, createElementBlock, createTextVNode, createCommentVNode } from 'vue';
|
|
1
|
+
import { defineComponent, computed, createVNode, Fragment, ref, resolveComponent, openBlock, createBlock, withCtx, normalizeProps, guardReactiveProps, createSlots, createElementBlock, createTextVNode, createCommentVNode, renderSlot } from 'vue';
|
|
2
2
|
import { _VkfFormItemCtx, VkfFormItem } from '@vunk/form/components/form-item';
|
|
3
3
|
import { VkTableColumns } from '@vunk/plus/components/table-columns';
|
|
4
4
|
import { ElTable, ElButton } from 'element-plus';
|
|
@@ -57,6 +57,13 @@ const props = {
|
|
|
57
57
|
defaultExpandAll: {
|
|
58
58
|
type: Boolean,
|
|
59
59
|
default: false
|
|
60
|
+
},
|
|
61
|
+
/**
|
|
62
|
+
* @description 添加记录时的默认值
|
|
63
|
+
*/
|
|
64
|
+
defaultItemValue: {
|
|
65
|
+
type: Object,
|
|
66
|
+
default: () => ({})
|
|
60
67
|
}
|
|
61
68
|
};
|
|
62
69
|
const emits = {
|
|
@@ -101,7 +108,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
101
108
|
prop: [props2.prop ?? [], e.$index, column.prop].flat(),
|
|
102
109
|
templateType: column.templateType,
|
|
103
110
|
readonly: readonly.value,
|
|
104
|
-
|
|
111
|
+
templateProps: column.templateProps,
|
|
105
112
|
...column.createTemplateProps?.(e)
|
|
106
113
|
}]
|
|
107
114
|
}, null)
|
|
@@ -163,7 +170,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
163
170
|
});
|
|
164
171
|
function handlePlus(index) {
|
|
165
172
|
const data = cloneDeep(props2.modelValue);
|
|
166
|
-
data.splice(index + 1, 0,
|
|
173
|
+
data.splice(index + 1, 0, cloneDeep(props2.defaultItemValue));
|
|
167
174
|
emit("update:modelValue", data);
|
|
168
175
|
setExpandRowKeys([]);
|
|
169
176
|
}
|
|
@@ -174,7 +181,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
174
181
|
setExpandRowKeys([]);
|
|
175
182
|
}
|
|
176
183
|
const addToFirst = () => {
|
|
177
|
-
emit("update:modelValue", [
|
|
184
|
+
emit("update:modelValue", [cloneDeep(props2.defaultItemValue), ...(props2.modelValue ?? [])]);
|
|
178
185
|
setExpandRowKeys([]);
|
|
179
186
|
};
|
|
180
187
|
const handleFormSetData = e => {
|
|
@@ -297,10 +304,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
297
304
|
]),
|
|
298
305
|
_: 1
|
|
299
306
|
/* STABLE */
|
|
300
|
-
}, 8, ["data", "onSetData"])
|
|
307
|
+
}, 8, ["data", "onSetData"]),
|
|
308
|
+
renderSlot(_ctx.$slots, "default")
|
|
301
309
|
]),
|
|
302
|
-
_:
|
|
303
|
-
/*
|
|
310
|
+
_: 3
|
|
311
|
+
/* FORWARDED */
|
|
304
312
|
});
|
|
305
313
|
}
|
|
306
314
|
var VkfInputCollection = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/private-vunk-form/private-vunk-form/packages/components/input-collection/src/index.vue"]]);
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
|
-
import { Column } from './types';
|
|
3
2
|
import { NormalObject } from '@vunk/shared';
|
|
4
3
|
export declare const props: {
|
|
5
4
|
columns: {
|
|
6
|
-
type: PropType<
|
|
5
|
+
type: PropType<any[]>;
|
|
7
6
|
default: () => any[];
|
|
8
7
|
};
|
|
9
8
|
modelValue: {
|
|
@@ -42,6 +41,13 @@ export declare const props: {
|
|
|
42
41
|
type: BooleanConstructor;
|
|
43
42
|
default: boolean;
|
|
44
43
|
};
|
|
44
|
+
/**
|
|
45
|
+
* @description 添加记录时的默认值
|
|
46
|
+
*/
|
|
47
|
+
defaultItemValue: {
|
|
48
|
+
type: PropType<NormalObject>;
|
|
49
|
+
default: () => {};
|
|
50
|
+
};
|
|
45
51
|
required: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
46
52
|
formItemSize: {
|
|
47
53
|
type: PropType<"default" | "small" | "large">;
|
|
@@ -3,7 +3,7 @@ import { SetDataEvent } from '@vunk/core';
|
|
|
3
3
|
import { NormalObject } from '@vunk/shared';
|
|
4
4
|
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
5
5
|
columns: {
|
|
6
|
-
type: import("vue").PropType<
|
|
6
|
+
type: import("vue").PropType<any[]>;
|
|
7
7
|
default: () => any[];
|
|
8
8
|
};
|
|
9
9
|
modelValue: {
|
|
@@ -30,6 +30,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
30
30
|
type: BooleanConstructor;
|
|
31
31
|
default: boolean;
|
|
32
32
|
};
|
|
33
|
+
defaultItemValue: {
|
|
34
|
+
type: import("vue").PropType<NormalObject>;
|
|
35
|
+
default: () => {};
|
|
36
|
+
};
|
|
33
37
|
required: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
34
38
|
formItemSize: {
|
|
35
39
|
type: import("vue").PropType<"default" | "small" | "large">;
|
|
@@ -103,7 +107,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
103
107
|
'update:modelValue': any;
|
|
104
108
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
105
109
|
columns: {
|
|
106
|
-
type: import("vue").PropType<
|
|
110
|
+
type: import("vue").PropType<any[]>;
|
|
107
111
|
default: () => any[];
|
|
108
112
|
};
|
|
109
113
|
modelValue: {
|
|
@@ -130,6 +134,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
130
134
|
type: BooleanConstructor;
|
|
131
135
|
default: boolean;
|
|
132
136
|
};
|
|
137
|
+
defaultItemValue: {
|
|
138
|
+
type: import("vue").PropType<NormalObject>;
|
|
139
|
+
default: () => {};
|
|
140
|
+
};
|
|
133
141
|
required: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
134
142
|
formItemSize: {
|
|
135
143
|
type: import("vue").PropType<"default" | "small" | "large">;
|
|
@@ -202,11 +210,12 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
202
210
|
inlineMessage: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, BooleanConstructor], unknown, unknown>;
|
|
203
211
|
showMessage: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
204
212
|
modelValue: NormalObject[];
|
|
205
|
-
columns:
|
|
213
|
+
columns: any[];
|
|
206
214
|
defaultExpandAll: boolean;
|
|
207
215
|
splicable: boolean;
|
|
208
216
|
labelActions: boolean;
|
|
209
217
|
summaryLabel: (data: NormalObject) => string;
|
|
218
|
+
defaultItemValue: NormalObject;
|
|
210
219
|
}, {}, {
|
|
211
220
|
ElTable: import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
212
221
|
data: {
|
|
@@ -8,13 +8,13 @@ export interface Source<P extends string = string> extends VueComponentPropsType
|
|
|
8
8
|
prop?: P | P[];
|
|
9
9
|
templateType: 'VkfInputCollection';
|
|
10
10
|
}
|
|
11
|
-
export type Column<R extends NormalObject = NormalObject
|
|
12
|
-
templateType:
|
|
13
|
-
templateProps?: Partial<
|
|
11
|
+
export type Column<R extends NormalObject = NormalObject, SourceType extends NormalObject = __VkfTemplatesDefault.CoreSource<Keyof<R>>> = Omit<__VkTableColumns.Source<R>, 'slots'> & {
|
|
12
|
+
templateType: SourceType['templateType'];
|
|
13
|
+
templateProps?: Partial<SourceType>;
|
|
14
14
|
expandVisible?: boolean;
|
|
15
15
|
createTemplateProps?: (e: {
|
|
16
16
|
row: R;
|
|
17
17
|
column: TableColumnCtx<R>;
|
|
18
18
|
$index: number;
|
|
19
|
-
}) => Partial<
|
|
19
|
+
}) => Partial<SourceType>;
|
|
20
20
|
};
|