@vunk/form 2.5.5 → 2.5.7
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 +1 -1
- package/components/card-input-collection/index.mjs +1 -1
- package/components/input-collection/index.cjs +7 -6
- package/components/input-collection/index.mjs +8 -7
- package/components/input-collection/src/ctx.d.ts +1 -2
- package/components/input-collection/src/index.vue.d.ts +3 -3
- package/components/input-collection/src/types.d.ts +4 -4
- package/package.json +1 -1
|
@@ -105,7 +105,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
105
105
|
prop: [props2.prop ?? [], e.$index, column.prop].flat(),
|
|
106
106
|
templateType: column.templateType,
|
|
107
107
|
readonly: readonly.value,
|
|
108
|
-
|
|
108
|
+
templateProps: column.templateProps,
|
|
109
109
|
...column.createTemplateProps?.(e)
|
|
110
110
|
}]
|
|
111
111
|
}, null)
|
|
@@ -178,7 +178,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
178
178
|
setExpandRowKeys([]);
|
|
179
179
|
}
|
|
180
180
|
const addToFirst = () => {
|
|
181
|
-
emit("update:modelValue", [{}, ...props2.modelValue]);
|
|
181
|
+
emit("update:modelValue", [{}, ...(props2.modelValue ?? [])]);
|
|
182
182
|
setExpandRowKeys([]);
|
|
183
183
|
};
|
|
184
184
|
const handleFormSetData = e => {
|
|
@@ -188,7 +188,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
188
188
|
};
|
|
189
189
|
const ROW_KEY = "_row_key";
|
|
190
190
|
const tableData = vue.computed(() => {
|
|
191
|
-
return props2.modelValue
|
|
191
|
+
return props2.modelValue?.map((e, index) => {
|
|
192
192
|
return {
|
|
193
193
|
...e,
|
|
194
194
|
[ROW_KEY]: index + ""
|
|
@@ -301,10 +301,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
301
301
|
]),
|
|
302
302
|
_: 1
|
|
303
303
|
/* STABLE */
|
|
304
|
-
}, 8, ["data", "onSetData"])
|
|
304
|
+
}, 8, ["data", "onSetData"]),
|
|
305
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
305
306
|
]),
|
|
306
|
-
_:
|
|
307
|
-
/*
|
|
307
|
+
_: 3
|
|
308
|
+
/* FORWARDED */
|
|
308
309
|
});
|
|
309
310
|
}
|
|
310
311
|
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';
|
|
@@ -101,7 +101,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
101
101
|
prop: [props2.prop ?? [], e.$index, column.prop].flat(),
|
|
102
102
|
templateType: column.templateType,
|
|
103
103
|
readonly: readonly.value,
|
|
104
|
-
|
|
104
|
+
templateProps: column.templateProps,
|
|
105
105
|
...column.createTemplateProps?.(e)
|
|
106
106
|
}]
|
|
107
107
|
}, null)
|
|
@@ -174,7 +174,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
174
174
|
setExpandRowKeys([]);
|
|
175
175
|
}
|
|
176
176
|
const addToFirst = () => {
|
|
177
|
-
emit("update:modelValue", [{}, ...props2.modelValue]);
|
|
177
|
+
emit("update:modelValue", [{}, ...(props2.modelValue ?? [])]);
|
|
178
178
|
setExpandRowKeys([]);
|
|
179
179
|
};
|
|
180
180
|
const handleFormSetData = e => {
|
|
@@ -184,7 +184,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
184
184
|
};
|
|
185
185
|
const ROW_KEY = "_row_key";
|
|
186
186
|
const tableData = computed(() => {
|
|
187
|
-
return props2.modelValue
|
|
187
|
+
return props2.modelValue?.map((e, index) => {
|
|
188
188
|
return {
|
|
189
189
|
...e,
|
|
190
190
|
[ROW_KEY]: index + ""
|
|
@@ -297,10 +297,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
297
297
|
]),
|
|
298
298
|
_: 1
|
|
299
299
|
/* STABLE */
|
|
300
|
-
}, 8, ["data", "onSetData"])
|
|
300
|
+
}, 8, ["data", "onSetData"]),
|
|
301
|
+
renderSlot(_ctx.$slots, "default")
|
|
301
302
|
]),
|
|
302
|
-
_:
|
|
303
|
-
/*
|
|
303
|
+
_: 3
|
|
304
|
+
/* FORWARDED */
|
|
304
305
|
});
|
|
305
306
|
}
|
|
306
307
|
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: {
|
|
@@ -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: {
|
|
@@ -103,7 +103,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
103
103
|
'update:modelValue': any;
|
|
104
104
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
105
105
|
columns: {
|
|
106
|
-
type: import("vue").PropType<
|
|
106
|
+
type: import("vue").PropType<any[]>;
|
|
107
107
|
default: () => any[];
|
|
108
108
|
};
|
|
109
109
|
modelValue: {
|
|
@@ -202,7 +202,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
202
202
|
inlineMessage: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, BooleanConstructor], unknown, unknown>;
|
|
203
203
|
showMessage: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
204
204
|
modelValue: NormalObject[];
|
|
205
|
-
columns:
|
|
205
|
+
columns: any[];
|
|
206
206
|
defaultExpandAll: boolean;
|
|
207
207
|
splicable: boolean;
|
|
208
208
|
labelActions: boolean;
|
|
@@ -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
|
};
|