@vunk/form 0.0.0-alpha.7 → 0.0.0-alpha.8
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/config/index.js +1 -16
- package/components/config-renderer/index.js +1 -0
- package/components/confirm-input/index.js +33 -8
- package/components/confirm-input/src/ctx.d.ts +8 -1
- package/components/confirm-input/src/index.vue.d.ts +18 -2
- package/components/date-picker/src/ctx.d.ts +56 -88
- package/components/date-picker/src/index.vue.d.ts +140 -204
- package/components/form/index.js +7 -1
- package/components/form/src/ctx.d.ts +277 -1
- package/components/form/src/index.vue.d.ts +825 -0
- package/components/form-item-renderer/index.js +1 -0
- package/components/ground/index.css +26 -26
- package/components/ground/index.js +122 -100
- package/components/ground/src/ground-config/src/index copy.vue.d.ts +72 -0
- package/components/ground/src/ground-config/src/index.vue.d.ts +953 -54
- package/components/ground/src/ground-main/src/index.vue.d.ts +7 -16
- package/components/ground/src/ground-widget/src/form-item-widget/src/index.vue.d.ts +13 -0
- package/components/ground/src/index.vue.d.ts +16 -5
- package/components/input/index.js +7 -7
- package/components/input-config/index.js +7 -4
- package/components/input-config/src/ctx.d.ts +600 -5
- package/components/input-config/src/index.vue.d.ts +2051 -2
- package/components/rules-config/src/ctx.d.ts +276 -0
- package/components/rules-config/src/index.vue.d.ts +1098 -0
- package/components/switch/src/ctx.d.ts +6 -0
- package/components/switch/src/index.vue.d.ts +13 -0
- package/index.css +26 -26
- package/package.json +1 -1
- package/shared/element-plus/ctx/index.d.ts +5 -5
- package/shared/element-plus/instances/date-picker.d.ts +59 -91
- package/shared/element-plus/instances/select.d.ts +1 -1
- package/shared/helper/index.d.ts +2 -1
- package/shared/helper/index.js +15 -1
- package/shared/types/form-item/confirm-input.d.ts +8 -0
- package/shared/types/form-item/confirm-input.js +1 -0
- package/shared/types/form-item/date-picker.d.ts +2 -2
- package/shared/types/form-item/index.d.ts +1 -0
- package/shared/types/form-item/input.d.ts +2 -6
- package/shared/types/form-item/select.d.ts +2 -2
- package/shared/types/form-item/switch.d.ts +2 -2
- package/shared/types/shared/index.d.ts +1 -1
- package/types/components/confirm-input/src/ctx.d.ts +8 -1
- package/types/components/confirm-input/src/index.vue.d.ts +18 -2
- package/types/components/date-picker/src/ctx.d.ts +56 -88
- package/types/components/date-picker/src/index.vue.d.ts +140 -204
- package/types/components/form/src/ctx.d.ts +277 -1
- package/types/components/form/src/index.vue.d.ts +825 -0
- package/types/components/ground/src/ground-config/src/index copy.vue.d.ts +72 -0
- package/types/components/ground/src/ground-config/src/index.vue.d.ts +953 -54
- package/types/components/ground/src/ground-main/src/index.vue.d.ts +7 -16
- package/types/components/ground/src/ground-widget/src/form-item-widget/src/index.vue.d.ts +13 -0
- package/types/components/ground/src/index.vue.d.ts +16 -5
- package/types/components/input-config/src/ctx.d.ts +600 -5
- package/types/components/input-config/src/index.vue.d.ts +2051 -2
- package/types/components/rules-config/src/ctx.d.ts +276 -0
- package/types/components/rules-config/src/index.vue.d.ts +1098 -0
- package/types/components/switch/src/ctx.d.ts +6 -0
- package/types/components/switch/src/index.vue.d.ts +13 -0
- package/types/shared/element-plus/ctx/index.d.ts +5 -5
- package/types/shared/element-plus/instances/date-picker.d.ts +59 -91
- package/types/shared/element-plus/instances/select.d.ts +1 -1
- package/types/shared/helper/index.d.ts +2 -1
- package/types/shared/types/form-item/confirm-input.d.ts +8 -0
- package/types/shared/types/form-item/date-picker.d.ts +2 -2
- package/types/shared/types/form-item/index.d.ts +1 -0
- package/types/shared/types/form-item/input.d.ts +2 -6
- package/types/shared/types/form-item/select.d.ts +2 -2
- package/types/shared/types/form-item/switch.d.ts +2 -2
- package/types/shared/types/shared/index.d.ts +1 -1
|
@@ -48,6 +48,7 @@ const VkfFormItemRenderer = defineComponent({
|
|
|
48
48
|
});
|
|
49
49
|
nodes && a.push(nodes);
|
|
50
50
|
} else if (c.templateSlots?.default) {
|
|
51
|
+
console.warn(c.templateType, "templateType\u4E0D\u5B58\u5728\u5C06\u8DF3\u8FC7");
|
|
51
52
|
currentK.push("templateSlots", "default");
|
|
52
53
|
return renderFormItems(c.templateSlots.default, currentK);
|
|
53
54
|
}
|
|
@@ -33,32 +33,6 @@
|
|
|
33
33
|
flex: 1;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
.vkf-ground-main {
|
|
37
|
-
min-height: 100%;
|
|
38
|
-
padding: .5em;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.vkf-ground-end.is-dragover-prev {
|
|
42
|
-
border-top: 2px var(--el-color-primary) solid;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.vkf-gm-form-item-x.vk-tab-item {
|
|
46
|
-
cursor: initial;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.vkf-gm-form-item-x.is-active {
|
|
50
|
-
border: 2px var(--el-color-primary) dashed;
|
|
51
|
-
/* margin-bottom: .5em; */
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.vkf-gm-form-item-x .el-form-item {
|
|
55
|
-
transition: all .3s ease;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.vkf-gm-form-item-x.is-active .el-form-item {
|
|
59
|
-
padding: 1em .5em 0;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
36
|
.vkf-widget-tab{
|
|
63
37
|
position: relative;
|
|
64
38
|
width: 100%;
|
|
@@ -86,6 +60,32 @@
|
|
|
86
60
|
border-radius: 4px;
|
|
87
61
|
}
|
|
88
62
|
|
|
63
|
+
.vkf-ground-main {
|
|
64
|
+
min-height: 100%;
|
|
65
|
+
padding: .5em;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.vkf-ground-end.is-dragover-prev {
|
|
69
|
+
border-top: 2px var(--el-color-primary) solid;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.vkf-gm-form-item-x.vk-tab-item {
|
|
73
|
+
cursor: initial;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.vkf-gm-form-item-x.is-active {
|
|
77
|
+
border: 2px var(--el-color-primary) dashed;
|
|
78
|
+
/* margin-bottom: .5em; */
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.vkf-gm-form-item-x .el-form-item {
|
|
82
|
+
transition: all .3s ease;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.vkf-gm-form-item-x.is-active .el-form-item {
|
|
86
|
+
padding: 1em .5em 0;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
89
|
.vkf-ground-main-editing-wrapper{
|
|
90
90
|
overflow: hidden;
|
|
91
91
|
position: relative;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, createElementBlock, Fragment, renderList, toDisplayString, ref, createVNode, withDirectives, renderSlot, vShow, createTextVNode, computed, createCommentVNode, resolveDynamicComponent, normalizeClass, mergeProps,
|
|
1
|
+
import { defineComponent, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, createElementBlock, Fragment, renderList, toDisplayString, ref, createVNode, withDirectives, renderSlot, vShow, createTextVNode, computed, createCommentVNode, resolveDynamicComponent, normalizeClass, mergeProps, unref, getCurrentScope, onScopeDispose, watch } from 'vue';
|
|
2
2
|
import { VkTabGroup, VkTabItem, VkCard, VkBoxHandler } from 'vunk';
|
|
3
3
|
import { VkFloatBlock } from 'vunk/gsap/components/float-block';
|
|
4
4
|
import { ElCollapseItem, ElScrollbar, ElCollapse, ElIcon, ElButton, ElMessage, ElMessageBox } from 'element-plus';
|
|
@@ -8,7 +8,9 @@ import { VkfForm, _VkfFormUtils } from '@vunk/form/components/form';
|
|
|
8
8
|
import { VkfDropWrapper, DragoverClasses } from '@vunk/form/components/drop-wrapper';
|
|
9
9
|
import { VkfFormItemRendererTemplate } from '@vunk/form/components/form-item-renderer-template';
|
|
10
10
|
import { setData, unsetData } from 'vunk/shared/helper';
|
|
11
|
-
import {
|
|
11
|
+
import { VkfConfigRenderer } from '@vunk/form/components/config-renderer';
|
|
12
|
+
import { VkfConfigRendererTemplate } from '@vunk/form/components/config-renderer-template';
|
|
13
|
+
import { VkfInputConfig } from '@vunk/form/components/input-config';
|
|
12
14
|
|
|
13
15
|
var script$5 = defineComponent({
|
|
14
16
|
components: {
|
|
@@ -633,18 +635,14 @@ var script$2 = defineComponent({
|
|
|
633
635
|
type: Array,
|
|
634
636
|
default: () => []
|
|
635
637
|
},
|
|
636
|
-
|
|
638
|
+
data: Object,
|
|
639
|
+
currentK: {
|
|
637
640
|
type: String,
|
|
638
641
|
default: ""
|
|
639
|
-
},
|
|
640
|
-
data: Object,
|
|
641
|
-
k: {
|
|
642
|
-
type: Array,
|
|
643
|
-
default: () => []
|
|
644
642
|
}
|
|
645
643
|
},
|
|
646
644
|
emits: {
|
|
647
|
-
"update:
|
|
645
|
+
"update:currentK": (e) => e,
|
|
648
646
|
"setData": (e) => e,
|
|
649
647
|
"setData:formItems": null,
|
|
650
648
|
"unsetData:formItems": null
|
|
@@ -688,21 +686,24 @@ var script$2 = defineComponent({
|
|
|
688
686
|
addDefaultProp(source);
|
|
689
687
|
if (source.templateType === "VkfEditingSelect") {
|
|
690
688
|
const currentLength = props.formItems.length;
|
|
691
|
-
source.templateSlots.default
|
|
689
|
+
const formItemSource = source.templateSlots.default[0];
|
|
690
|
+
if (formItemSource) {
|
|
692
691
|
emit("setData:formItems", {
|
|
693
|
-
k: currentLength
|
|
694
|
-
v
|
|
692
|
+
k: currentLength,
|
|
693
|
+
v: formItemSource
|
|
695
694
|
});
|
|
696
|
-
}
|
|
695
|
+
}
|
|
697
696
|
emit("unsetData:formItems", {
|
|
698
697
|
k: source.index
|
|
699
698
|
});
|
|
699
|
+
emit("update:currentK", currentLength - 1 + "");
|
|
700
700
|
} else {
|
|
701
|
+
const currentK = props.formItems.length;
|
|
701
702
|
emit("setData:formItems", {
|
|
702
|
-
k:
|
|
703
|
+
k: currentK,
|
|
703
704
|
v: source
|
|
704
705
|
});
|
|
705
|
-
emit("update:
|
|
706
|
+
emit("update:currentK", currentK + "");
|
|
706
707
|
}
|
|
707
708
|
}
|
|
708
709
|
function editDrop(e, overClass, toData) {
|
|
@@ -726,12 +727,13 @@ var script$2 = defineComponent({
|
|
|
726
727
|
}
|
|
727
728
|
if (!fromK.length) {
|
|
728
729
|
addDefaultProp(itemSource);
|
|
730
|
+
const k = toK.map((v, index) => index === toK.length - 1 ? tkl : v);
|
|
729
731
|
emit("setData:formItems", {
|
|
730
|
-
k
|
|
732
|
+
k,
|
|
731
733
|
v: itemSource,
|
|
732
734
|
insert: true
|
|
733
735
|
});
|
|
734
|
-
|
|
736
|
+
emit("update:currentK", k.join());
|
|
735
737
|
return;
|
|
736
738
|
}
|
|
737
739
|
if (fromK.length === toK.length) {
|
|
@@ -756,6 +758,7 @@ var script$2 = defineComponent({
|
|
|
756
758
|
v: itemSource,
|
|
757
759
|
insert: true
|
|
758
760
|
});
|
|
761
|
+
emit("update:currentK", tkl + "");
|
|
759
762
|
}
|
|
760
763
|
}
|
|
761
764
|
}
|
|
@@ -791,8 +794,8 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
791
794
|
createCommentVNode(" {{ formItems. }} "),
|
|
792
795
|
createCommentVNode(" \u5C06formItems\u6E32\u67D3 \u4E3A\u7F16\u8F91\u65F6\u7EC4\u4EF6 "),
|
|
793
796
|
createVNode(_component_VkTabGroup, {
|
|
794
|
-
modelValue: _ctx.
|
|
795
|
-
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => _ctx.$emit("update:
|
|
797
|
+
modelValue: _ctx.currentK,
|
|
798
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => _ctx.$emit("update:currentK", $event))
|
|
796
799
|
}, {
|
|
797
800
|
default: withCtx(() => [
|
|
798
801
|
createVNode(_component_VkfForm, {
|
|
@@ -802,10 +805,11 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
802
805
|
}, {
|
|
803
806
|
rendererTemplate: withCtx(() => [
|
|
804
807
|
createVNode(_component_VkfFormItemRendererTemplate, { type: "VkfEditingSelect" }, {
|
|
805
|
-
default: withCtx(({
|
|
808
|
+
default: withCtx(({ Renderer, raw, k }) => [
|
|
806
809
|
createCommentVNode(" name is prop "),
|
|
807
810
|
createVNode(_component_VkTabItem, {
|
|
808
|
-
name:
|
|
811
|
+
name: k.join(),
|
|
812
|
+
title: k.join(),
|
|
809
813
|
clearable: false,
|
|
810
814
|
class: "vkf-gm-form-item-x"
|
|
811
815
|
}, {
|
|
@@ -828,7 +832,7 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
828
832
|
}, 1032, ["onDrop", "attributes", "active", "source"])
|
|
829
833
|
]),
|
|
830
834
|
_: 2
|
|
831
|
-
}, 1032, ["name"])
|
|
835
|
+
}, 1032, ["name", "title"])
|
|
832
836
|
]),
|
|
833
837
|
_: 1
|
|
834
838
|
}),
|
|
@@ -853,57 +857,49 @@ script$2.__file = "ground/src/ground-main/src/index.vue";
|
|
|
853
857
|
|
|
854
858
|
var script$1 = defineComponent({
|
|
855
859
|
components: {
|
|
856
|
-
|
|
860
|
+
VkfConfigRenderer,
|
|
861
|
+
VkfConfigRendererTemplate,
|
|
862
|
+
VkfInputConfig
|
|
857
863
|
},
|
|
858
864
|
props: {
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
default: ""
|
|
865
|
+
data: {
|
|
866
|
+
type: Object,
|
|
867
|
+
default: () => ({})
|
|
863
868
|
},
|
|
864
|
-
|
|
865
|
-
type:
|
|
866
|
-
default:
|
|
869
|
+
propFieldSource: {
|
|
870
|
+
type: Object,
|
|
871
|
+
default: () => ({})
|
|
867
872
|
}
|
|
868
873
|
},
|
|
869
874
|
emits: {
|
|
870
|
-
|
|
871
|
-
"update:propDisabled": (e) => e
|
|
875
|
+
setData: (e) => e
|
|
872
876
|
},
|
|
873
|
-
setup(
|
|
874
|
-
|
|
875
|
-
const configEmits = _VkfConfigCtx.createOnEmits(emit);
|
|
876
|
-
const source = computed(() => {
|
|
877
|
-
return {
|
|
878
|
-
templateType: props.templateType,
|
|
879
|
-
propDisabled: props.propDisabled
|
|
880
|
-
};
|
|
881
|
-
});
|
|
882
|
-
const setSource = (e) => {
|
|
883
|
-
if (e.k === "propDisabled") {
|
|
884
|
-
emit("update:propDisabled", e.v);
|
|
885
|
-
}
|
|
886
|
-
};
|
|
887
|
-
return {
|
|
888
|
-
source,
|
|
889
|
-
setSource,
|
|
890
|
-
configProps,
|
|
891
|
-
configEmits
|
|
892
|
-
};
|
|
877
|
+
setup() {
|
|
878
|
+
return {};
|
|
893
879
|
}
|
|
894
880
|
});
|
|
895
881
|
|
|
896
882
|
function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
897
|
-
const
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
883
|
+
const _component_VkfInputConfig = resolveComponent("VkfInputConfig");
|
|
884
|
+
const _component_VkfConfigRendererTemplate = resolveComponent("VkfConfigRendererTemplate");
|
|
885
|
+
const _component_VkfConfigRenderer = resolveComponent("VkfConfigRenderer");
|
|
886
|
+
return openBlock(), createBlock(_component_VkfConfigRenderer, { source: _ctx.data }, {
|
|
887
|
+
default: withCtx(() => [
|
|
888
|
+
createCommentVNode(' data-example: { "templateType": "VkfInput", \r\n "prop": "from_widget_2", "label": "inputLabel" } '),
|
|
889
|
+
createVNode(_component_VkfConfigRendererTemplate, { type: "VkfInput" }, {
|
|
890
|
+
default: withCtx(({ data: props }) => [
|
|
891
|
+
createVNode(_component_VkfInputConfig, mergeProps(props, {
|
|
892
|
+
data: _ctx.data,
|
|
893
|
+
onSetData: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("setData", $event)),
|
|
894
|
+
propFieldSource: _ctx.propFieldSource
|
|
895
|
+
}), null, 16, ["data", "propFieldSource"])
|
|
896
|
+
]),
|
|
897
|
+
_: 1
|
|
898
|
+
}),
|
|
899
|
+
renderSlot(_ctx.$slots, "configRendererTemplate")
|
|
904
900
|
]),
|
|
905
901
|
_: 3
|
|
906
|
-
},
|
|
902
|
+
}, 8, ["source"]);
|
|
907
903
|
}
|
|
908
904
|
|
|
909
905
|
script$1.render = render$1;
|
|
@@ -1069,6 +1065,10 @@ var script = defineComponent({
|
|
|
1069
1065
|
data: {
|
|
1070
1066
|
type: Object,
|
|
1071
1067
|
default: () => ({})
|
|
1068
|
+
},
|
|
1069
|
+
modelValue: {
|
|
1070
|
+
type: Array,
|
|
1071
|
+
default: () => []
|
|
1072
1072
|
}
|
|
1073
1073
|
},
|
|
1074
1074
|
emits: {
|
|
@@ -1076,7 +1076,8 @@ var script = defineComponent({
|
|
|
1076
1076
|
"setData:source": (e) => e,
|
|
1077
1077
|
"unsetData:source": null,
|
|
1078
1078
|
"setData": (e) => e,
|
|
1079
|
-
"update:componentLibCollapseExpanded": null
|
|
1079
|
+
"update:componentLibCollapseExpanded": null,
|
|
1080
|
+
"update:modelValue": (e) => Array.isArray(e)
|
|
1080
1081
|
},
|
|
1081
1082
|
setup(props, { emit }) {
|
|
1082
1083
|
const propToFormItem = computed(() => {
|
|
@@ -1087,31 +1088,46 @@ var script = defineComponent({
|
|
|
1087
1088
|
return a;
|
|
1088
1089
|
}, {});
|
|
1089
1090
|
});
|
|
1090
|
-
const
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
message: "\u5B58\u5728\u76F8\u540C\u7684prop, \u8BF7\u91CD\u65B0\u4FEE\u6539"
|
|
1101
|
-
});
|
|
1102
|
-
} else if (!e.v) {
|
|
1103
|
-
ElMessage({
|
|
1104
|
-
type: "warning",
|
|
1105
|
-
message: "prop\u4E0D\u80FD\u4E3A\u7A7A"
|
|
1106
|
-
});
|
|
1107
|
-
} else {
|
|
1108
|
-
props2.prop = e.v;
|
|
1109
|
-
editProp.value = e.v;
|
|
1110
|
-
configPropDisabled.value = true;
|
|
1091
|
+
const kToSourceItem = computed(() => {
|
|
1092
|
+
const data = {};
|
|
1093
|
+
function intoData(list, k = []) {
|
|
1094
|
+
list.forEach((item, index) => {
|
|
1095
|
+
const currentK = [...k, index];
|
|
1096
|
+
data[currentK.join()] = item;
|
|
1097
|
+
if (item.templateSlots) {
|
|
1098
|
+
if (Array.isArray(item.templateSlots.default)) {
|
|
1099
|
+
intoData(item.templateSlots.default, currentK);
|
|
1100
|
+
}
|
|
1111
1101
|
}
|
|
1112
|
-
}
|
|
1102
|
+
});
|
|
1103
|
+
}
|
|
1104
|
+
intoData(props.source);
|
|
1105
|
+
return data;
|
|
1106
|
+
});
|
|
1107
|
+
const _modelValue = ref("");
|
|
1108
|
+
const editK = computed({
|
|
1109
|
+
get() {
|
|
1110
|
+
return props.modelValue?.join() ?? _modelValue.value;
|
|
1111
|
+
},
|
|
1112
|
+
set(v) {
|
|
1113
|
+
_modelValue.value = v;
|
|
1114
|
+
emit("update:modelValue", v ? v.split(",") : []);
|
|
1115
|
+
}
|
|
1116
|
+
});
|
|
1117
|
+
const editKArr = computed(() => editK.value ? editK.value.split(",") : []);
|
|
1118
|
+
const propValidateUpdate = (ev) => {
|
|
1119
|
+
if (ev in propToFormItem.value) {
|
|
1120
|
+
ElMessage({
|
|
1121
|
+
type: "warning",
|
|
1122
|
+
message: "\u5B58\u5728\u76F8\u540C\u7684prop, \u8BF7\u91CD\u65B0\u4FEE\u6539"
|
|
1123
|
+
});
|
|
1124
|
+
} else if (!ev) {
|
|
1125
|
+
ElMessage({
|
|
1126
|
+
type: "warning",
|
|
1127
|
+
message: "prop\u4E0D\u80FD\u4E3A\u7A7A"
|
|
1128
|
+
});
|
|
1113
1129
|
} else {
|
|
1114
|
-
|
|
1130
|
+
return true;
|
|
1115
1131
|
}
|
|
1116
1132
|
};
|
|
1117
1133
|
const formItemStr = computed(() => JSON.stringify(props.source));
|
|
@@ -1140,11 +1156,12 @@ var script = defineComponent({
|
|
|
1140
1156
|
};
|
|
1141
1157
|
return {
|
|
1142
1158
|
propToFormItem,
|
|
1143
|
-
editProp,
|
|
1144
1159
|
setData,
|
|
1145
1160
|
unsetData,
|
|
1146
|
-
|
|
1147
|
-
|
|
1161
|
+
propValidateUpdate,
|
|
1162
|
+
kToSourceItem,
|
|
1163
|
+
editK,
|
|
1164
|
+
editKArr,
|
|
1148
1165
|
formItemClip,
|
|
1149
1166
|
inputJson
|
|
1150
1167
|
};
|
|
@@ -1199,8 +1216,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1199
1216
|
createVNode(_component_VkfGroundMain, {
|
|
1200
1217
|
data: _ctx.data,
|
|
1201
1218
|
onSetData: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("setData", $event)),
|
|
1202
|
-
|
|
1203
|
-
"onUpdate:
|
|
1219
|
+
currentK: _ctx.editK,
|
|
1220
|
+
"onUpdate:currentK": _cache[3] || (_cache[3] = ($event) => _ctx.editK = $event),
|
|
1204
1221
|
formItems: _ctx.source,
|
|
1205
1222
|
"onSetData:formItems": _cache[4] || (_cache[4] = ($event) => _ctx.$emit("setData:source", $event)),
|
|
1206
1223
|
"onUnsetData:formItems": _cache[5] || (_cache[5] = ($event) => _ctx.$emit("unsetData:source", $event))
|
|
@@ -1209,26 +1226,31 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1209
1226
|
renderSlot(_ctx.$slots, "rendererTemplate")
|
|
1210
1227
|
]),
|
|
1211
1228
|
_: 3
|
|
1212
|
-
}, 8, ["data", "
|
|
1229
|
+
}, 8, ["data", "currentK", "formItems"])
|
|
1213
1230
|
]),
|
|
1214
1231
|
_: 3
|
|
1215
1232
|
})
|
|
1216
1233
|
]),
|
|
1217
1234
|
createElementVNode("div", _hoisted_6, [
|
|
1218
1235
|
createCommentVNode(" \u901A\u8FC7config \u4FEE\u6539\u6570\u636E\u6E90 \u5355\u9879\u7684\u5185\u5BB9 "),
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1236
|
+
createCommentVNode(" {{ editK }} {{ kToSourceItem[editK] }} "),
|
|
1237
|
+
createCommentVNode(" {{ kToSourceItem[editK] }} "),
|
|
1238
|
+
createCommentVNode(' :k="editKArr" '),
|
|
1239
|
+
createVNode(_component_VkfGroundConfig, {
|
|
1240
|
+
data: _ctx.kToSourceItem[_ctx.editK],
|
|
1241
|
+
onSetData: _cache[6] || (_cache[6] = ($event) => _ctx.$emit("setData:source", {
|
|
1242
|
+
k: [..._ctx.editKArr, $event.k],
|
|
1243
|
+
v: $event.v
|
|
1244
|
+
})),
|
|
1245
|
+
propFieldSource: {
|
|
1246
|
+
validateUpdate: _ctx.propValidateUpdate
|
|
1247
|
+
}
|
|
1226
1248
|
}, {
|
|
1227
|
-
|
|
1228
|
-
renderSlot(_ctx.$slots, "configRendererTemplate")
|
|
1249
|
+
configRendererTemplate: withCtx(() => [
|
|
1250
|
+
renderSlot(_ctx.$slots, "configRendererTemplate", { propValidateUpdate: _ctx.propValidateUpdate })
|
|
1229
1251
|
]),
|
|
1230
1252
|
_: 3
|
|
1231
|
-
}, 8, ["
|
|
1253
|
+
}, 8, ["data", "propFieldSource"])
|
|
1232
1254
|
])
|
|
1233
1255
|
]);
|
|
1234
1256
|
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { SetDataEvent } from '@vunk/form/shared/types';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<{
|
|
3
|
+
templateType: {
|
|
4
|
+
type: StringConstructor;
|
|
5
|
+
default: string;
|
|
6
|
+
};
|
|
7
|
+
propDisabled: {
|
|
8
|
+
type: BooleanConstructor;
|
|
9
|
+
default: boolean;
|
|
10
|
+
};
|
|
11
|
+
data: {
|
|
12
|
+
type: import("vue").PropType<import("vunk/shared/types").AnyObject>;
|
|
13
|
+
default: () => {};
|
|
14
|
+
};
|
|
15
|
+
source: {
|
|
16
|
+
type: import("vue").PropType<{
|
|
17
|
+
[k: string]: any;
|
|
18
|
+
templateType?: string | undefined;
|
|
19
|
+
}>;
|
|
20
|
+
default: () => {};
|
|
21
|
+
};
|
|
22
|
+
}, {
|
|
23
|
+
source: import("vue").ComputedRef<{
|
|
24
|
+
templateType: string;
|
|
25
|
+
propDisabled: boolean;
|
|
26
|
+
}>;
|
|
27
|
+
setSource: (e: SetDataEvent) => void;
|
|
28
|
+
configProps: import("vue").ComputedRef<{
|
|
29
|
+
data: import("vunk/shared/types").AnyObject;
|
|
30
|
+
}>;
|
|
31
|
+
configEmits: {
|
|
32
|
+
setData: ((event: "setData", e: SetDataEvent<any>) => void) & ((event: "update:propDisabled", e: boolean) => void) & ((event: "setData:source", e: SetDataEvent<any>) => void);
|
|
33
|
+
"setData:source": ((event: "setData", e: SetDataEvent<any>) => void) & ((event: "update:propDisabled", e: boolean) => void) & ((event: "setData:source", e: SetDataEvent<any>) => void);
|
|
34
|
+
};
|
|
35
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
36
|
+
'update:propDisabled': (e: boolean) => boolean;
|
|
37
|
+
setData: (e: SetDataEvent<any>) => SetDataEvent<any>;
|
|
38
|
+
'setData:source': (e: SetDataEvent<any>) => SetDataEvent<any>;
|
|
39
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
40
|
+
templateType: {
|
|
41
|
+
type: StringConstructor;
|
|
42
|
+
default: string;
|
|
43
|
+
};
|
|
44
|
+
propDisabled: {
|
|
45
|
+
type: BooleanConstructor;
|
|
46
|
+
default: boolean;
|
|
47
|
+
};
|
|
48
|
+
data: {
|
|
49
|
+
type: import("vue").PropType<import("vunk/shared/types").AnyObject>;
|
|
50
|
+
default: () => {};
|
|
51
|
+
};
|
|
52
|
+
source: {
|
|
53
|
+
type: import("vue").PropType<{
|
|
54
|
+
[k: string]: any;
|
|
55
|
+
templateType?: string | undefined;
|
|
56
|
+
}>;
|
|
57
|
+
default: () => {};
|
|
58
|
+
};
|
|
59
|
+
}>> & {
|
|
60
|
+
onSetData?: ((e: SetDataEvent<any>) => any) | undefined;
|
|
61
|
+
"onUpdate:propDisabled"?: ((e: boolean) => any) | undefined;
|
|
62
|
+
"onSetData:source"?: ((e: SetDataEvent<any>) => any) | undefined;
|
|
63
|
+
}, {
|
|
64
|
+
templateType: string;
|
|
65
|
+
data: import("vunk/shared/types").AnyObject;
|
|
66
|
+
source: {
|
|
67
|
+
[k: string]: any;
|
|
68
|
+
templateType?: string | undefined;
|
|
69
|
+
};
|
|
70
|
+
propDisabled: boolean;
|
|
71
|
+
}>;
|
|
72
|
+
export default _default;
|