@vunk/form 0.0.0-alpha.3 → 0.0.0-alpha.5
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/confirm-input/index.css +9 -9
- package/components/ground/index.css +34 -31
- package/components/ground/index.js +35 -14
- package/components/ground/src/ground-widget/src/form-item-widget/src/index.vue.d.ts +594 -0
- package/components/ground/src/index.vue.d.ts +19 -5
- package/components/select/index.js +20 -6
- package/components/select/src/ctx.d.ts +5 -0
- package/components/select/src/index.vue.d.ts +9 -0
- package/components/select/src/types.d.ts +5 -3
- package/index.css +43 -40
- package/index.d.ts +8 -8
- package/package.json +1 -1
- package/shared/types/shared/index.d.ts +4 -0
- package/types/components/ground/src/ground-widget/src/form-item-widget/src/index.vue.d.ts +594 -0
- package/types/components/ground/src/index.vue.d.ts +19 -5
- package/types/components/select/src/ctx.d.ts +5 -0
- package/types/components/select/src/index.vue.d.ts +9 -0
- package/types/components/select/src/types.d.ts +5 -3
- package/types/shared/types/shared/index.d.ts +4 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
.vkf-confirm-input .el-input-group__append {
|
|
3
|
-
cursor: initial;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.vkf-confirm-input .vkf-confirm-input-icon {
|
|
7
|
-
color: var(--el-color-primary);
|
|
8
|
-
cursor: pointer;
|
|
9
|
-
}
|
|
1
|
+
|
|
2
|
+
.vkf-confirm-input .el-input-group__append {
|
|
3
|
+
cursor: initial;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.vkf-confirm-input .vkf-confirm-input-icon {
|
|
7
|
+
color: var(--el-color-primary);
|
|
8
|
+
cursor: pointer;
|
|
9
|
+
}
|
|
@@ -1,34 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
.vkf-ground {
|
|
3
|
-
display: flex;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.vkf-ground-widget-x {
|
|
7
|
-
width: 15em;
|
|
8
|
-
height: 100%;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.vkf-ground-main-x {
|
|
12
|
-
flex: 3;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
1
|
+
|
|
2
|
+
.vkf-ground {
|
|
3
|
+
display: flex;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.vkf-ground-widget-x {
|
|
7
|
+
width: 15em;
|
|
8
|
+
height: 100%;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.vkf-ground-main-x {
|
|
12
|
+
flex: 3;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.vkf-ground-main-x .vkf-ground-main-card {
|
|
16
|
+
height: 100%;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.vkf-ground-main-card>.vk-card-title {
|
|
20
|
+
display: flex;
|
|
21
|
+
justify-content: end;
|
|
22
|
+
margin-bottom: var(--gap-xxs);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.vkf-ground-main-card>.vk-card-body {
|
|
26
|
+
height: 100%;
|
|
27
|
+
border: 2px var(--el-border-color) dashed;
|
|
28
|
+
overflow: auto;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.vkf-ground-config-x {
|
|
32
|
+
padding: 0 1em;
|
|
33
|
+
flex: 1;
|
|
34
|
+
}
|
|
32
35
|
|
|
33
36
|
.vkf-ground-main {
|
|
34
37
|
min-height: 100%;
|
|
@@ -26,6 +26,15 @@ var script$5 = defineComponent({
|
|
|
26
26
|
label: "inputLabel"
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
|
+
{
|
|
30
|
+
label: "select",
|
|
31
|
+
value: "VkfSelect",
|
|
32
|
+
defaultOptions: {
|
|
33
|
+
templateType: "VkfSelect",
|
|
34
|
+
prop: "",
|
|
35
|
+
label: "label"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
29
38
|
{
|
|
30
39
|
label: "switch",
|
|
31
40
|
value: "VkfSwitch",
|
|
@@ -822,19 +831,20 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
822
831
|
}, 1032, ["name"])
|
|
823
832
|
]),
|
|
824
833
|
_: 1
|
|
825
|
-
})
|
|
834
|
+
}),
|
|
835
|
+
renderSlot(_ctx.$slots, "rendererTemplate")
|
|
826
836
|
]),
|
|
827
|
-
_:
|
|
837
|
+
_: 3
|
|
828
838
|
}, 8, ["formItems", "data"])
|
|
829
839
|
]),
|
|
830
|
-
_:
|
|
840
|
+
_: 3
|
|
831
841
|
}, 8, ["modelValue"]),
|
|
832
842
|
createElementVNode("div", {
|
|
833
843
|
class: normalizeClass(["vkf-ground-end", _ctx.groundEndClassName]),
|
|
834
844
|
ref: "endLineNode"
|
|
835
845
|
}, null, 2)
|
|
836
846
|
]),
|
|
837
|
-
_:
|
|
847
|
+
_: 3
|
|
838
848
|
}, 8, ["onDrop", "onDragover", "onDragleave"]);
|
|
839
849
|
}
|
|
840
850
|
|
|
@@ -1051,16 +1061,22 @@ var script = defineComponent({
|
|
|
1051
1061
|
componentLibCollapseExpanded: {
|
|
1052
1062
|
type: Array,
|
|
1053
1063
|
default: void 0
|
|
1064
|
+
},
|
|
1065
|
+
data: {
|
|
1066
|
+
type: Array,
|
|
1067
|
+
default: () => []
|
|
1054
1068
|
}
|
|
1055
1069
|
},
|
|
1056
1070
|
emits: {
|
|
1071
|
+
"update:data": null,
|
|
1072
|
+
"setData": (e) => e,
|
|
1073
|
+
"unsetData": null,
|
|
1057
1074
|
"update:componentLibCollapseExpanded": null
|
|
1058
1075
|
},
|
|
1059
1076
|
setup(props, { emit }) {
|
|
1060
|
-
const formItems = ref([]);
|
|
1061
1077
|
const editProp = ref("");
|
|
1062
1078
|
const propToFormItem = computed(() => {
|
|
1063
|
-
return
|
|
1079
|
+
return props.data.reduce((a, c) => {
|
|
1064
1080
|
if (c.prop) {
|
|
1065
1081
|
a[c.prop] = c;
|
|
1066
1082
|
}
|
|
@@ -1093,7 +1109,7 @@ var script = defineComponent({
|
|
|
1093
1109
|
setData(props2, e);
|
|
1094
1110
|
}
|
|
1095
1111
|
};
|
|
1096
|
-
const formItemStr = computed(() => JSON.stringify(
|
|
1112
|
+
const formItemStr = computed(() => JSON.stringify(props.data));
|
|
1097
1113
|
const formItemClip = useClipboard({
|
|
1098
1114
|
source: formItemStr
|
|
1099
1115
|
});
|
|
@@ -1114,12 +1130,11 @@ var script = defineComponent({
|
|
|
1114
1130
|
}
|
|
1115
1131
|
return obj;
|
|
1116
1132
|
}).then((obj) => {
|
|
1117
|
-
|
|
1133
|
+
emit("update:data", obj);
|
|
1118
1134
|
});
|
|
1119
1135
|
};
|
|
1120
1136
|
return {
|
|
1121
1137
|
propToFormItem,
|
|
1122
|
-
formItems,
|
|
1123
1138
|
editProp,
|
|
1124
1139
|
setData,
|
|
1125
1140
|
unsetData,
|
|
@@ -1179,15 +1194,21 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1179
1194
|
createVNode(_component_VkfGroundMain, {
|
|
1180
1195
|
prop: _ctx.editProp,
|
|
1181
1196
|
"onUpdate:prop": _cache[2] || (_cache[2] = ($event) => _ctx.editProp = $event),
|
|
1182
|
-
formItems: _ctx.
|
|
1183
|
-
"onSetData:formItems": _cache[3] || (_cache[3] = ($event) => _ctx
|
|
1184
|
-
"onUnsetData:formItems": _cache[4] || (_cache[4] = ($event) => _ctx
|
|
1185
|
-
},
|
|
1197
|
+
formItems: _ctx.data,
|
|
1198
|
+
"onSetData:formItems": _cache[3] || (_cache[3] = ($event) => _ctx.$emit("setData", $event)),
|
|
1199
|
+
"onUnsetData:formItems": _cache[4] || (_cache[4] = ($event) => _ctx.$emit("unsetData", $event))
|
|
1200
|
+
}, {
|
|
1201
|
+
rendererTemplate: withCtx(() => [
|
|
1202
|
+
renderSlot(_ctx.$slots, "rendererTemplate")
|
|
1203
|
+
]),
|
|
1204
|
+
_: 3
|
|
1205
|
+
}, 8, ["prop", "formItems"])
|
|
1186
1206
|
]),
|
|
1187
|
-
_:
|
|
1207
|
+
_: 3
|
|
1188
1208
|
})
|
|
1189
1209
|
]),
|
|
1190
1210
|
createElementVNode("div", _hoisted_6, [
|
|
1211
|
+
createCommentVNode(" \u901A\u8FC7config \u4FEE\u6539\u6570\u636E\u6E90 \u5355\u9879\u7684\u5185\u5BB9 "),
|
|
1191
1212
|
_ctx.editProp && _ctx.propToFormItem[_ctx.editProp] ? (openBlock(), createBlock(_component_VkfGroundConfig, {
|
|
1192
1213
|
key: 0,
|
|
1193
1214
|
propDisabled: _ctx.configPropDisabled,
|