@vunk/form 2.7.0 → 2.7.1
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/information-collection/index.cjs +5 -0
- package/components/information-collection/index.mjs +5 -0
- package/components/information-collection/src/ctx.d.ts +5 -0
- package/components/information-collection/src/index.vue.d.ts +9 -0
- package/components/information-collection/src/types.d.ts +3 -1
- package/components/information-tag/src/index.vue.d.ts +1 -1
- package/components/input-collection/src/types.d.ts +2 -3
- package/package.json +1 -1
|
@@ -22,6 +22,10 @@ const props = {
|
|
|
22
22
|
labelRender: {
|
|
23
23
|
type: Function,
|
|
24
24
|
default: void 0
|
|
25
|
+
},
|
|
26
|
+
typeRender: {
|
|
27
|
+
type: Function,
|
|
28
|
+
default: void 0
|
|
25
29
|
}
|
|
26
30
|
};
|
|
27
31
|
const emits = {};
|
|
@@ -45,6 +49,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
45
49
|
default: () => props2.modelValue.map((item, index) => vue.createVNode(informationTag.VkfInformationTag, {
|
|
46
50
|
"key": index,
|
|
47
51
|
"data": item,
|
|
52
|
+
"type": props2.typeRender?.(item),
|
|
48
53
|
"labelRender": props2.labelRender,
|
|
49
54
|
"formItems": props2.columns.map(v => ({
|
|
50
55
|
...v,
|
|
@@ -18,6 +18,10 @@ const props = {
|
|
|
18
18
|
labelRender: {
|
|
19
19
|
type: Function,
|
|
20
20
|
default: void 0
|
|
21
|
+
},
|
|
22
|
+
typeRender: {
|
|
23
|
+
type: Function,
|
|
24
|
+
default: void 0
|
|
21
25
|
}
|
|
22
26
|
};
|
|
23
27
|
const emits = {};
|
|
@@ -41,6 +45,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
41
45
|
default: () => props2.modelValue.map((item, index) => createVNode(VkfInformationTag, {
|
|
42
46
|
"key": index,
|
|
43
47
|
"data": item,
|
|
48
|
+
"type": props2.typeRender?.(item),
|
|
44
49
|
"labelRender": props2.labelRender,
|
|
45
50
|
"formItems": props2.columns.map(v => ({
|
|
46
51
|
...v,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Func } from '@vunk/core';
|
|
2
2
|
import { NormalObject } from '@vunk/shared';
|
|
3
3
|
import { PropType } from 'vue';
|
|
4
|
+
import { TagProps } from 'element-plus';
|
|
4
5
|
export declare const props: {
|
|
5
6
|
modelValue: {
|
|
6
7
|
type: {
|
|
@@ -44,6 +45,10 @@ export declare const props: {
|
|
|
44
45
|
type: PropType<Func<any, string>>;
|
|
45
46
|
default: any;
|
|
46
47
|
};
|
|
48
|
+
typeRender: {
|
|
49
|
+
type: PropType<Func<any, TagProps["type"]>>;
|
|
50
|
+
default: any;
|
|
51
|
+
};
|
|
47
52
|
required: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
48
53
|
formItemSize: {
|
|
49
54
|
type: PropType<"default" | "small" | "large">;
|
|
@@ -41,6 +41,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
41
41
|
type: import("vue").PropType<import("@vunk/core").Func<any, string>>;
|
|
42
42
|
default: any;
|
|
43
43
|
};
|
|
44
|
+
typeRender: {
|
|
45
|
+
type: import("vue").PropType<import("@vunk/core").Func<any, import("element-plus").TagProps["type"]>>;
|
|
46
|
+
default: any;
|
|
47
|
+
};
|
|
44
48
|
required: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
45
49
|
formItemSize: {
|
|
46
50
|
type: import("vue").PropType<"default" | "small" | "large">;
|
|
@@ -143,6 +147,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
143
147
|
type: import("vue").PropType<import("@vunk/core").Func<any, string>>;
|
|
144
148
|
default: any;
|
|
145
149
|
};
|
|
150
|
+
typeRender: {
|
|
151
|
+
type: import("vue").PropType<import("@vunk/core").Func<any, import("element-plus").TagProps["type"]>>;
|
|
152
|
+
default: any;
|
|
153
|
+
};
|
|
146
154
|
required: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
147
155
|
formItemSize: {
|
|
148
156
|
type: import("vue").PropType<"default" | "small" | "large">;
|
|
@@ -219,5 +227,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
219
227
|
modelValue: import("@vunk/shared").NormalObject[];
|
|
220
228
|
columns: any[];
|
|
221
229
|
labelRender: ((...args: any) => string) | ((arg: any) => string);
|
|
230
|
+
typeRender: ((...args: any) => import("element-plus/es/utils").EpPropMergeType<StringConstructor, "success" | "warning" | "info" | "primary" | "danger", unknown>) | ((arg: any) => import("element-plus/es/utils").EpPropMergeType<StringConstructor, "success" | "warning" | "info" | "primary" | "danger", unknown>);
|
|
222
231
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
223
232
|
export default _default;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { __VkfInputCollection } from '@vunk/form/components/input-collection';
|
|
2
2
|
import { __VkfTemplatesDefault } from '@vunk/form';
|
|
3
|
-
import { Keyof, NormalObject } from '@vunk/shared';
|
|
3
|
+
import { Keyof, NormalObject, VueComponentPropsType } from '@vunk/shared';
|
|
4
|
+
import type Core from './index.vue';
|
|
4
5
|
export type Column<R extends NormalObject = NormalObject, SourceType extends NormalObject = __VkfTemplatesDefault.CoreSource<Keyof<R>>> = __VkfInputCollection.Column<R, SourceType>;
|
|
6
|
+
export type ComponentProps = VueComponentPropsType<typeof Core>;
|
|
@@ -98,9 +98,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
98
98
|
round: boolean;
|
|
99
99
|
formItems: any[];
|
|
100
100
|
title: string | ((data: any) => string);
|
|
101
|
-
labelRender: (data: import("@vunk/shared").NormalObject) => string;
|
|
102
101
|
closable: boolean;
|
|
103
102
|
disableTransitions: boolean;
|
|
104
103
|
hit: boolean;
|
|
104
|
+
labelRender: (data: import("@vunk/shared").NormalObject) => string;
|
|
105
105
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
106
106
|
export default _default;
|
|
@@ -4,12 +4,11 @@ import type { __VkTableColumns } from '@vunk/plus/components/table-columns';
|
|
|
4
4
|
import type { Keyof, NormalObject, VueComponentPropsType } from '@vunk/shared';
|
|
5
5
|
import type { TableColumnCtx } from 'element-plus';
|
|
6
6
|
import type Core from './index.vue';
|
|
7
|
+
import type { __VkfInformationCollection } from '@vunk/form/components/information-collection';
|
|
7
8
|
export interface Source<P extends string = string> extends VueComponentPropsType<typeof Core>, BasicSource {
|
|
8
9
|
prop?: P | P[];
|
|
9
10
|
templateType: 'VkfInputCollection';
|
|
10
|
-
informationProps?:
|
|
11
|
-
labelRender?: (row: any) => string;
|
|
12
|
-
};
|
|
11
|
+
informationProps?: Partial<__VkfInformationCollection.ComponentProps>;
|
|
13
12
|
}
|
|
14
13
|
export type Column<R extends NormalObject = NormalObject, SourceType extends NormalObject = __VkfTemplatesDefault.CoreSource<Keyof<R>>> = Omit<__VkTableColumns.Source<R>, 'slots'> & {
|
|
15
14
|
templateType: SourceType['templateType'];
|