@vunk/form 0.0.1-alpha.13 → 0.0.1-alpha.14
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.
|
@@ -66,7 +66,7 @@ const VkfFormItemRenderer = defineComponent({
|
|
|
66
66
|
Reflect.deleteProperty(slotData, "templateType");
|
|
67
67
|
Reflect.deleteProperty(slotData, "templateSlots");
|
|
68
68
|
Reflect.deleteProperty(slotData, "templateIf");
|
|
69
|
-
const
|
|
69
|
+
const createTemplateIf = () => {
|
|
70
70
|
if (typeof c.templateIf === "boolean") {
|
|
71
71
|
const flag = c.templateIf;
|
|
72
72
|
return () => flag;
|
|
@@ -83,7 +83,7 @@ const VkfFormItemRenderer = defineComponent({
|
|
|
83
83
|
raw: c,
|
|
84
84
|
Renderer,
|
|
85
85
|
k: currentK,
|
|
86
|
-
|
|
86
|
+
templateIf: createTemplateIf()
|
|
87
87
|
});
|
|
88
88
|
nodes && a.push(nodes);
|
|
89
89
|
} else if ((_c = c.templateSlots) == null ? void 0 : _c.default) {
|
|
@@ -47,8 +47,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
47
47
|
const _component_VkfInputNumber = resolveComponent("VkfInputNumber");
|
|
48
48
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
49
49
|
createVNode(_component_VkfFormItemRendererTemplate, { type: "VkfInput" }, {
|
|
50
|
-
default: withCtx(({ data: sourceData,
|
|
51
|
-
|
|
50
|
+
default: withCtx(({ data: sourceData, templateIf }) => [
|
|
51
|
+
templateIf(_ctx.data) ? (openBlock(), createBlock(_component_VkfInput, mergeProps({
|
|
52
52
|
key: 0,
|
|
53
53
|
modelValue: _ctx.getValue(_ctx.data, sourceData.prop),
|
|
54
54
|
"onUpdate:modelValue": ($event) => _ctx.$emit("setData", {
|
|
@@ -60,8 +60,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
60
60
|
_: 1
|
|
61
61
|
}),
|
|
62
62
|
createVNode(_component_VkfFormItemRendererTemplate, { type: "VkfSwitch" }, {
|
|
63
|
-
default: withCtx(({ data: sourceData,
|
|
64
|
-
|
|
63
|
+
default: withCtx(({ data: sourceData, templateIf }) => [
|
|
64
|
+
templateIf(_ctx.data) ? (openBlock(), createBlock(_component_VkfSwitch, mergeProps({
|
|
65
65
|
key: 0,
|
|
66
66
|
modelValue: _ctx.getValue(_ctx.data, sourceData.prop),
|
|
67
67
|
"onUpdate:modelValue": ($event) => _ctx.$emit("setData", {
|
|
@@ -73,8 +73,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
73
73
|
_: 1
|
|
74
74
|
}),
|
|
75
75
|
createVNode(_component_VkfFormItemRendererTemplate, { type: "VkfSelect" }, {
|
|
76
|
-
default: withCtx(({ data: sourceData,
|
|
77
|
-
|
|
76
|
+
default: withCtx(({ data: sourceData, templateIf }) => [
|
|
77
|
+
templateIf(_ctx.data) ? (openBlock(), createBlock(_component_VkfSelect, mergeProps({
|
|
78
78
|
key: 0,
|
|
79
79
|
modelValue: _ctx.getValue(_ctx.data, sourceData.prop),
|
|
80
80
|
"onUpdate:modelValue": ($event) => _ctx.$emit("setData", {
|
|
@@ -86,8 +86,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
86
86
|
_: 1
|
|
87
87
|
}),
|
|
88
88
|
createVNode(_component_VkfFormItemRendererTemplate, { type: "VkfDatePicker" }, {
|
|
89
|
-
default: withCtx(({ data: sourceData,
|
|
90
|
-
|
|
89
|
+
default: withCtx(({ data: sourceData, templateIf }) => [
|
|
90
|
+
templateIf(_ctx.data) ? (openBlock(), createBlock(_component_VkfDatePicker, mergeProps({
|
|
91
91
|
key: 0,
|
|
92
92
|
modelValue: _ctx.getValue(_ctx.data, sourceData.prop),
|
|
93
93
|
"onUpdate:modelValue": ($event) => _ctx.$emit("setData", {
|
|
@@ -99,8 +99,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
99
99
|
_: 1
|
|
100
100
|
}),
|
|
101
101
|
createVNode(_component_VkfFormItemRendererTemplate, { type: "VkfInputNumber" }, {
|
|
102
|
-
default: withCtx(({ data: sourceData,
|
|
103
|
-
|
|
102
|
+
default: withCtx(({ data: sourceData, templateIf }) => [
|
|
103
|
+
templateIf(_ctx.data) ? (openBlock(), createBlock(_component_VkfInputNumber, mergeProps({
|
|
104
104
|
key: 0,
|
|
105
105
|
modelValue: _ctx.getValue(_ctx.data, sourceData.prop),
|
|
106
106
|
"onUpdate:modelValue": ($event) => _ctx.$emit("setData", {
|
|
@@ -112,8 +112,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
112
112
|
_: 1
|
|
113
113
|
}),
|
|
114
114
|
createVNode(_component_VkfFormItemRendererTemplate, { type: "Component" }, {
|
|
115
|
-
default: withCtx(({ data, raw,
|
|
116
|
-
|
|
115
|
+
default: withCtx(({ data, raw, templateIf }) => [
|
|
116
|
+
templateIf(data) ? (openBlock(), createBlock(resolveDynamicComponent(typeof data.is === "function" ? data.is(raw) : data.is), normalizeProps(mergeProps({ key: 0 }, _ctx.pickObject(data, { excludes: ["is"] }))), null, 16)) : createCommentVNode("v-if", true)
|
|
117
117
|
]),
|
|
118
118
|
_: 1
|
|
119
119
|
})
|
|
@@ -31,8 +31,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
31
31
|
const _component_ElCol = resolveComponent("ElCol");
|
|
32
32
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
33
33
|
createVNode(_component_VkfFormItemRendererTemplate, { type: "ElRow" }, {
|
|
34
|
-
default: withCtx(({ data: props, Renderer, raw, k,
|
|
35
|
-
|
|
34
|
+
default: withCtx(({ data: props, Renderer, raw, k, templateIf }) => [
|
|
35
|
+
templateIf(_ctx.data) ? (openBlock(), createBlock(_component_ElRow, normalizeProps(mergeProps({ key: 0 }, props)), {
|
|
36
36
|
default: withCtx(() => [
|
|
37
37
|
(openBlock(), createBlock(resolveDynamicComponent(Renderer), {
|
|
38
38
|
source: raw.templateSlots,
|
|
@@ -45,8 +45,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
45
45
|
_: 1
|
|
46
46
|
}),
|
|
47
47
|
createVNode(_component_VkfFormItemRendererTemplate, { type: "ElCol" }, {
|
|
48
|
-
default: withCtx(({ data, Renderer, raw, k,
|
|
49
|
-
|
|
48
|
+
default: withCtx(({ data, Renderer, raw, k, templateIf }) => [
|
|
49
|
+
templateIf(data) ? (openBlock(), createBlock(_component_ElCol, normalizeProps(mergeProps({ key: 0 }, data)), {
|
|
50
50
|
default: withCtx(() => [
|
|
51
51
|
(openBlock(), createBlock(resolveDynamicComponent(Renderer), {
|
|
52
52
|
source: raw.templateSlots,
|
|
@@ -59,8 +59,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
59
59
|
_: 1
|
|
60
60
|
}),
|
|
61
61
|
createVNode(_component_VkfFormItemRendererTemplate, { type: "VkfFlex" }, {
|
|
62
|
-
default: withCtx(({ data, Renderer, raw, k,
|
|
63
|
-
|
|
62
|
+
default: withCtx(({ data, Renderer, raw, k, templateIf }) => [
|
|
63
|
+
templateIf(data) ? (openBlock(), createElementBlock("div", mergeProps({
|
|
64
64
|
key: 0,
|
|
65
65
|
class: "vkf-flex",
|
|
66
66
|
style: {
|
package/package.json
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vunk/form",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.14",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.esm.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "gulp -f gulpfile.ts"
|
|
8
8
|
},
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"@vunk/core": "^0.0.0-alpha.19"
|
|
11
|
+
},
|
|
9
12
|
"keywords": [],
|
|
10
13
|
"author": "",
|
|
11
14
|
"license": "ISC",
|