@fecp/designer 5.3.8 → 5.3.10
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/es/designer.css +85 -69
- package/es/node_modules/.pnpm/@element-plus_icons-vue@2.3.2_vue@3.5.13_typescript@5.7.3_/node_modules/@element-plus/icons-vue/dist/index.mjs +20 -0
- package/es/packages/designer/package.json.mjs +1 -1
- package/es/packages/designer/src/packages/form/index.vue.mjs +29 -110
- package/es/packages/vue/src/components/forms/form/Form.vue.mjs +7 -4
- package/es/packages/vue/src/components/forms/subForm/SubForm.vue.mjs +11 -2
- package/es/packages/vue/src/components/table/Table.vue.mjs +2 -2
- package/lib/designer.css +85 -69
- package/lib/node_modules/.pnpm/@element-plus_icons-vue@2.3.2_vue@3.5.13_typescript@5.7.3_/node_modules/@element-plus/icons-vue/dist/index.js +20 -0
- package/lib/packages/designer/package.json.js +1 -1
- package/lib/packages/designer/src/packages/form/index.vue.js +32 -113
- package/lib/packages/vue/src/components/forms/form/Form.vue.js +7 -4
- package/lib/packages/vue/src/components/forms/subForm/SubForm.vue.js +11 -2
- package/lib/packages/vue/src/components/table/Table.vue.js +2 -2
- package/package.json +1 -1
|
@@ -2,13 +2,6 @@
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
4
|
/* empty css */
|
|
5
|
-
/* empty css */
|
|
6
|
-
/* empty css */
|
|
7
|
-
/* empty css */
|
|
8
|
-
/* empty css */
|
|
9
|
-
import "../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/theme-chalk/el-dropdown-menu.css.mjs";
|
|
10
|
-
/* empty css */
|
|
11
|
-
/* empty css */
|
|
12
5
|
import { computed, ref, watch, resolveComponent, createElementBlock, openBlock, createVNode, createElementVNode, withCtx, unref, normalizeStyle, createCommentVNode, withModifiers, normalizeClass, createBlock, toDisplayString, createTextVNode, nextTick } from "vue";
|
|
13
6
|
import emitter from "../utils/eventBus.mjs";
|
|
14
7
|
import "../../../../../node_modules/.pnpm/grid-layout-plus@1.1.1_vue@3.5.13_typescript@5.7.3_/node_modules/grid-layout-plus/es/index.mjs";
|
|
@@ -22,7 +15,7 @@ import H2Wrapper from "./components/H2Wrapper.vue.mjs";
|
|
|
22
15
|
import SubForm from "./components/SubForm.vue.mjs";
|
|
23
16
|
import ApprovalHistory from "./components/ApprovalHistory.vue.mjs";
|
|
24
17
|
import SubTable from "./components/SubTable.vue.mjs";
|
|
25
|
-
import { StarFilled as star_filled_default, Star as star_default,
|
|
18
|
+
import { StarFilled as star_filled_default, Star as star_default, Lock as lock_default, Unlock as unlock_default, Delete as delete_default, View as view_default } from "../../../../../node_modules/.pnpm/@element-plus_icons-vue@2.3.2_vue@3.5.13_typescript@5.7.3_/node_modules/@element-plus/icons-vue/dist/index.mjs";
|
|
26
19
|
import { getEditConfigData, setSelectedItem, setHoverItem, getCurrentClass, isSelectedItem } from "../utils/common.mjs";
|
|
27
20
|
import { throttle as eo } from "../../../../../node_modules/.pnpm/@vexip-ui_utils@2.16.4/node_modules/@vexip-ui/utils/dist/index.mjs";
|
|
28
21
|
/* empty css */
|
|
@@ -33,9 +26,6 @@ import { ElScrollbar } from "../../../../../node_modules/.pnpm/element-plus@2.13
|
|
|
33
26
|
import { ElForm } from "../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/form/index.mjs";
|
|
34
27
|
import De from "../../../../../node_modules/.pnpm/grid-layout-plus@1.1.1_vue@3.5.13_typescript@5.7.3_/node_modules/grid-layout-plus/es/components/grid-layout.vue.mjs";
|
|
35
28
|
import { ElIcon } from "../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/icon/index.mjs";
|
|
36
|
-
import { ElDropdown, ElDropdownMenu } from "../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/dropdown/index.mjs";
|
|
37
|
-
import { ElInput } from "../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/input/index.mjs";
|
|
38
|
-
import { ElCheckbox } from "../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/checkbox/index.mjs";
|
|
39
29
|
import { ElDivider } from "../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/divider/index.mjs";
|
|
40
30
|
import { ElMessage } from "../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/message/index.mjs";
|
|
41
31
|
const _hoisted_1 = { class: "form-work-area" };
|
|
@@ -46,22 +36,19 @@ const _hoisted_4 = {
|
|
|
46
36
|
class: "component-toolbar"
|
|
47
37
|
};
|
|
48
38
|
const _hoisted_5 = ["onClick"];
|
|
49
|
-
const _hoisted_6 =
|
|
50
|
-
const _hoisted_7 =
|
|
51
|
-
const _hoisted_8 =
|
|
52
|
-
const _hoisted_9 = { class: "
|
|
53
|
-
const _hoisted_10 =
|
|
54
|
-
const _hoisted_11 = ["onClick"];
|
|
55
|
-
const _hoisted_12 = { class: "status-tags" };
|
|
56
|
-
const _hoisted_13 = {
|
|
39
|
+
const _hoisted_6 = ["onClick"];
|
|
40
|
+
const _hoisted_7 = ["onClick"];
|
|
41
|
+
const _hoisted_8 = ["onClick"];
|
|
42
|
+
const _hoisted_9 = { class: "status-tags" };
|
|
43
|
+
const _hoisted_10 = {
|
|
57
44
|
key: 0,
|
|
58
45
|
class: "field-name-tag"
|
|
59
46
|
};
|
|
60
|
-
const
|
|
47
|
+
const _hoisted_11 = {
|
|
61
48
|
key: 1,
|
|
62
49
|
class: "status-tag disabled-tag"
|
|
63
50
|
};
|
|
64
|
-
const
|
|
51
|
+
const _hoisted_12 = {
|
|
65
52
|
key: 2,
|
|
66
53
|
class: "status-tag readonly-tag"
|
|
67
54
|
};
|
|
@@ -317,13 +304,7 @@ const _sfc_main = {
|
|
|
317
304
|
emitter.on("resizeEvent", () => {
|
|
318
305
|
gridLayout.value.resizeEvent();
|
|
319
306
|
});
|
|
320
|
-
|
|
321
|
-
function getDropdownVisible(itemId) {
|
|
322
|
-
return dropdownVisibleMap.value.get(itemId) || false;
|
|
323
|
-
}
|
|
324
|
-
function setDropdownVisible(itemId, visible) {
|
|
325
|
-
dropdownVisibleMap.value.set(itemId, visible);
|
|
326
|
-
}
|
|
307
|
+
ref(/* @__PURE__ */ new Map());
|
|
327
308
|
const isDragging = computed(() => {
|
|
328
309
|
var _a;
|
|
329
310
|
return ((_a = gridLayout.value) == null ? void 0 : _a.state.isDragging) || false;
|
|
@@ -343,10 +324,6 @@ const _sfc_main = {
|
|
|
343
324
|
});
|
|
344
325
|
return (_ctx, _cache) => {
|
|
345
326
|
const _component_el_icon = ElIcon;
|
|
346
|
-
const _component_el_input = ElInput;
|
|
347
|
-
const _component_el_checkbox = ElCheckbox;
|
|
348
|
-
const _component_el_dropdown_menu = ElDropdownMenu;
|
|
349
|
-
const _component_el_dropdown = ElDropdown;
|
|
350
327
|
const _component_Hide = resolveComponent("Hide");
|
|
351
328
|
const _component_el_divider = ElDivider;
|
|
352
329
|
const _component_el_form = ElForm;
|
|
@@ -411,76 +388,18 @@ const _sfc_main = {
|
|
|
411
388
|
_: 2
|
|
412
389
|
}, 1024)
|
|
413
390
|
], 10, _hoisted_5),
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
_cache[3] || (_cache[3] = createElementVNode("span", { class: "setting-label" }, "标题:", -1)),
|
|
427
|
-
createVNode(_component_el_input, {
|
|
428
|
-
modelValue: item.component.label,
|
|
429
|
-
"onUpdate:modelValue": ($event) => item.component.label = $event,
|
|
430
|
-
size: "small",
|
|
431
|
-
class: "setting-input"
|
|
432
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
433
|
-
]),
|
|
434
|
-
createElementVNode("div", _hoisted_8, [
|
|
435
|
-
_cache[4] || (_cache[4] = createElementVNode("span", { class: "setting-label" }, "字段:", -1)),
|
|
436
|
-
createVNode(_component_el_input, {
|
|
437
|
-
modelValue: item.component.fieldName,
|
|
438
|
-
"onUpdate:modelValue": ($event) => item.component.fieldName = $event,
|
|
439
|
-
size: "small",
|
|
440
|
-
class: "setting-input"
|
|
441
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
442
|
-
]),
|
|
443
|
-
createElementVNode("div", _hoisted_9, [
|
|
444
|
-
createVNode(_component_el_checkbox, {
|
|
445
|
-
modelValue: item.component.required,
|
|
446
|
-
"onUpdate:modelValue": ($event) => item.component.required = $event,
|
|
447
|
-
label: "必填",
|
|
448
|
-
size: "small"
|
|
449
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
450
|
-
createVNode(_component_el_checkbox, {
|
|
451
|
-
modelValue: item.component.readOnly,
|
|
452
|
-
"onUpdate:modelValue": ($event) => item.component.readOnly = $event,
|
|
453
|
-
label: "只读",
|
|
454
|
-
size: "small"
|
|
455
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
456
|
-
createVNode(_component_el_checkbox, {
|
|
457
|
-
modelValue: item.component.disabled,
|
|
458
|
-
"onUpdate:modelValue": ($event) => item.component.disabled = $event,
|
|
459
|
-
label: "禁用",
|
|
460
|
-
size: "small"
|
|
461
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
462
|
-
])
|
|
463
|
-
])
|
|
464
|
-
]),
|
|
465
|
-
_: 2
|
|
466
|
-
}, 1024)) : createCommentVNode("", true)
|
|
467
|
-
]),
|
|
468
|
-
default: withCtx(() => [
|
|
469
|
-
item.component.fieldType != "blank" ? (openBlock(), createElementBlock("span", {
|
|
470
|
-
key: 0,
|
|
471
|
-
class: normalizeClass(["toolbar-btn settings-btn", { "is-active": getDropdownVisible(item.id) }]),
|
|
472
|
-
title: "快捷设置"
|
|
473
|
-
}, [
|
|
474
|
-
createVNode(_component_el_icon, null, {
|
|
475
|
-
default: withCtx(() => [
|
|
476
|
-
createVNode(unref(setting_default))
|
|
477
|
-
]),
|
|
478
|
-
_: 1
|
|
479
|
-
})
|
|
480
|
-
], 2)) : createCommentVNode("", true)
|
|
481
|
-
]),
|
|
482
|
-
_: 2
|
|
483
|
-
}, 1032, ["popper-class", "onVisibleChange"]),
|
|
391
|
+
createElementVNode("span", {
|
|
392
|
+
class: normalizeClass(["toolbar-btn disabled-btn", { "is-disabled": item.component.disabled }]),
|
|
393
|
+
title: "设置只读",
|
|
394
|
+
onClick: withModifiers(($event) => item.component.disabled = !item.component.disabled, ["stop"])
|
|
395
|
+
}, [
|
|
396
|
+
createVNode(_component_el_icon, null, {
|
|
397
|
+
default: withCtx(() => [
|
|
398
|
+
item.component.disabled ? (openBlock(), createBlock(unref(lock_default), { key: 0 })) : (openBlock(), createBlock(unref(unlock_default), { key: 1 }))
|
|
399
|
+
]),
|
|
400
|
+
_: 2
|
|
401
|
+
}, 1024)
|
|
402
|
+
], 10, _hoisted_6),
|
|
484
403
|
createElementVNode("span", {
|
|
485
404
|
class: "toolbar-btn settings-btn",
|
|
486
405
|
title: "放进隐藏域",
|
|
@@ -492,7 +411,7 @@ const _sfc_main = {
|
|
|
492
411
|
]),
|
|
493
412
|
_: 1
|
|
494
413
|
})
|
|
495
|
-
], 8,
|
|
414
|
+
], 8, _hoisted_7),
|
|
496
415
|
createElementVNode("span", {
|
|
497
416
|
class: "toolbar-btn delete-btn",
|
|
498
417
|
title: "删除组件",
|
|
@@ -504,18 +423,18 @@ const _sfc_main = {
|
|
|
504
423
|
]),
|
|
505
424
|
_: 1
|
|
506
425
|
})
|
|
507
|
-
], 8,
|
|
426
|
+
], 8, _hoisted_8)
|
|
508
427
|
])) : createCommentVNode("", true),
|
|
509
|
-
createElementVNode("div",
|
|
510
|
-
editConfigData.value.showFieldName && item.component.fieldName ? (openBlock(), createElementBlock("div",
|
|
511
|
-
item.component.disabled ? (openBlock(), createElementBlock("div",
|
|
428
|
+
createElementVNode("div", _hoisted_9, [
|
|
429
|
+
editConfigData.value.showFieldName && item.component.fieldName ? (openBlock(), createElementBlock("div", _hoisted_10, toDisplayString(item.component.fieldType == "blank" ? "空白占位" : item.component.fieldName), 1)) : createCommentVNode("", true),
|
|
430
|
+
item.component.disabled ? (openBlock(), createElementBlock("div", _hoisted_11, [
|
|
512
431
|
createVNode(_component_el_icon, null, {
|
|
513
432
|
default: withCtx(() => [
|
|
514
433
|
createVNode(unref(lock_default))
|
|
515
434
|
]),
|
|
516
435
|
_: 1
|
|
517
436
|
})
|
|
518
|
-
])) : item.component.readOnly ? (openBlock(), createElementBlock("div",
|
|
437
|
+
])) : item.component.readOnly ? (openBlock(), createElementBlock("div", _hoisted_12, [
|
|
519
438
|
createVNode(_component_el_icon, null, {
|
|
520
439
|
default: withCtx(() => [
|
|
521
440
|
createVNode(unref(view_default))
|
|
@@ -552,7 +471,7 @@ const _sfc_main = {
|
|
|
552
471
|
key: 5,
|
|
553
472
|
"border-style": "dashed"
|
|
554
473
|
}, {
|
|
555
|
-
default: withCtx(() => _cache[
|
|
474
|
+
default: withCtx(() => _cache[3] || (_cache[3] = [
|
|
556
475
|
createTextVNode(" 此处为分割线,阻止下方组件自动向上补齐,解析时不显示 ")
|
|
557
476
|
])),
|
|
558
477
|
_: 1
|
|
@@ -580,7 +499,7 @@ const _sfc_main = {
|
|
|
580
499
|
};
|
|
581
500
|
}
|
|
582
501
|
};
|
|
583
|
-
const formWorkArea = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
502
|
+
const formWorkArea = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-1d0d8388"]]);
|
|
584
503
|
export {
|
|
585
504
|
formWorkArea as default
|
|
586
505
|
};
|
|
@@ -207,7 +207,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
207
207
|
}
|
|
208
208
|
});
|
|
209
209
|
}
|
|
210
|
-
formData.value = { ...defaultData, ...props.modelValue };
|
|
210
|
+
formData.value = { ...defaultData, ...setFormData(props.modelValue, true) };
|
|
211
211
|
formRules.value = rules;
|
|
212
212
|
};
|
|
213
213
|
const loadFieldDataSources = async () => {
|
|
@@ -614,7 +614,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
614
614
|
}
|
|
615
615
|
return result;
|
|
616
616
|
};
|
|
617
|
-
const setFormData = (data) => {
|
|
617
|
+
const setFormData = (data, flag = false) => {
|
|
618
618
|
const processedData = { ...data };
|
|
619
619
|
const processField = (field) => {
|
|
620
620
|
const fieldName = field.fieldName;
|
|
@@ -659,6 +659,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
659
659
|
processField(field);
|
|
660
660
|
});
|
|
661
661
|
}
|
|
662
|
+
if (flag) {
|
|
663
|
+
return processedData;
|
|
664
|
+
}
|
|
662
665
|
Object.assign(formData.value, processedData);
|
|
663
666
|
};
|
|
664
667
|
onMounted(() => {
|
|
@@ -848,7 +851,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
848
851
|
applyLinkageEffectsForChangedFields(changedFields);
|
|
849
852
|
}
|
|
850
853
|
prevFormData.value = { ...newVal };
|
|
851
|
-
emit("update:modelValue",
|
|
854
|
+
emit("update:modelValue", getFormData());
|
|
852
855
|
},
|
|
853
856
|
{ deep: true }
|
|
854
857
|
);
|
|
@@ -968,7 +971,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
968
971
|
};
|
|
969
972
|
}
|
|
970
973
|
});
|
|
971
|
-
const _Form = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
974
|
+
const _Form = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-bf77b845"]]);
|
|
972
975
|
export {
|
|
973
976
|
_Form as default
|
|
974
977
|
};
|
|
@@ -2,6 +2,7 @@ import { inject, computed, createElementBlock, openBlock, Fragment, createCommen
|
|
|
2
2
|
import { Form } from "../form/index.mjs";
|
|
3
3
|
import { SubTitle } from "../subTitle/index.mjs";
|
|
4
4
|
import { H2 } from "../h2/index.mjs";
|
|
5
|
+
import { cloneDeep } from "../../../utils/common.mjs";
|
|
5
6
|
const _hoisted_1 = {
|
|
6
7
|
key: 0,
|
|
7
8
|
style: { "height": "60px", "position": "relative" }
|
|
@@ -50,6 +51,14 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
50
51
|
inject("rowHeight");
|
|
51
52
|
inject("gridLayout");
|
|
52
53
|
const setFormItemHeight = inject("setFormItemHeight");
|
|
54
|
+
const subFormData = computed({
|
|
55
|
+
get: () => {
|
|
56
|
+
return cloneDeep(formData.value);
|
|
57
|
+
},
|
|
58
|
+
set: (val) => {
|
|
59
|
+
formData.value = { ...formData.value, ...val };
|
|
60
|
+
}
|
|
61
|
+
});
|
|
53
62
|
const templateKey = computed(() => {
|
|
54
63
|
if (props.config.formSource == "dynamic") {
|
|
55
64
|
const dynamicSubFormKey = props.config.dynamicSubFormKey;
|
|
@@ -111,8 +120,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
111
120
|
onLoaded: subFormLoaded,
|
|
112
121
|
canPageEvent: __props.config.triggerSubFormPageEvent,
|
|
113
122
|
initFormMode: __props.formMode,
|
|
114
|
-
modelValue: unref(
|
|
115
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(
|
|
123
|
+
modelValue: unref(subFormData),
|
|
124
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(subFormData) ? subFormData.value = $event : null)
|
|
116
125
|
}, null, 8, ["templateKey", "canPageEvent", "initFormMode", "modelValue"])
|
|
117
126
|
], 64);
|
|
118
127
|
};
|
|
@@ -117,7 +117,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
117
117
|
const configLoading = ref(true);
|
|
118
118
|
const localConfig = ref({});
|
|
119
119
|
const fieldsData = ref({});
|
|
120
|
-
const hiddenFormData =
|
|
120
|
+
const hiddenFormData = computed(() => props.initHiddenData);
|
|
121
121
|
const dataSourceOptions = ref({});
|
|
122
122
|
const dictionaryOptions = ref({});
|
|
123
123
|
const displayData = computed(() => {
|
|
@@ -645,7 +645,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
645
645
|
};
|
|
646
646
|
}
|
|
647
647
|
});
|
|
648
|
-
const _Table = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
648
|
+
const _Table = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-be17662c"]]);
|
|
649
649
|
export {
|
|
650
650
|
_Table as default
|
|
651
651
|
};
|