@vunk/form 2.14.17 → 2.14.18
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/card-input-collection/index.cjs +3 -2
- package/components/card-input-collection/index.mjs +3 -2
- package/components/card-input-collection/src/core.vue.d.ts +4 -4
- package/components/card-input-collection/src/ctx.d.ts +1 -1
- package/components/card-input-collection/src/index.vue.d.ts +3 -3
- package/components/dialog-input-collection/index.cjs +3 -2
- package/components/dialog-input-collection/index.mjs +3 -2
- package/components/dialog-input-collection/src/ctx.d.ts +1 -1
- package/components/dialog-input-collection/src/index.vue.d.ts +4 -4
- package/components/input-collection/index.cjs +5 -3
- package/components/input-collection/index.mjs +5 -3
- package/components/input-collection/src/core.vue.d.ts +4 -4
- package/components/input-collection/src/ctx.d.ts +1 -1
- package/components/input-collection/src/index.vue.d.ts +3 -3
- package/package.json +1 -1
|
@@ -53,7 +53,7 @@ const props = {
|
|
|
53
53
|
* @description 添加记录时的默认值
|
|
54
54
|
*/
|
|
55
55
|
defaultItemValue: {
|
|
56
|
-
type: Object,
|
|
56
|
+
type: [Object, Function],
|
|
57
57
|
default: () => ({})
|
|
58
58
|
},
|
|
59
59
|
/**
|
|
@@ -109,10 +109,11 @@ var _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
109
109
|
});
|
|
110
110
|
function handlePlus(index) {
|
|
111
111
|
const data = cloneDeep.cloneDeep(props.modelValue);
|
|
112
|
+
const defaultItemValue = _function.isCallable(props.defaultItemValue) ? props.defaultItemValue() : props.defaultItemValue;
|
|
112
113
|
data.splice(
|
|
113
114
|
index + 1,
|
|
114
115
|
0,
|
|
115
|
-
cloneDeep.cloneDeep(
|
|
116
|
+
cloneDeep.cloneDeep(defaultItemValue)
|
|
116
117
|
);
|
|
117
118
|
emit("update:modelValue", data);
|
|
118
119
|
}
|
|
@@ -49,7 +49,7 @@ const props = {
|
|
|
49
49
|
* @description 添加记录时的默认值
|
|
50
50
|
*/
|
|
51
51
|
defaultItemValue: {
|
|
52
|
-
type: Object,
|
|
52
|
+
type: [Object, Function],
|
|
53
53
|
default: () => ({})
|
|
54
54
|
},
|
|
55
55
|
/**
|
|
@@ -105,10 +105,11 @@ var _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
105
105
|
});
|
|
106
106
|
function handlePlus(index) {
|
|
107
107
|
const data = cloneDeep(props.modelValue);
|
|
108
|
+
const defaultItemValue = isCallable(props.defaultItemValue) ? props.defaultItemValue() : props.defaultItemValue;
|
|
108
109
|
data.splice(
|
|
109
110
|
index + 1,
|
|
110
111
|
0,
|
|
111
|
-
cloneDeep(
|
|
112
|
+
cloneDeep(defaultItemValue)
|
|
112
113
|
);
|
|
113
114
|
emit("update:modelValue", data);
|
|
114
115
|
}
|
|
@@ -26,7 +26,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
26
26
|
default: boolean;
|
|
27
27
|
};
|
|
28
28
|
defaultItemValue: {
|
|
29
|
-
type: import("vue").PropType<NormalObject>;
|
|
29
|
+
type: import("vue").PropType<NormalObject | (() => NormalObject)>;
|
|
30
30
|
default: () => {};
|
|
31
31
|
};
|
|
32
32
|
keepLast: {
|
|
@@ -153,7 +153,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
153
153
|
default: boolean;
|
|
154
154
|
};
|
|
155
155
|
defaultItemValue: {
|
|
156
|
-
type: import("vue").PropType<NormalObject>;
|
|
156
|
+
type: import("vue").PropType<NormalObject | (() => NormalObject)>;
|
|
157
157
|
default: () => {};
|
|
158
158
|
};
|
|
159
159
|
keepLast: {
|
|
@@ -970,7 +970,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
970
970
|
default: boolean;
|
|
971
971
|
};
|
|
972
972
|
defaultItemValue: {
|
|
973
|
-
type: import("vue").PropType<NormalObject>;
|
|
973
|
+
type: import("vue").PropType<NormalObject | (() => NormalObject)>;
|
|
974
974
|
default: () => {};
|
|
975
975
|
};
|
|
976
976
|
keepLast: {
|
|
@@ -1092,7 +1092,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1092
1092
|
columns: any[];
|
|
1093
1093
|
labelActions: boolean;
|
|
1094
1094
|
splicable: boolean;
|
|
1095
|
-
defaultItemValue:
|
|
1095
|
+
defaultItemValue: {};
|
|
1096
1096
|
keepLast: boolean;
|
|
1097
1097
|
topSplicable: boolean;
|
|
1098
1098
|
cardProps: Partial<import("element-plus").CardProps>;
|
|
@@ -24,7 +24,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
24
24
|
default: boolean;
|
|
25
25
|
};
|
|
26
26
|
defaultItemValue: {
|
|
27
|
-
type: import("vue").PropType<import("@vunk/shared").NormalObject>;
|
|
27
|
+
type: import("vue").PropType<import("@vunk/shared").NormalObject | (() => import("@vunk/shared").NormalObject)>;
|
|
28
28
|
default: () => {};
|
|
29
29
|
};
|
|
30
30
|
keepLast: {
|
|
@@ -154,7 +154,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
154
154
|
default: boolean;
|
|
155
155
|
};
|
|
156
156
|
defaultItemValue: {
|
|
157
|
-
type: import("vue").PropType<import("@vunk/shared").NormalObject>;
|
|
157
|
+
type: import("vue").PropType<import("@vunk/shared").NormalObject | (() => import("@vunk/shared").NormalObject)>;
|
|
158
158
|
default: () => {};
|
|
159
159
|
};
|
|
160
160
|
keepLast: {
|
|
@@ -276,7 +276,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
276
276
|
columns: any[];
|
|
277
277
|
labelActions: boolean;
|
|
278
278
|
splicable: boolean;
|
|
279
|
-
defaultItemValue:
|
|
279
|
+
defaultItemValue: {};
|
|
280
280
|
keepLast: boolean;
|
|
281
281
|
topSplicable: boolean;
|
|
282
282
|
cardProps: Partial<import("element-plus").CardProps>;
|
|
@@ -59,7 +59,7 @@ const props = {
|
|
|
59
59
|
* @description 添加记录时的默认值
|
|
60
60
|
*/
|
|
61
61
|
defaultItemValue: {
|
|
62
|
-
type: Object,
|
|
62
|
+
type: [Object, Function],
|
|
63
63
|
default: () => ({})
|
|
64
64
|
},
|
|
65
65
|
dialogFormProps: {
|
|
@@ -385,8 +385,9 @@ var _sfc_main = /* @__PURE__ */vue.defineComponent({
|
|
|
385
385
|
emit("update:modelValue", data);
|
|
386
386
|
}
|
|
387
387
|
function handlePlus(index) {
|
|
388
|
+
const defaultItemValue = _function.isCallable(props.defaultItemValue) ? props.defaultItemValue() : props.defaultItemValue;
|
|
388
389
|
cuState.index = index;
|
|
389
|
-
cuState.data = cloneDeep.cloneDeep(
|
|
390
|
+
cuState.data = cloneDeep.cloneDeep(defaultItemValue);
|
|
390
391
|
cuState.type = _enum.CRUD.create;
|
|
391
392
|
cuState.dialogVisible = true;
|
|
392
393
|
}
|
|
@@ -55,7 +55,7 @@ const props = {
|
|
|
55
55
|
* @description 添加记录时的默认值
|
|
56
56
|
*/
|
|
57
57
|
defaultItemValue: {
|
|
58
|
-
type: Object,
|
|
58
|
+
type: [Object, Function],
|
|
59
59
|
default: () => ({})
|
|
60
60
|
},
|
|
61
61
|
dialogFormProps: {
|
|
@@ -381,8 +381,9 @@ var _sfc_main = /* @__PURE__ */defineComponent({
|
|
|
381
381
|
emit("update:modelValue", data);
|
|
382
382
|
}
|
|
383
383
|
function handlePlus(index) {
|
|
384
|
+
const defaultItemValue = isCallable(props.defaultItemValue) ? props.defaultItemValue() : props.defaultItemValue;
|
|
384
385
|
cuState.index = index;
|
|
385
|
-
cuState.data = cloneDeep(
|
|
386
|
+
cuState.data = cloneDeep(defaultItemValue);
|
|
386
387
|
cuState.type = CRUD.create;
|
|
387
388
|
cuState.dialogVisible = true;
|
|
388
389
|
}
|
|
@@ -24,7 +24,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
24
24
|
default: boolean;
|
|
25
25
|
};
|
|
26
26
|
defaultItemValue: {
|
|
27
|
-
type: import("vue").PropType<NormalObject>;
|
|
27
|
+
type: import("vue").PropType<NormalObject | (() => NormalObject)>;
|
|
28
28
|
default: () => {};
|
|
29
29
|
};
|
|
30
30
|
dialogFormProps: {
|
|
@@ -146,7 +146,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
146
146
|
default: boolean;
|
|
147
147
|
};
|
|
148
148
|
defaultItemValue: {
|
|
149
|
-
type: import("vue").PropType<NormalObject>;
|
|
149
|
+
type: import("vue").PropType<NormalObject | (() => NormalObject)>;
|
|
150
150
|
default: () => {};
|
|
151
151
|
};
|
|
152
152
|
dialogFormProps: {
|
|
@@ -2973,7 +2973,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
2973
2973
|
default: boolean;
|
|
2974
2974
|
};
|
|
2975
2975
|
defaultItemValue: {
|
|
2976
|
-
type: import("vue").PropType<NormalObject>;
|
|
2976
|
+
type: import("vue").PropType<NormalObject | (() => NormalObject)>;
|
|
2977
2977
|
default: () => {};
|
|
2978
2978
|
};
|
|
2979
2979
|
dialogFormProps: {
|
|
@@ -3094,7 +3094,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
3094
3094
|
modules: "operations:add"[];
|
|
3095
3095
|
labelActions: boolean;
|
|
3096
3096
|
splicable: boolean;
|
|
3097
|
-
defaultItemValue:
|
|
3097
|
+
defaultItemValue: {};
|
|
3098
3098
|
dialogFormProps: Record<string, any>;
|
|
3099
3099
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
3100
3100
|
export default _default;
|
|
@@ -58,7 +58,7 @@ const props = {
|
|
|
58
58
|
* @description 添加记录时的默认值
|
|
59
59
|
*/
|
|
60
60
|
defaultItemValue: {
|
|
61
|
-
type: Object,
|
|
61
|
+
type: [Object, Function],
|
|
62
62
|
default: () => ({})
|
|
63
63
|
},
|
|
64
64
|
/**
|
|
@@ -208,7 +208,8 @@ var _sfc_main$1 = /* @__PURE__ */vue.defineComponent({
|
|
|
208
208
|
});
|
|
209
209
|
function handlePlus(index) {
|
|
210
210
|
const data = cloneDeep.cloneDeep(props.modelValue);
|
|
211
|
-
|
|
211
|
+
const defaultItemValue = _function.isCallable(props.defaultItemValue) ? props.defaultItemValue() : props.defaultItemValue;
|
|
212
|
+
data.splice(index + 1, 0, cloneDeep.cloneDeep(defaultItemValue));
|
|
212
213
|
emit("update:modelValue", data);
|
|
213
214
|
setExpandRowKeys([]);
|
|
214
215
|
}
|
|
@@ -222,7 +223,8 @@ var _sfc_main$1 = /* @__PURE__ */vue.defineComponent({
|
|
|
222
223
|
setExpandRowKeys([]);
|
|
223
224
|
}
|
|
224
225
|
const addToFirst = () => {
|
|
225
|
-
|
|
226
|
+
const defaultItemValue = _function.isCallable(props.defaultItemValue) ? props.defaultItemValue() : props.defaultItemValue;
|
|
227
|
+
emit("update:modelValue", [cloneDeep.cloneDeep(defaultItemValue), ...(props.modelValue ?? [])]);
|
|
226
228
|
setExpandRowKeys([]);
|
|
227
229
|
};
|
|
228
230
|
const handleFormSetData = e => {
|
|
@@ -54,7 +54,7 @@ const props = {
|
|
|
54
54
|
* @description 添加记录时的默认值
|
|
55
55
|
*/
|
|
56
56
|
defaultItemValue: {
|
|
57
|
-
type: Object,
|
|
57
|
+
type: [Object, Function],
|
|
58
58
|
default: () => ({})
|
|
59
59
|
},
|
|
60
60
|
/**
|
|
@@ -204,7 +204,8 @@ var _sfc_main$1 = /* @__PURE__ */defineComponent({
|
|
|
204
204
|
});
|
|
205
205
|
function handlePlus(index) {
|
|
206
206
|
const data = cloneDeep(props.modelValue);
|
|
207
|
-
|
|
207
|
+
const defaultItemValue = isCallable(props.defaultItemValue) ? props.defaultItemValue() : props.defaultItemValue;
|
|
208
|
+
data.splice(index + 1, 0, cloneDeep(defaultItemValue));
|
|
208
209
|
emit("update:modelValue", data);
|
|
209
210
|
setExpandRowKeys([]);
|
|
210
211
|
}
|
|
@@ -218,7 +219,8 @@ var _sfc_main$1 = /* @__PURE__ */defineComponent({
|
|
|
218
219
|
setExpandRowKeys([]);
|
|
219
220
|
}
|
|
220
221
|
const addToFirst = () => {
|
|
221
|
-
|
|
222
|
+
const defaultItemValue = isCallable(props.defaultItemValue) ? props.defaultItemValue() : props.defaultItemValue;
|
|
223
|
+
emit("update:modelValue", [cloneDeep(defaultItemValue), ...(props.modelValue ?? [])]);
|
|
222
224
|
setExpandRowKeys([]);
|
|
223
225
|
};
|
|
224
226
|
const handleFormSetData = e => {
|
|
@@ -27,7 +27,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
27
27
|
default: boolean;
|
|
28
28
|
};
|
|
29
29
|
defaultItemValue: {
|
|
30
|
-
type: import("vue").PropType<NormalObject>;
|
|
30
|
+
type: import("vue").PropType<NormalObject | (() => NormalObject)>;
|
|
31
31
|
default: () => {};
|
|
32
32
|
};
|
|
33
33
|
keepLast: {
|
|
@@ -158,7 +158,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
158
158
|
default: boolean;
|
|
159
159
|
};
|
|
160
160
|
defaultItemValue: {
|
|
161
|
-
type: import("vue").PropType<NormalObject>;
|
|
161
|
+
type: import("vue").PropType<NormalObject | (() => NormalObject)>;
|
|
162
162
|
default: () => {};
|
|
163
163
|
};
|
|
164
164
|
keepLast: {
|
|
@@ -1042,7 +1042,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1042
1042
|
default: boolean;
|
|
1043
1043
|
};
|
|
1044
1044
|
defaultItemValue: {
|
|
1045
|
-
type: import("vue").PropType<NormalObject>;
|
|
1045
|
+
type: import("vue").PropType<NormalObject | (() => NormalObject)>;
|
|
1046
1046
|
default: () => {};
|
|
1047
1047
|
};
|
|
1048
1048
|
keepLast: {
|
|
@@ -1171,7 +1171,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1171
1171
|
defaultExpandAll: boolean;
|
|
1172
1172
|
labelActions: boolean;
|
|
1173
1173
|
splicable: boolean;
|
|
1174
|
-
defaultItemValue:
|
|
1174
|
+
defaultItemValue: {};
|
|
1175
1175
|
keepLast: boolean;
|
|
1176
1176
|
topSplicable: boolean;
|
|
1177
1177
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -24,7 +24,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
24
24
|
default: boolean;
|
|
25
25
|
};
|
|
26
26
|
defaultItemValue: {
|
|
27
|
-
type: import("vue").PropType<import("@vunk/shared").NormalObject>;
|
|
27
|
+
type: import("vue").PropType<import("@vunk/shared").NormalObject | (() => import("@vunk/shared").NormalObject)>;
|
|
28
28
|
default: () => {};
|
|
29
29
|
};
|
|
30
30
|
keepLast: {
|
|
@@ -157,7 +157,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
157
157
|
default: boolean;
|
|
158
158
|
};
|
|
159
159
|
defaultItemValue: {
|
|
160
|
-
type: import("vue").PropType<import("@vunk/shared").NormalObject>;
|
|
160
|
+
type: import("vue").PropType<import("@vunk/shared").NormalObject | (() => import("@vunk/shared").NormalObject)>;
|
|
161
161
|
default: () => {};
|
|
162
162
|
};
|
|
163
163
|
keepLast: {
|
|
@@ -286,7 +286,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
286
286
|
defaultExpandAll: boolean;
|
|
287
287
|
labelActions: boolean;
|
|
288
288
|
splicable: boolean;
|
|
289
|
-
defaultItemValue:
|
|
289
|
+
defaultItemValue: {};
|
|
290
290
|
keepLast: boolean;
|
|
291
291
|
topSplicable: boolean;
|
|
292
292
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|