@vunk/form 2.3.3 → 2.4.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/api-tables-select/index.cjs +1 -9
- package/components/api-tables-select/index.mjs +1 -9
- package/components/api-tables-select/src/ctx.d.ts +4 -7
- package/components/api-tables-select/src/index.vue.d.ts +10 -9
- package/components/button/src/ctx.d.ts +4 -0
- package/components/button/src/index.vue.d.ts +9 -0
- package/components/card-input-collection/index.cjs +5 -10
- package/components/card-input-collection/index.mjs +6 -11
- package/components/card-input-collection/src/ctx.d.ts +4 -7
- package/components/card-input-collection/src/index.vue.d.ts +9 -9
- package/components/cascader/src/ctx.d.ts +5 -1
- package/components/cascader/src/index.vue.d.ts +9 -0
- package/components/checkbox/src/ctx.d.ts +5 -1
- package/components/checkbox/src/index.vue.d.ts +9 -0
- package/components/color-picker/src/ctx.d.ts +4 -0
- package/components/color-picker/src/index.vue.d.ts +9 -0
- package/components/date-picker/src/ctx.d.ts +5 -1
- package/components/date-picker/src/index.vue.d.ts +9 -0
- package/components/date-picker-range/src/ctx.d.ts +4 -0
- package/components/date-picker-range/src/index.vue.d.ts +9 -0
- package/components/download-plus/src/ctx.d.ts +4 -0
- package/components/download-plus/src/index.vue.d.ts +9 -0
- package/components/esri-input-geojson/src/ctx.d.ts +5 -1
- package/components/esri-input-geojson/src/index.vue.d.ts +10 -0
- package/components/form/index.cjs +12 -29
- package/components/form/index.mjs +13 -30
- package/components/form/src/ctx.d.ts +1 -8
- package/components/form/src/index.vue.d.ts +0 -20
- package/components/form-item/index.cjs +6 -1
- package/components/form-item/index.css +3 -0
- package/components/form-item/index.mjs +6 -1
- package/components/form-item/src/ctx.d.ts +5 -1
- package/components/form-item/src/index.vue.d.ts +9 -0
- package/components/form-item-renderer/index.cjs +49 -7
- package/components/form-item-renderer/index.mjs +51 -9
- package/components/form-item-renderer/src/core.vue.d.ts +38 -0
- package/components/form-item-renderer/src/index.vue.d.ts +67 -12
- package/components/information/index.cjs +76 -0
- package/components/information/index.d.ts +4 -0
- package/components/information/index.mjs +70 -0
- package/components/information/src/ctx.d.ts +13 -0
- package/components/information/src/index.vue.d.ts +391 -0
- package/components/information/src/types.d.ts +2 -0
- package/components/information-templates-default/index.cjs +187 -0
- package/components/information-templates-default/index.css +12 -0
- package/components/information-templates-default/index.d.ts +4 -0
- package/components/information-templates-default/index.mjs +181 -0
- package/components/information-templates-default/src/ctx.d.ts +2 -0
- package/components/information-templates-default/src/index.vue.d.ts +52 -0
- package/components/information-templates-default/src/types.d.ts +1 -0
- package/components/input/src/ctx.d.ts +5 -1
- package/components/input/src/index.vue.d.ts +9 -0
- package/components/input-collection/index.cjs +11 -7
- package/components/input-collection/index.mjs +12 -8
- package/components/input-collection/src/ctx.d.ts +8 -4
- package/components/input-collection/src/index.vue.d.ts +16 -7
- package/components/input-link/src/ctx.d.ts +4 -0
- package/components/input-link/src/index.vue.d.ts +9 -0
- package/components/input-number/src/ctx.d.ts +5 -1
- package/components/input-number/src/index.vue.d.ts +9 -0
- package/components/monaco-editor/src/ctx.d.ts +4 -0
- package/components/monaco-editor/src/index.vue.d.ts +9 -0
- package/components/radio/src/ctx.d.ts +4 -0
- package/components/radio/src/index.vue.d.ts +9 -0
- package/components/select/src/ctx.d.ts +5 -1
- package/components/select/src/index.vue.d.ts +9 -0
- package/components/slider/src/ctx.d.ts +4 -0
- package/components/slider/src/index.vue.d.ts +9 -0
- package/components/switch/src/ctx.d.ts +4 -0
- package/components/switch/src/index.vue.d.ts +9 -0
- package/components/tables-select/src/ctx.d.ts +5 -1
- package/components/tables-select/src/index.vue.d.ts +9 -0
- package/components/tag-information/index.cjs +105 -0
- package/components/tag-information/index.css +6 -0
- package/components/tag-information/index.d.ts +4 -0
- package/components/tag-information/index.mjs +99 -0
- package/components/tag-information/src/ctx.d.ts +26 -0
- package/components/tag-information/src/index.vue.d.ts +894 -0
- package/components/tag-information/src/types.d.ts +1 -0
- package/components/template-instances-provider/index.cjs +8 -13
- package/components/template-instances-provider/index.mjs +8 -13
- package/components/template-instances-provider/src/index.vue.d.ts +4 -14
- package/components/upload/src/ctx.d.ts +5 -1
- package/components/upload/src/index.vue.d.ts +9 -0
- package/components/upload-plus/src/ctx.d.ts +4 -0
- package/components/upload-plus/src/index.vue.d.ts +9 -0
- package/components/van-cascader/src/ctx.d.ts +4 -0
- package/components/van-cascader/src/index.vue.d.ts +9 -0
- package/components/var-datetime-picker/src/ctx.d.ts +4 -0
- package/components/var-datetime-picker/src/index.vue.d.ts +9 -0
- package/components/vditor/src/ctx.d.ts +4 -0
- package/components/vditor/src/index.vue.d.ts +9 -0
- package/composables/index.cjs +31 -5
- package/composables/index.mjs +31 -6
- package/composables/useTemplateInstances.d.ts +6 -1
- package/index.css +23 -0
- package/index.d.ts +1 -0
- package/index.esm.js +1 -0
- package/package.json +22 -1
- package/shared/types/index.d.ts +4 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { defineComponent,
|
|
1
|
+
import { defineComponent, computed, h, nextTick, openBlock, createBlock, withCtx, renderSlot, createVNode, normalizeProps, guardReactiveProps } from 'vue';
|
|
2
|
+
import { VkfTemplateInstancesProvider } from '@vunk/form/components/template-instances-provider';
|
|
2
3
|
import { genTemplateIfFunc } from '@vunk/form/shared/form';
|
|
3
|
-
import {
|
|
4
|
+
import { useTemplateInstancesContext, useRendererData } from '@vunk/form/composables';
|
|
4
5
|
import { _ as _export_sfc } from '../_plugin-vue_export-helper.mjs';
|
|
5
6
|
|
|
6
7
|
const props = {
|
|
@@ -23,14 +24,12 @@ const VkfFormItemRenderer$1 = defineComponent({
|
|
|
23
24
|
name: "VkfFormItemRenderer",
|
|
24
25
|
props: props,
|
|
25
26
|
setup(props, ctx) {
|
|
26
|
-
const
|
|
27
|
+
const { templateInstances, getTemplateInstance } = useTemplateInstancesContext();
|
|
27
28
|
const {
|
|
28
29
|
emitSetData,
|
|
29
30
|
data: rendererData,
|
|
30
31
|
getDataValue
|
|
31
32
|
} = useRendererData();
|
|
32
|
-
const templateInstances = props.templateInstances ?? parentTemplateInstance ?? shallowReactive({});
|
|
33
|
-
provide("vkTemplateInstances", templateInstances);
|
|
34
33
|
const Renderer = (props2) => {
|
|
35
34
|
return h(VkfFormItemRenderer$1, {
|
|
36
35
|
templateInstances,
|
|
@@ -43,7 +42,7 @@ const VkfFormItemRenderer$1 = defineComponent({
|
|
|
43
42
|
const currentK = [...props.k, ...pK, index];
|
|
44
43
|
const validateTemplateType = () => {
|
|
45
44
|
nextTick(() => {
|
|
46
|
-
if (c.templateType && !
|
|
45
|
+
if (c.templateType && !getTemplateInstance(c.templateType)) {
|
|
47
46
|
console.warn(
|
|
48
47
|
c.templateType,
|
|
49
48
|
"templateType\u4E0D\u5B58\u5728\u5C06\u8DF3\u8FC7"
|
|
@@ -51,7 +50,7 @@ const VkfFormItemRenderer$1 = defineComponent({
|
|
|
51
50
|
}
|
|
52
51
|
});
|
|
53
52
|
};
|
|
54
|
-
if (c.templateType &&
|
|
53
|
+
if (c.templateType && getTemplateInstance(c.templateType)) {
|
|
55
54
|
const templateIf = genTemplateIfFunc(c.templateIf);
|
|
56
55
|
const preTemplateVisible = rendererData ? templateIf(rendererData.value) : true;
|
|
57
56
|
if (!preTemplateVisible) return a;
|
|
@@ -66,7 +65,7 @@ const VkfFormItemRenderer$1 = defineComponent({
|
|
|
66
65
|
v
|
|
67
66
|
})
|
|
68
67
|
});
|
|
69
|
-
const nodes =
|
|
68
|
+
const nodes = getTemplateInstance(c.templateType)?.slots.default?.({
|
|
70
69
|
// for legacy
|
|
71
70
|
data: slotData,
|
|
72
71
|
raw: c,
|
|
@@ -97,7 +96,50 @@ const VkfFormItemRenderer$1 = defineComponent({
|
|
|
97
96
|
}
|
|
98
97
|
});
|
|
99
98
|
|
|
100
|
-
var
|
|
99
|
+
var Core = /* @__PURE__ */ _export_sfc(VkfFormItemRenderer$1, [["__file", "/home/runner/work/private-vunk-form/private-vunk-form/packages/components/form-item-renderer/src/core.vue"]]);
|
|
100
|
+
|
|
101
|
+
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
102
|
+
__name: "index",
|
|
103
|
+
props: props,
|
|
104
|
+
setup(__props, { expose: __expose }) {
|
|
105
|
+
__expose();
|
|
106
|
+
const props = __props;
|
|
107
|
+
const __returned__ = { props, get VkfTemplateInstancesProvider() {
|
|
108
|
+
return VkfTemplateInstancesProvider;
|
|
109
|
+
}, Core };
|
|
110
|
+
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
111
|
+
return __returned__;
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
116
|
+
return openBlock(), createBlock($setup["VkfTemplateInstancesProvider"], null, {
|
|
117
|
+
placeholder: withCtx(() => [
|
|
118
|
+
renderSlot(_ctx.$slots, "placeholder")
|
|
119
|
+
]),
|
|
120
|
+
default: withCtx(() => [
|
|
121
|
+
createVNode(
|
|
122
|
+
$setup["Core"],
|
|
123
|
+
normalizeProps(guardReactiveProps({
|
|
124
|
+
...$setup.props,
|
|
125
|
+
..._ctx.$attrs
|
|
126
|
+
})),
|
|
127
|
+
{
|
|
128
|
+
default: withCtx(() => [
|
|
129
|
+
renderSlot(_ctx.$slots, "default")
|
|
130
|
+
]),
|
|
131
|
+
_: 3
|
|
132
|
+
/* FORWARDED */
|
|
133
|
+
},
|
|
134
|
+
16
|
|
135
|
+
/* FULL_PROPS */
|
|
136
|
+
)
|
|
137
|
+
]),
|
|
138
|
+
_: 3
|
|
139
|
+
/* FORWARDED */
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
var VkfFormItemRenderer = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/private-vunk-form/private-vunk-form/packages/components/form-item-renderer/src/index.vue"]]);
|
|
101
143
|
|
|
102
144
|
var types = /*#__PURE__*/Object.freeze({
|
|
103
145
|
__proto__: null
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { VNode } from 'vue';
|
|
2
|
+
import { RendererTreeData } from './types';
|
|
3
|
+
declare const VkfFormItemRenderer: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
+
source: {
|
|
5
|
+
type: import("vue").PropType<RendererTreeData[]>;
|
|
6
|
+
default: () => any[];
|
|
7
|
+
};
|
|
8
|
+
templateInstances: {
|
|
9
|
+
type: import("vue").PropType<Record<string, import("vue").ComponentInternalInstance>>;
|
|
10
|
+
default: any;
|
|
11
|
+
};
|
|
12
|
+
k: {
|
|
13
|
+
type: import("vue").PropType<(string | number)[]>;
|
|
14
|
+
default: () => any[];
|
|
15
|
+
};
|
|
16
|
+
}>, () => (VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
17
|
+
[key: string]: any;
|
|
18
|
+
}>[] | VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
19
|
+
[key: string]: any;
|
|
20
|
+
}>[][])[], {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
21
|
+
source: {
|
|
22
|
+
type: import("vue").PropType<RendererTreeData[]>;
|
|
23
|
+
default: () => any[];
|
|
24
|
+
};
|
|
25
|
+
templateInstances: {
|
|
26
|
+
type: import("vue").PropType<Record<string, import("vue").ComponentInternalInstance>>;
|
|
27
|
+
default: any;
|
|
28
|
+
};
|
|
29
|
+
k: {
|
|
30
|
+
type: import("vue").PropType<(string | number)[]>;
|
|
31
|
+
default: () => any[];
|
|
32
|
+
};
|
|
33
|
+
}>> & Readonly<{}>, {
|
|
34
|
+
source: RendererTreeData[];
|
|
35
|
+
templateInstances: Record<string, import("vue").ComponentInternalInstance>;
|
|
36
|
+
k: (string | number)[];
|
|
37
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
38
|
+
export default VkfFormItemRenderer;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import { RendererTreeData } from './types';
|
|
3
|
-
declare const VkfFormItemRenderer: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
1
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
2
|
source: {
|
|
5
|
-
type: import("vue").PropType<RendererTreeData[]>;
|
|
3
|
+
type: import("vue").PropType<import("./types").RendererTreeData[]>;
|
|
6
4
|
default: () => any[];
|
|
7
5
|
};
|
|
8
6
|
templateInstances: {
|
|
@@ -13,13 +11,70 @@ declare const VkfFormItemRenderer: import("vue").DefineComponent<import("vue").E
|
|
|
13
11
|
type: import("vue").PropType<(string | number)[]>;
|
|
14
12
|
default: () => any[];
|
|
15
13
|
};
|
|
16
|
-
}>,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
}>, {
|
|
15
|
+
props: import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
16
|
+
source: {
|
|
17
|
+
type: import("vue").PropType<import("./types").RendererTreeData[]>;
|
|
18
|
+
default: () => any[];
|
|
19
|
+
};
|
|
20
|
+
templateInstances: {
|
|
21
|
+
type: import("vue").PropType<Record<string, import("vue").ComponentInternalInstance>>;
|
|
22
|
+
default: any;
|
|
23
|
+
};
|
|
24
|
+
k: {
|
|
25
|
+
type: import("vue").PropType<(string | number)[]>;
|
|
26
|
+
default: () => any[];
|
|
27
|
+
};
|
|
28
|
+
}>> & Readonly<{}> & {}>;
|
|
29
|
+
readonly VkfTemplateInstancesProvider: {
|
|
30
|
+
new (...args: any[]): any;
|
|
31
|
+
__isFragment?: never;
|
|
32
|
+
__isTeleport?: never;
|
|
33
|
+
__isSuspense?: never;
|
|
34
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<Record<string | symbol, any>>>, Record<string | symbol, any>, any, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
35
|
+
[x: string]: any;
|
|
36
|
+
[x: symbol]: any;
|
|
37
|
+
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & {
|
|
38
|
+
install(app: import("vue").App): void;
|
|
39
|
+
};
|
|
40
|
+
Core: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
41
|
+
source: {
|
|
42
|
+
type: import("vue").PropType<import("./types").RendererTreeData[]>;
|
|
43
|
+
default: () => any[];
|
|
44
|
+
};
|
|
45
|
+
templateInstances: {
|
|
46
|
+
type: import("vue").PropType<Record<string, import("vue").ComponentInternalInstance>>;
|
|
47
|
+
default: any;
|
|
48
|
+
};
|
|
49
|
+
k: {
|
|
50
|
+
type: import("vue").PropType<(string | number)[]>;
|
|
51
|
+
default: () => any[];
|
|
52
|
+
};
|
|
53
|
+
}>, () => (import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
54
|
+
[key: string]: any;
|
|
55
|
+
}>[] | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
56
|
+
[key: string]: any;
|
|
57
|
+
}>[][])[], {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
58
|
+
source: {
|
|
59
|
+
type: import("vue").PropType<import("./types").RendererTreeData[]>;
|
|
60
|
+
default: () => any[];
|
|
61
|
+
};
|
|
62
|
+
templateInstances: {
|
|
63
|
+
type: import("vue").PropType<Record<string, import("vue").ComponentInternalInstance>>;
|
|
64
|
+
default: any;
|
|
65
|
+
};
|
|
66
|
+
k: {
|
|
67
|
+
type: import("vue").PropType<(string | number)[]>;
|
|
68
|
+
default: () => any[];
|
|
69
|
+
};
|
|
70
|
+
}>> & Readonly<{}>, {
|
|
71
|
+
source: import("./types").RendererTreeData[];
|
|
72
|
+
templateInstances: Record<string, import("vue").ComponentInternalInstance>;
|
|
73
|
+
k: (string | number)[];
|
|
74
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
75
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
21
76
|
source: {
|
|
22
|
-
type: import("vue").PropType<RendererTreeData[]>;
|
|
77
|
+
type: import("vue").PropType<import("./types").RendererTreeData[]>;
|
|
23
78
|
default: () => any[];
|
|
24
79
|
};
|
|
25
80
|
templateInstances: {
|
|
@@ -31,8 +86,8 @@ declare const VkfFormItemRenderer: import("vue").DefineComponent<import("vue").E
|
|
|
31
86
|
default: () => any[];
|
|
32
87
|
};
|
|
33
88
|
}>> & Readonly<{}>, {
|
|
34
|
-
source: RendererTreeData[];
|
|
89
|
+
source: import("./types").RendererTreeData[];
|
|
35
90
|
templateInstances: Record<string, import("vue").ComponentInternalInstance>;
|
|
36
91
|
k: (string | number)[];
|
|
37
92
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
38
|
-
export default
|
|
93
|
+
export default _default;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
var formItemRenderer = require('@vunk/form/components/form-item-renderer');
|
|
7
|
+
var rendererData = require('@vunk/form/components/renderer-data');
|
|
8
|
+
var elementPlus = require('element-plus');
|
|
9
|
+
var _pluginVue_exportHelper = require('../_plugin-vue_export-helper.cjs');
|
|
10
|
+
|
|
11
|
+
const props = {
|
|
12
|
+
data: {
|
|
13
|
+
type: Object,
|
|
14
|
+
default: () => ({})
|
|
15
|
+
},
|
|
16
|
+
formItems: {
|
|
17
|
+
type: Array,
|
|
18
|
+
default: () => []
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
const emits = {};
|
|
22
|
+
|
|
23
|
+
var _sfc_main = vue.defineComponent({
|
|
24
|
+
name: "VkfInformation",
|
|
25
|
+
components: {
|
|
26
|
+
ElForm: elementPlus.ElForm,
|
|
27
|
+
VkfFormItemRenderer: formItemRenderer.VkfFormItemRenderer,
|
|
28
|
+
VkfRendererData: rendererData.VkfRendererData
|
|
29
|
+
},
|
|
30
|
+
props,
|
|
31
|
+
emits,
|
|
32
|
+
setup() {
|
|
33
|
+
return {};
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
38
|
+
const _component_VkfFormItemRenderer = vue.resolveComponent("VkfFormItemRenderer");
|
|
39
|
+
const _component_VkfRendererData = vue.resolveComponent("VkfRendererData");
|
|
40
|
+
const _component_ElForm = vue.resolveComponent("ElForm");
|
|
41
|
+
return vue.openBlock(), vue.createBlock(_component_ElForm, {
|
|
42
|
+
model: _ctx.data,
|
|
43
|
+
"label-width": "auto"
|
|
44
|
+
}, {
|
|
45
|
+
default: vue.withCtx(() => [
|
|
46
|
+
vue.createVNode(_component_VkfRendererData, { data: _ctx.data }, {
|
|
47
|
+
default: vue.withCtx(() => [
|
|
48
|
+
vue.createVNode(_component_VkfFormItemRenderer, { source: _ctx.formItems }, {
|
|
49
|
+
default: vue.withCtx(() => [
|
|
50
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
51
|
+
]),
|
|
52
|
+
_: 3
|
|
53
|
+
/* FORWARDED */
|
|
54
|
+
}, 8, ["source"])
|
|
55
|
+
]),
|
|
56
|
+
_: 3
|
|
57
|
+
/* FORWARDED */
|
|
58
|
+
}, 8, ["data"])
|
|
59
|
+
]),
|
|
60
|
+
_: 3
|
|
61
|
+
/* FORWARDED */
|
|
62
|
+
}, 8, ["model"]);
|
|
63
|
+
}
|
|
64
|
+
var VkfInformation = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/private-vunk-form/private-vunk-form/packages/components/information/src/index.vue"]]);
|
|
65
|
+
|
|
66
|
+
var types = /*#__PURE__*/Object.freeze({
|
|
67
|
+
__proto__: null
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
VkfInformation.install = (app) => {
|
|
71
|
+
app.component(VkfInformation.name || "VkfInformation", VkfInformation);
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
exports.VkfInformation = VkfInformation;
|
|
75
|
+
exports.__VkfInformation = types;
|
|
76
|
+
exports.default = VkfInformation;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { defineComponent, resolveComponent, openBlock, createBlock, withCtx, createVNode, renderSlot } from 'vue';
|
|
2
|
+
import { VkfFormItemRenderer } from '@vunk/form/components/form-item-renderer';
|
|
3
|
+
import { VkfRendererData } from '@vunk/form/components/renderer-data';
|
|
4
|
+
import { ElForm } from 'element-plus';
|
|
5
|
+
import { _ as _export_sfc } from '../_plugin-vue_export-helper.mjs';
|
|
6
|
+
|
|
7
|
+
const props = {
|
|
8
|
+
data: {
|
|
9
|
+
type: Object,
|
|
10
|
+
default: () => ({})
|
|
11
|
+
},
|
|
12
|
+
formItems: {
|
|
13
|
+
type: Array,
|
|
14
|
+
default: () => []
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
const emits = {};
|
|
18
|
+
|
|
19
|
+
var _sfc_main = defineComponent({
|
|
20
|
+
name: "VkfInformation",
|
|
21
|
+
components: {
|
|
22
|
+
ElForm,
|
|
23
|
+
VkfFormItemRenderer,
|
|
24
|
+
VkfRendererData
|
|
25
|
+
},
|
|
26
|
+
props,
|
|
27
|
+
emits,
|
|
28
|
+
setup() {
|
|
29
|
+
return {};
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
34
|
+
const _component_VkfFormItemRenderer = resolveComponent("VkfFormItemRenderer");
|
|
35
|
+
const _component_VkfRendererData = resolveComponent("VkfRendererData");
|
|
36
|
+
const _component_ElForm = resolveComponent("ElForm");
|
|
37
|
+
return openBlock(), createBlock(_component_ElForm, {
|
|
38
|
+
model: _ctx.data,
|
|
39
|
+
"label-width": "auto"
|
|
40
|
+
}, {
|
|
41
|
+
default: withCtx(() => [
|
|
42
|
+
createVNode(_component_VkfRendererData, { data: _ctx.data }, {
|
|
43
|
+
default: withCtx(() => [
|
|
44
|
+
createVNode(_component_VkfFormItemRenderer, { source: _ctx.formItems }, {
|
|
45
|
+
default: withCtx(() => [
|
|
46
|
+
renderSlot(_ctx.$slots, "default")
|
|
47
|
+
]),
|
|
48
|
+
_: 3
|
|
49
|
+
/* FORWARDED */
|
|
50
|
+
}, 8, ["source"])
|
|
51
|
+
]),
|
|
52
|
+
_: 3
|
|
53
|
+
/* FORWARDED */
|
|
54
|
+
}, 8, ["data"])
|
|
55
|
+
]),
|
|
56
|
+
_: 3
|
|
57
|
+
/* FORWARDED */
|
|
58
|
+
}, 8, ["model"]);
|
|
59
|
+
}
|
|
60
|
+
var VkfInformation = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/private-vunk-form/private-vunk-form/packages/components/information/src/index.vue"]]);
|
|
61
|
+
|
|
62
|
+
var types = /*#__PURE__*/Object.freeze({
|
|
63
|
+
__proto__: null
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
VkfInformation.install = (app) => {
|
|
67
|
+
app.component(VkfInformation.name || "VkfInformation", VkfInformation);
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export { VkfInformation, types as __VkfInformation, VkfInformation as default };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { NormalObject } from '@vunk/shared';
|
|
2
|
+
import { PropType } from 'vue';
|
|
3
|
+
export declare const props: {
|
|
4
|
+
data: {
|
|
5
|
+
type: PropType<NormalObject>;
|
|
6
|
+
default: () => {};
|
|
7
|
+
};
|
|
8
|
+
formItems: {
|
|
9
|
+
type: PropType<any[]>;
|
|
10
|
+
default: () => any[];
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export declare const emits: {};
|