@vunk/form 2.6.2 → 2.7.0
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/form-item-renderer/index.cjs +3 -0
- package/components/form-item-renderer/index.mjs +3 -0
- package/components/form-item-renderer/src/types.d.ts +2 -5
- package/components/form-item-renderer-template/src/types.d.ts +6 -2
- package/components/information/index.cjs +22 -36
- package/components/information/index.mjs +23 -37
- package/components/information/src/index.vue.d.ts +2 -370
- package/components/information-collection/index.cjs +73 -0
- package/components/information-collection/index.d.ts +4 -0
- package/components/information-collection/index.mjs +67 -0
- package/components/information-collection/src/ctx.d.ts +107 -0
- package/components/information-collection/src/index.vue.d.ts +223 -0
- package/components/information-collection/src/types.d.ts +4 -0
- package/components/information-tag/index.cjs +101 -0
- package/components/information-tag/index.css +6 -0
- package/components/information-tag/index.d.ts +4 -0
- package/components/information-tag/index.mjs +95 -0
- package/components/information-tag/src/ctx.d.ts +50 -0
- package/components/information-tag/src/index.vue.d.ts +106 -0
- package/components/information-templates-default/index.cjs +56 -169
- package/components/information-templates-default/index.mjs +58 -171
- package/components/information-templates-default/src/index.vue.d.ts +1 -51
- package/components/input-collection/index.cjs +0 -9
- package/components/input-collection/index.mjs +0 -9
- package/components/input-collection/src/ctx.d.ts +0 -7
- package/components/input-collection/src/index.vue.d.ts +0 -9
- package/components/input-collection/src/types.d.ts +3 -0
- package/index.css +7 -7
- package/package.json +14 -9
- package/shared/element-plus/ctx.d.ts +2 -0
- package/shared/element-plus/index.cjs +4 -0
- package/shared/element-plus/index.mjs +4 -2
- package/shared/types/source/index.d.ts +21 -1
- package/components/tag-information/index.cjs +0 -114
- package/components/tag-information/index.css +0 -6
- package/components/tag-information/index.d.ts +0 -4
- package/components/tag-information/index.mjs +0 -108
- package/components/tag-information/src/ctx.d.ts +0 -34
- package/components/tag-information/src/index.vue.d.ts +0 -912
- /package/components/{tag-information → information-tag}/src/types.d.ts +0 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
var formItem = require('@vunk/form/components/form-item');
|
|
7
|
+
var informationTag = require('@vunk/form/components/information-tag');
|
|
8
|
+
var templateInstancesProvider = require('@vunk/form/components/template-instances-provider');
|
|
9
|
+
var informationTemplatesDefault = require('@vunk/form/components/information-templates-default');
|
|
10
|
+
var _pluginVue_exportHelper = require('../_plugin-vue_export-helper.cjs');
|
|
11
|
+
|
|
12
|
+
const props = {
|
|
13
|
+
...formItem._VkfFormItemCtx.props,
|
|
14
|
+
modelValue: {
|
|
15
|
+
type: Array,
|
|
16
|
+
default: () => []
|
|
17
|
+
},
|
|
18
|
+
columns: {
|
|
19
|
+
type: Array,
|
|
20
|
+
default: () => []
|
|
21
|
+
},
|
|
22
|
+
labelRender: {
|
|
23
|
+
type: Function,
|
|
24
|
+
default: void 0
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
const emits = {};
|
|
28
|
+
|
|
29
|
+
var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
30
|
+
name: "VkfInformationCollection",
|
|
31
|
+
props,
|
|
32
|
+
emits,
|
|
33
|
+
setup(props2, {
|
|
34
|
+
emit
|
|
35
|
+
}) {
|
|
36
|
+
const formItemProps = formItem._VkfFormItemCtx.createBindProps(props2);
|
|
37
|
+
return () => vue.createVNode(formItem.VkfFormItem, vue.mergeProps({
|
|
38
|
+
"class": "vk-information-collection",
|
|
39
|
+
"information": true
|
|
40
|
+
}, formItemProps.value), {
|
|
41
|
+
default: () => [vue.createVNode("div", {
|
|
42
|
+
"class": "vk-information-collection-value"
|
|
43
|
+
}, [vue.createVNode(templateInstancesProvider.VkfTemplateInstancesProvider, null, {
|
|
44
|
+
placeholder: () => vue.createVNode(informationTemplatesDefault.VkfInformationTemplatesDefault, null, null),
|
|
45
|
+
default: () => props2.modelValue.map((item, index) => vue.createVNode(informationTag.VkfInformationTag, {
|
|
46
|
+
"key": index,
|
|
47
|
+
"data": item,
|
|
48
|
+
"labelRender": props2.labelRender,
|
|
49
|
+
"formItems": props2.columns.map(v => ({
|
|
50
|
+
...v,
|
|
51
|
+
...v.templateProps?.createTemplateProps?.({
|
|
52
|
+
row: item
|
|
53
|
+
})
|
|
54
|
+
}))
|
|
55
|
+
}, null))
|
|
56
|
+
})])]
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
var VkfInformationCollection = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__file", "/home/runner/work/private-vunk-form/private-vunk-form/packages/components/information-collection/src/index.vue"]]);
|
|
62
|
+
|
|
63
|
+
var types = /*#__PURE__*/Object.freeze({
|
|
64
|
+
__proto__: null
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
VkfInformationCollection.install = (app) => {
|
|
68
|
+
app.component(VkfInformationCollection.name || "VkfInformationCollection", VkfInformationCollection);
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
exports.VkfInformationCollection = VkfInformationCollection;
|
|
72
|
+
exports.__VkfInformationCollection = types;
|
|
73
|
+
exports.default = VkfInformationCollection;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { defineComponent, createVNode, mergeProps } from 'vue';
|
|
2
|
+
import { _VkfFormItemCtx, VkfFormItem } from '@vunk/form/components/form-item';
|
|
3
|
+
import { VkfInformationTag } from '@vunk/form/components/information-tag';
|
|
4
|
+
import { VkfTemplateInstancesProvider } from '@vunk/form/components/template-instances-provider';
|
|
5
|
+
import { VkfInformationTemplatesDefault } from '@vunk/form/components/information-templates-default';
|
|
6
|
+
import { _ as _export_sfc } from '../_plugin-vue_export-helper.mjs';
|
|
7
|
+
|
|
8
|
+
const props = {
|
|
9
|
+
..._VkfFormItemCtx.props,
|
|
10
|
+
modelValue: {
|
|
11
|
+
type: Array,
|
|
12
|
+
default: () => []
|
|
13
|
+
},
|
|
14
|
+
columns: {
|
|
15
|
+
type: Array,
|
|
16
|
+
default: () => []
|
|
17
|
+
},
|
|
18
|
+
labelRender: {
|
|
19
|
+
type: Function,
|
|
20
|
+
default: void 0
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
const emits = {};
|
|
24
|
+
|
|
25
|
+
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
26
|
+
name: "VkfInformationCollection",
|
|
27
|
+
props,
|
|
28
|
+
emits,
|
|
29
|
+
setup(props2, {
|
|
30
|
+
emit
|
|
31
|
+
}) {
|
|
32
|
+
const formItemProps = _VkfFormItemCtx.createBindProps(props2);
|
|
33
|
+
return () => createVNode(VkfFormItem, mergeProps({
|
|
34
|
+
"class": "vk-information-collection",
|
|
35
|
+
"information": true
|
|
36
|
+
}, formItemProps.value), {
|
|
37
|
+
default: () => [createVNode("div", {
|
|
38
|
+
"class": "vk-information-collection-value"
|
|
39
|
+
}, [createVNode(VkfTemplateInstancesProvider, null, {
|
|
40
|
+
placeholder: () => createVNode(VkfInformationTemplatesDefault, null, null),
|
|
41
|
+
default: () => props2.modelValue.map((item, index) => createVNode(VkfInformationTag, {
|
|
42
|
+
"key": index,
|
|
43
|
+
"data": item,
|
|
44
|
+
"labelRender": props2.labelRender,
|
|
45
|
+
"formItems": props2.columns.map(v => ({
|
|
46
|
+
...v,
|
|
47
|
+
...v.templateProps?.createTemplateProps?.({
|
|
48
|
+
row: item
|
|
49
|
+
})
|
|
50
|
+
}))
|
|
51
|
+
}, null))
|
|
52
|
+
})])]
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
var VkfInformationCollection = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/home/runner/work/private-vunk-form/private-vunk-form/packages/components/information-collection/src/index.vue"]]);
|
|
58
|
+
|
|
59
|
+
var types = /*#__PURE__*/Object.freeze({
|
|
60
|
+
__proto__: null
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
VkfInformationCollection.install = (app) => {
|
|
64
|
+
app.component(VkfInformationCollection.name || "VkfInformationCollection", VkfInformationCollection);
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
export { VkfInformationCollection, types as __VkfInformationCollection, VkfInformationCollection as default };
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { Func } from '@vunk/core';
|
|
2
|
+
import { NormalObject } from '@vunk/shared';
|
|
3
|
+
import { PropType } from 'vue';
|
|
4
|
+
export declare const props: {
|
|
5
|
+
modelValue: {
|
|
6
|
+
type: {
|
|
7
|
+
(arrayLength: number): NormalObject[];
|
|
8
|
+
(...items: NormalObject[]): NormalObject[];
|
|
9
|
+
new (arrayLength: number): NormalObject[];
|
|
10
|
+
new (...items: NormalObject[]): NormalObject[];
|
|
11
|
+
isArray(arg: any): arg is any[];
|
|
12
|
+
readonly prototype: any[];
|
|
13
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
14
|
+
from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
15
|
+
from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
|
|
16
|
+
from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
17
|
+
of<T>(...items: T[]): T[];
|
|
18
|
+
fromAsync<T>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T | PromiseLike<T>> | ArrayLike<T | PromiseLike<T>>): Promise<T[]>;
|
|
19
|
+
fromAsync<T, U>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>, mapFn: (value: Awaited<T>) => U, thisArg?: any): Promise<Awaited<U>[]>;
|
|
20
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
21
|
+
};
|
|
22
|
+
default: () => any[];
|
|
23
|
+
};
|
|
24
|
+
columns: {
|
|
25
|
+
type: {
|
|
26
|
+
(arrayLength: number): any[];
|
|
27
|
+
(...items: any[]): any[];
|
|
28
|
+
new (arrayLength: number): any[];
|
|
29
|
+
new (...items: any[]): any[];
|
|
30
|
+
isArray(arg: any): arg is any[];
|
|
31
|
+
readonly prototype: any[];
|
|
32
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
33
|
+
from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
34
|
+
from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
|
|
35
|
+
from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
36
|
+
of<T>(...items: T[]): T[];
|
|
37
|
+
fromAsync<T>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T | PromiseLike<T>> | ArrayLike<T | PromiseLike<T>>): Promise<T[]>;
|
|
38
|
+
fromAsync<T, U>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>, mapFn: (value: Awaited<T>) => U, thisArg?: any): Promise<Awaited<U>[]>;
|
|
39
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
40
|
+
};
|
|
41
|
+
default: () => any[];
|
|
42
|
+
};
|
|
43
|
+
labelRender: {
|
|
44
|
+
type: PropType<Func<any, string>>;
|
|
45
|
+
default: any;
|
|
46
|
+
};
|
|
47
|
+
required: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
48
|
+
formItemSize: {
|
|
49
|
+
type: PropType<"default" | "small" | "large">;
|
|
50
|
+
default: "default" | "small" | "large";
|
|
51
|
+
};
|
|
52
|
+
formItemSlots: {
|
|
53
|
+
type: PropType<import("@vunk/form/components/form-item/src/types").FormItemSlots>;
|
|
54
|
+
default: any;
|
|
55
|
+
};
|
|
56
|
+
elRef: {
|
|
57
|
+
type: PropType<any>;
|
|
58
|
+
required: boolean;
|
|
59
|
+
};
|
|
60
|
+
inline: {
|
|
61
|
+
type: BooleanConstructor;
|
|
62
|
+
default: boolean;
|
|
63
|
+
};
|
|
64
|
+
readonly: {
|
|
65
|
+
type: BooleanConstructor;
|
|
66
|
+
default: any;
|
|
67
|
+
};
|
|
68
|
+
formItemTip: {
|
|
69
|
+
type: StringConstructor;
|
|
70
|
+
default: any;
|
|
71
|
+
};
|
|
72
|
+
formItemTipClass: any;
|
|
73
|
+
labelTip: {
|
|
74
|
+
type: StringConstructor;
|
|
75
|
+
default: any;
|
|
76
|
+
};
|
|
77
|
+
information: {
|
|
78
|
+
type: BooleanConstructor;
|
|
79
|
+
default: boolean;
|
|
80
|
+
};
|
|
81
|
+
label: StringConstructor;
|
|
82
|
+
labelWidth: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
83
|
+
labelPosition: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "top" | "left" | "right", unknown, "", boolean>;
|
|
84
|
+
prop: {
|
|
85
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string | string[]) | (() => import("element-plus").FormItemProp) | ((new (...args: any[]) => string | string[]) | (() => import("element-plus").FormItemProp))[], unknown, unknown>>;
|
|
86
|
+
readonly required: false;
|
|
87
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
88
|
+
__epPropKey: true;
|
|
89
|
+
};
|
|
90
|
+
rules: {
|
|
91
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => import("element-plus").FormItemRule | import("element-plus").FormItemRule[]) | (() => import("element-plus/es/utils").Arrayable<import("element-plus").FormItemRule>) | ((new (...args: any[]) => import("element-plus").FormItemRule | import("element-plus").FormItemRule[]) | (() => import("element-plus/es/utils").Arrayable<import("element-plus").FormItemRule>))[], unknown, unknown>>;
|
|
92
|
+
readonly required: false;
|
|
93
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
94
|
+
__epPropKey: true;
|
|
95
|
+
};
|
|
96
|
+
error: StringConstructor;
|
|
97
|
+
validateStatus: {
|
|
98
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "error" | "success" | "validating", unknown>>;
|
|
99
|
+
readonly required: false;
|
|
100
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
101
|
+
__epPropKey: true;
|
|
102
|
+
};
|
|
103
|
+
for: StringConstructor;
|
|
104
|
+
inlineMessage: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, BooleanConstructor], unknown, unknown, "", boolean>;
|
|
105
|
+
showMessage: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
106
|
+
};
|
|
107
|
+
export declare const emits: {};
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
modelValue: {
|
|
3
|
+
type: {
|
|
4
|
+
(arrayLength: number): import("@vunk/shared").NormalObject[];
|
|
5
|
+
(...items: import("@vunk/shared").NormalObject[]): import("@vunk/shared").NormalObject[];
|
|
6
|
+
new (arrayLength: number): import("@vunk/shared").NormalObject[];
|
|
7
|
+
new (...items: import("@vunk/shared").NormalObject[]): import("@vunk/shared").NormalObject[];
|
|
8
|
+
isArray(arg: any): arg is any[];
|
|
9
|
+
readonly prototype: any[];
|
|
10
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
11
|
+
from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
12
|
+
from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
|
|
13
|
+
from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
14
|
+
of<T>(...items: T[]): T[];
|
|
15
|
+
fromAsync<T>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T | PromiseLike<T>> | ArrayLike<T | PromiseLike<T>>): Promise<T[]>;
|
|
16
|
+
fromAsync<T, U>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>, mapFn: (value: Awaited<T>) => U, thisArg?: any): Promise<Awaited<U>[]>;
|
|
17
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
18
|
+
};
|
|
19
|
+
default: () => any[];
|
|
20
|
+
};
|
|
21
|
+
columns: {
|
|
22
|
+
type: {
|
|
23
|
+
(arrayLength: number): any[];
|
|
24
|
+
(...items: any[]): any[];
|
|
25
|
+
new (arrayLength: number): any[];
|
|
26
|
+
new (...items: any[]): any[];
|
|
27
|
+
isArray(arg: any): arg is any[];
|
|
28
|
+
readonly prototype: any[];
|
|
29
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
30
|
+
from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
31
|
+
from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
|
|
32
|
+
from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
33
|
+
of<T>(...items: T[]): T[];
|
|
34
|
+
fromAsync<T>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T | PromiseLike<T>> | ArrayLike<T | PromiseLike<T>>): Promise<T[]>;
|
|
35
|
+
fromAsync<T, U>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>, mapFn: (value: Awaited<T>) => U, thisArg?: any): Promise<Awaited<U>[]>;
|
|
36
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
37
|
+
};
|
|
38
|
+
default: () => any[];
|
|
39
|
+
};
|
|
40
|
+
labelRender: {
|
|
41
|
+
type: import("vue").PropType<import("@vunk/core").Func<any, string>>;
|
|
42
|
+
default: any;
|
|
43
|
+
};
|
|
44
|
+
required: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
45
|
+
formItemSize: {
|
|
46
|
+
type: import("vue").PropType<"default" | "small" | "large">;
|
|
47
|
+
default: "default" | "small" | "large";
|
|
48
|
+
};
|
|
49
|
+
formItemSlots: {
|
|
50
|
+
type: import("vue").PropType<import("@vunk/form/components/form-item/src/types").FormItemSlots>;
|
|
51
|
+
default: any;
|
|
52
|
+
};
|
|
53
|
+
elRef: {
|
|
54
|
+
type: import("vue").PropType<any>;
|
|
55
|
+
required: boolean;
|
|
56
|
+
};
|
|
57
|
+
inline: {
|
|
58
|
+
type: BooleanConstructor;
|
|
59
|
+
default: boolean;
|
|
60
|
+
};
|
|
61
|
+
readonly: {
|
|
62
|
+
type: BooleanConstructor;
|
|
63
|
+
default: any;
|
|
64
|
+
};
|
|
65
|
+
formItemTip: {
|
|
66
|
+
type: StringConstructor;
|
|
67
|
+
default: any;
|
|
68
|
+
};
|
|
69
|
+
formItemTipClass: any;
|
|
70
|
+
labelTip: {
|
|
71
|
+
type: StringConstructor;
|
|
72
|
+
default: any;
|
|
73
|
+
};
|
|
74
|
+
information: {
|
|
75
|
+
type: BooleanConstructor;
|
|
76
|
+
default: boolean;
|
|
77
|
+
};
|
|
78
|
+
label: StringConstructor;
|
|
79
|
+
labelWidth: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
80
|
+
labelPosition: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "top" | "left" | "right", unknown, "", boolean>;
|
|
81
|
+
prop: {
|
|
82
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string | string[]) | (() => import("element-plus").FormItemProp) | ((new (...args: any[]) => string | string[]) | (() => import("element-plus").FormItemProp))[], unknown, unknown>>;
|
|
83
|
+
readonly required: false;
|
|
84
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
85
|
+
__epPropKey: true;
|
|
86
|
+
};
|
|
87
|
+
rules: {
|
|
88
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => import("element-plus").FormItemRule | import("element-plus").FormItemRule[]) | (() => import("element-plus/es/utils").Arrayable<import("element-plus").FormItemRule>) | ((new (...args: any[]) => import("element-plus").FormItemRule | import("element-plus").FormItemRule[]) | (() => import("element-plus/es/utils").Arrayable<import("element-plus").FormItemRule>))[], unknown, unknown>>;
|
|
89
|
+
readonly required: false;
|
|
90
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
91
|
+
__epPropKey: true;
|
|
92
|
+
};
|
|
93
|
+
error: StringConstructor;
|
|
94
|
+
validateStatus: {
|
|
95
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "error" | "success" | "validating", unknown>>;
|
|
96
|
+
readonly required: false;
|
|
97
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
98
|
+
__epPropKey: true;
|
|
99
|
+
};
|
|
100
|
+
for: StringConstructor;
|
|
101
|
+
inlineMessage: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, BooleanConstructor], unknown, unknown, "", boolean>;
|
|
102
|
+
showMessage: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
103
|
+
}>, () => JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
104
|
+
modelValue: {
|
|
105
|
+
type: {
|
|
106
|
+
(arrayLength: number): import("@vunk/shared").NormalObject[];
|
|
107
|
+
(...items: import("@vunk/shared").NormalObject[]): import("@vunk/shared").NormalObject[];
|
|
108
|
+
new (arrayLength: number): import("@vunk/shared").NormalObject[];
|
|
109
|
+
new (...items: import("@vunk/shared").NormalObject[]): import("@vunk/shared").NormalObject[];
|
|
110
|
+
isArray(arg: any): arg is any[];
|
|
111
|
+
readonly prototype: any[];
|
|
112
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
113
|
+
from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
114
|
+
from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
|
|
115
|
+
from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
116
|
+
of<T>(...items: T[]): T[];
|
|
117
|
+
fromAsync<T>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T | PromiseLike<T>> | ArrayLike<T | PromiseLike<T>>): Promise<T[]>;
|
|
118
|
+
fromAsync<T, U>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>, mapFn: (value: Awaited<T>) => U, thisArg?: any): Promise<Awaited<U>[]>;
|
|
119
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
120
|
+
};
|
|
121
|
+
default: () => any[];
|
|
122
|
+
};
|
|
123
|
+
columns: {
|
|
124
|
+
type: {
|
|
125
|
+
(arrayLength: number): any[];
|
|
126
|
+
(...items: any[]): any[];
|
|
127
|
+
new (arrayLength: number): any[];
|
|
128
|
+
new (...items: any[]): any[];
|
|
129
|
+
isArray(arg: any): arg is any[];
|
|
130
|
+
readonly prototype: any[];
|
|
131
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
132
|
+
from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
133
|
+
from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
|
|
134
|
+
from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
135
|
+
of<T>(...items: T[]): T[];
|
|
136
|
+
fromAsync<T>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T | PromiseLike<T>> | ArrayLike<T | PromiseLike<T>>): Promise<T[]>;
|
|
137
|
+
fromAsync<T, U>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>, mapFn: (value: Awaited<T>) => U, thisArg?: any): Promise<Awaited<U>[]>;
|
|
138
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
139
|
+
};
|
|
140
|
+
default: () => any[];
|
|
141
|
+
};
|
|
142
|
+
labelRender: {
|
|
143
|
+
type: import("vue").PropType<import("@vunk/core").Func<any, string>>;
|
|
144
|
+
default: any;
|
|
145
|
+
};
|
|
146
|
+
required: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
147
|
+
formItemSize: {
|
|
148
|
+
type: import("vue").PropType<"default" | "small" | "large">;
|
|
149
|
+
default: "default" | "small" | "large";
|
|
150
|
+
};
|
|
151
|
+
formItemSlots: {
|
|
152
|
+
type: import("vue").PropType<import("@vunk/form/components/form-item/src/types").FormItemSlots>;
|
|
153
|
+
default: any;
|
|
154
|
+
};
|
|
155
|
+
elRef: {
|
|
156
|
+
type: import("vue").PropType<any>;
|
|
157
|
+
required: boolean;
|
|
158
|
+
};
|
|
159
|
+
inline: {
|
|
160
|
+
type: BooleanConstructor;
|
|
161
|
+
default: boolean;
|
|
162
|
+
};
|
|
163
|
+
readonly: {
|
|
164
|
+
type: BooleanConstructor;
|
|
165
|
+
default: any;
|
|
166
|
+
};
|
|
167
|
+
formItemTip: {
|
|
168
|
+
type: StringConstructor;
|
|
169
|
+
default: any;
|
|
170
|
+
};
|
|
171
|
+
formItemTipClass: any;
|
|
172
|
+
labelTip: {
|
|
173
|
+
type: StringConstructor;
|
|
174
|
+
default: any;
|
|
175
|
+
};
|
|
176
|
+
information: {
|
|
177
|
+
type: BooleanConstructor;
|
|
178
|
+
default: boolean;
|
|
179
|
+
};
|
|
180
|
+
label: StringConstructor;
|
|
181
|
+
labelWidth: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
182
|
+
labelPosition: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "top" | "left" | "right", unknown, "", boolean>;
|
|
183
|
+
prop: {
|
|
184
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string | string[]) | (() => import("element-plus").FormItemProp) | ((new (...args: any[]) => string | string[]) | (() => import("element-plus").FormItemProp))[], unknown, unknown>>;
|
|
185
|
+
readonly required: false;
|
|
186
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
187
|
+
__epPropKey: true;
|
|
188
|
+
};
|
|
189
|
+
rules: {
|
|
190
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => import("element-plus").FormItemRule | import("element-plus").FormItemRule[]) | (() => import("element-plus/es/utils").Arrayable<import("element-plus").FormItemRule>) | ((new (...args: any[]) => import("element-plus").FormItemRule | import("element-plus").FormItemRule[]) | (() => import("element-plus/es/utils").Arrayable<import("element-plus").FormItemRule>))[], unknown, unknown>>;
|
|
191
|
+
readonly required: false;
|
|
192
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
193
|
+
__epPropKey: true;
|
|
194
|
+
};
|
|
195
|
+
error: StringConstructor;
|
|
196
|
+
validateStatus: {
|
|
197
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "error" | "success" | "validating", unknown>>;
|
|
198
|
+
readonly required: false;
|
|
199
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
200
|
+
__epPropKey: true;
|
|
201
|
+
};
|
|
202
|
+
for: StringConstructor;
|
|
203
|
+
inlineMessage: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, BooleanConstructor], unknown, unknown, "", boolean>;
|
|
204
|
+
showMessage: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
205
|
+
}>> & Readonly<{}>, {
|
|
206
|
+
required: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
207
|
+
formItemSize: "default" | "small" | "large";
|
|
208
|
+
formItemSlots: import("@vunk/form/components/form-item/src/types").FormItemSlots;
|
|
209
|
+
inline: boolean;
|
|
210
|
+
readonly: boolean;
|
|
211
|
+
formItemTip: string;
|
|
212
|
+
formItemTipClass: any;
|
|
213
|
+
labelTip: string;
|
|
214
|
+
information: boolean;
|
|
215
|
+
labelWidth: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
216
|
+
labelPosition: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "top" | "left" | "right", unknown>;
|
|
217
|
+
inlineMessage: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, BooleanConstructor], unknown, unknown>;
|
|
218
|
+
showMessage: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
219
|
+
modelValue: import("@vunk/shared").NormalObject[];
|
|
220
|
+
columns: any[];
|
|
221
|
+
labelRender: ((...args: any) => string) | ((arg: any) => string);
|
|
222
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
223
|
+
export default _default;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { __VkfInputCollection } from '@vunk/form/components/input-collection';
|
|
2
|
+
import { __VkfTemplatesDefault } from '@vunk/form';
|
|
3
|
+
import { Keyof, NormalObject } from '@vunk/shared';
|
|
4
|
+
export type Column<R extends NormalObject = NormalObject, SourceType extends NormalObject = __VkfTemplatesDefault.CoreSource<Keyof<R>>> = __VkfInputCollection.Column<R, SourceType>;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
var elementPlus = require('element-plus');
|
|
7
|
+
var form = require('@vunk/form');
|
|
8
|
+
var _function = require('@vunk/shared/function');
|
|
9
|
+
var elementPlus$1 = require('@vunk/form/shared/element-plus');
|
|
10
|
+
var utilsVue = require('@vunk/core/shared/utils-vue');
|
|
11
|
+
var _pluginVue_exportHelper = require('../_plugin-vue_export-helper.cjs');
|
|
12
|
+
|
|
13
|
+
const props = {
|
|
14
|
+
...elementPlus.tagProps,
|
|
15
|
+
data: {
|
|
16
|
+
type: Object,
|
|
17
|
+
default: () => ({})
|
|
18
|
+
},
|
|
19
|
+
labelRender: {
|
|
20
|
+
type: Function,
|
|
21
|
+
default: (data) => data.label
|
|
22
|
+
},
|
|
23
|
+
title: {
|
|
24
|
+
type: [String, Function],
|
|
25
|
+
default: ""
|
|
26
|
+
},
|
|
27
|
+
placement: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: "top"
|
|
30
|
+
},
|
|
31
|
+
formItems: {
|
|
32
|
+
type: Array,
|
|
33
|
+
default: () => []
|
|
34
|
+
},
|
|
35
|
+
trigger: {
|
|
36
|
+
type: String,
|
|
37
|
+
default: "hover"
|
|
38
|
+
},
|
|
39
|
+
showAfter: {
|
|
40
|
+
type: Number,
|
|
41
|
+
default: 500
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
const emits = {
|
|
45
|
+
...elementPlus.tagEmits
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
function _isSlot(s) {
|
|
49
|
+
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
50
|
+
}
|
|
51
|
+
var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
52
|
+
name: "VkfInformationTag",
|
|
53
|
+
props,
|
|
54
|
+
emits,
|
|
55
|
+
setup(props2, {
|
|
56
|
+
emit,
|
|
57
|
+
slots
|
|
58
|
+
}) {
|
|
59
|
+
const theTitle = vue.computed(() => {
|
|
60
|
+
return _function.isCallable(props2.title) ? props2.title(props2.data) : props2.title;
|
|
61
|
+
});
|
|
62
|
+
const tagProps = elementPlus$1.createTagBindProps(props2);
|
|
63
|
+
const tagEmits = elementPlus$1.createTagOnEmits(emit);
|
|
64
|
+
return () => vue.createVNode(elementPlus.ElPopover, {
|
|
65
|
+
"placement": props2.placement,
|
|
66
|
+
"title": theTitle.value,
|
|
67
|
+
"width": 250,
|
|
68
|
+
"trigger": props2.trigger,
|
|
69
|
+
"show-after": props2.showAfter
|
|
70
|
+
}, {
|
|
71
|
+
reference: () => {
|
|
72
|
+
let _slot;
|
|
73
|
+
return vue.createVNode(elementPlus.ElTag, vue.mergeProps({
|
|
74
|
+
"class": "vkf-information-tag__tag"
|
|
75
|
+
}, tagProps.value, utilsVue.vOn(tagEmits)), _isSlot(_slot = props2.labelRender(props2.data)) ? _slot : {
|
|
76
|
+
default: () => [_slot]
|
|
77
|
+
});
|
|
78
|
+
},
|
|
79
|
+
default: () => vue.createVNode(form.VkfInformation, {
|
|
80
|
+
"data": props2.data,
|
|
81
|
+
"form-items": props2.formItems
|
|
82
|
+
}, {
|
|
83
|
+
default: () => [slots.default?.()]
|
|
84
|
+
})
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
var VkfInformationTag = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__file", "/home/runner/work/private-vunk-form/private-vunk-form/packages/components/information-tag/src/index.vue"]]);
|
|
90
|
+
|
|
91
|
+
var types = /*#__PURE__*/Object.freeze({
|
|
92
|
+
__proto__: null
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
VkfInformationTag.install = (app) => {
|
|
96
|
+
app.component(VkfInformationTag.name || "VkfInformationTag", VkfInformationTag);
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
exports.VkfInformationTag = VkfInformationTag;
|
|
100
|
+
exports.__VkfInformationTag = types;
|
|
101
|
+
exports.default = VkfInformationTag;
|