@fecp/designer 5.4.19 → 5.4.20
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/package.json.mjs +1 -1
- package/es/designer/src/components/DialogSelect.vue.mjs +122 -0
- package/es/designer/src/packages/dialog/index.vue.mjs +58 -41
- package/es/designer/src/packages/dialogGlobal/index.vue.mjs +61 -42
- package/es/designer/src/packages/event/pageEvent.vue.mjs +18 -3
- package/es/designer/src/packages/eventFlow/dialog/action/Dialog.vue.mjs +9 -29
- package/es/designer/src/packages/form/aside/index.mjs +1 -0
- package/es/designer/src/packages/form/property/subForm.vue.mjs +12 -14
- package/es/designer/src/packages/form/property/widgets.vue.mjs +27 -25
- package/es/designer/src/packages/table/headerBtn.vue.mjs +2 -2
- package/es/designer.css +964 -961
- package/es/packages/mobile/src/components/base/card/Card.vue.mjs +2 -2
- package/es/packages/vue/src/components/dialog/DialogRenderer.vue2.mjs +34 -23
- package/es/packages/vue/src/components/forms/subForm/SubForm.vue.mjs +25 -2
- package/lib/designer/package.json.js +1 -1
- package/lib/designer/src/components/DialogSelect.vue.js +122 -0
- package/lib/designer/src/packages/dialog/index.vue.js +58 -41
- package/lib/designer/src/packages/dialogGlobal/index.vue.js +61 -42
- package/lib/designer/src/packages/event/pageEvent.vue.js +26 -11
- package/lib/designer/src/packages/eventFlow/dialog/action/Dialog.vue.js +11 -31
- package/lib/designer/src/packages/form/aside/index.js +1 -0
- package/lib/designer/src/packages/form/property/subForm.vue.js +12 -14
- package/lib/designer/src/packages/form/property/widgets.vue.js +22 -20
- package/lib/designer/src/packages/table/headerBtn.vue.js +2 -2
- package/lib/designer.css +964 -961
- package/lib/packages/mobile/src/components/base/card/Card.vue.js +2 -2
- package/lib/packages/vue/src/components/dialog/DialogRenderer.vue2.js +33 -22
- package/lib/packages/vue/src/components/forms/subForm/SubForm.vue.js +25 -2
- package/package.json +1 -1
|
@@ -8,13 +8,13 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
8
8
|
;/* empty css */
|
|
9
9
|
;/* empty css */
|
|
10
10
|
const vue = require("vue");
|
|
11
|
-
;/* empty css */
|
|
12
|
-
const _pluginVue_exportHelper = require("../../../../../../_virtual/_plugin-vue_export-helper.js");
|
|
13
11
|
;/* empty css */
|
|
14
12
|
;/* empty css */
|
|
15
13
|
;/* empty css */
|
|
16
14
|
;/* empty css */
|
|
17
15
|
;/* empty css */
|
|
16
|
+
;/* empty css */
|
|
17
|
+
const _pluginVue_exportHelper = require("../../../../../../_virtual/_plugin-vue_export-helper.js");
|
|
18
18
|
const index$1 = require("../../../../../../node_modules/vant/es/swipe-cell/index.js");
|
|
19
19
|
const functionCall = require("../../../../../../node_modules/vant/es/dialog/function-call.js");
|
|
20
20
|
require("../../../../../../node_modules/vant/es/dialog/index.js");
|
|
@@ -127,6 +127,9 @@ const _sfc_main = {
|
|
|
127
127
|
},
|
|
128
128
|
(val) => {
|
|
129
129
|
dialogVisible.value = val;
|
|
130
|
+
if (val) {
|
|
131
|
+
loadComponentByPath(currentDialogConfig.value.componentPath);
|
|
132
|
+
}
|
|
130
133
|
},
|
|
131
134
|
{
|
|
132
135
|
immediate: true
|
|
@@ -135,19 +138,27 @@ const _sfc_main = {
|
|
|
135
138
|
vue.watch(dialogVisible, (val) => {
|
|
136
139
|
emit("update:modelValue", val);
|
|
137
140
|
});
|
|
138
|
-
const
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
141
|
+
const componentParams = vue.computed(() => {
|
|
142
|
+
var _a;
|
|
143
|
+
const params = parseRouteParams.parseRouteParams(
|
|
144
|
+
((_a = currentDialogConfig.value) == null ? void 0 : _a.componentParams) || [],
|
|
145
|
+
props.formData,
|
|
146
|
+
props.fieldsList
|
|
147
|
+
);
|
|
148
|
+
return params;
|
|
149
|
+
});
|
|
150
|
+
const currentComponent = vue.ref(null);
|
|
151
|
+
const loadComponentByPath = (path) => {
|
|
152
|
+
const route = ctx.$router.getRoutes().find((item) => item.path === path);
|
|
153
|
+
if (!route) return;
|
|
154
|
+
const comp = route.components.default;
|
|
155
|
+
if (!comp) return;
|
|
156
|
+
if (typeof comp === "function") {
|
|
157
|
+
comp().then((module2) => {
|
|
158
|
+
currentComponent.value = module2.default;
|
|
159
|
+
});
|
|
160
|
+
} else {
|
|
161
|
+
currentComponent.value = comp;
|
|
151
162
|
}
|
|
152
163
|
};
|
|
153
164
|
const handleSubmit = (data) => {
|
|
@@ -318,7 +329,12 @@ const _sfc_main = {
|
|
|
318
329
|
return (_ctx, _cache) => {
|
|
319
330
|
const _component_el_button = index$3.ElButton;
|
|
320
331
|
const _component_el_dialog = index.ElDialog;
|
|
321
|
-
return vue.openBlock(), vue.createBlock(
|
|
332
|
+
return __props.dialogConfig.componentIsDialog ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(currentComponent.value), vue.mergeProps({ key: 0 }, componentParams.value, {
|
|
333
|
+
formData: __props.formData,
|
|
334
|
+
onClose: handleClose,
|
|
335
|
+
onSubmit: handleSubmit
|
|
336
|
+
}), null, 16, ["formData"])) : (vue.openBlock(), vue.createBlock(_component_el_dialog, {
|
|
337
|
+
key: 1,
|
|
322
338
|
modelValue: dialogVisible.value,
|
|
323
339
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => dialogVisible.value = $event),
|
|
324
340
|
width: dialogWidth.value,
|
|
@@ -413,20 +429,15 @@ const _sfc_main = {
|
|
|
413
429
|
ref_key: "dialogFormRef",
|
|
414
430
|
ref: dialogFormRef
|
|
415
431
|
}, null, 8, ["templateKey", "modelValue", "initFormMode"])) : ((_d = __props.dialogConfig) == null ? void 0 : _d.contentSource) === "component" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
|
|
416
|
-
|
|
417
|
-
key: 0,
|
|
418
|
-
"dialog-params": __props.dialogConfig.dialogParams,
|
|
419
|
-
onClose: handleClose,
|
|
420
|
-
onSubmit: handleSubmit
|
|
421
|
-
}, null, 40, ["dialog-params"])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, " 组件加载失败,请检查组件路径: " + vue.toDisplayString((_e = __props.dialogConfig) == null ? void 0 : _e.componentPath), 1))
|
|
432
|
+
currentComponent.value ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(currentComponent.value), vue.normalizeProps(vue.mergeProps({ key: 0 }, componentParams.value)), null, 16)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, " 组件加载失败,请检查组件路径: " + vue.toDisplayString((_e = __props.dialogConfig) == null ? void 0 : _e.componentPath), 1))
|
|
422
433
|
], 64)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_3, "请配置弹层内容"))
|
|
423
434
|
], 6)
|
|
424
435
|
];
|
|
425
436
|
}),
|
|
426
437
|
_: 1
|
|
427
|
-
}, 8, ["modelValue", "width"]);
|
|
438
|
+
}, 8, ["modelValue", "width"]));
|
|
428
439
|
};
|
|
429
440
|
}
|
|
430
441
|
};
|
|
431
|
-
const DialogRenderer = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
442
|
+
const DialogRenderer = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-6b46adf3"]]);
|
|
432
443
|
exports.default = DialogRenderer;
|
|
@@ -5,6 +5,7 @@ const index$2 = require("../form/index.js");
|
|
|
5
5
|
const index$1 = require("../subTitle/index.js");
|
|
6
6
|
const index = require("../h2/index.js");
|
|
7
7
|
const common = require("../../../utils/common.js");
|
|
8
|
+
const parseRouteParams = require("../../../utils/parseRouteParams.js");
|
|
8
9
|
const _hoisted_1 = {
|
|
9
10
|
key: 0,
|
|
10
11
|
style: { "height": "60px", "position": "relative" }
|
|
@@ -55,11 +56,33 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
55
56
|
const setFormItemHeight = vue.inject("setFormItemHeight");
|
|
56
57
|
const subFormData = vue.computed({
|
|
57
58
|
get: () => {
|
|
59
|
+
if (props.config.dataSourceFrom == "self") {
|
|
60
|
+
return common.cloneDeep(subFormParams.value);
|
|
61
|
+
}
|
|
58
62
|
return common.cloneDeep(formData.value);
|
|
59
63
|
},
|
|
60
64
|
set: (val) => {
|
|
61
|
-
|
|
65
|
+
if (props.config.dataSourceFrom != "self") {
|
|
66
|
+
formData.value = { ...formData.value, ...val };
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
const fieldList = vue.computed(() => {
|
|
71
|
+
return [
|
|
72
|
+
...props.localConfig.fieldsData.map((item) => item.component),
|
|
73
|
+
...props.localConfig.hiddenFields
|
|
74
|
+
];
|
|
75
|
+
});
|
|
76
|
+
const subFormParams = vue.computed(() => {
|
|
77
|
+
if (props.config.dataSourceFrom == "self") {
|
|
78
|
+
const params = parseRouteParams.parseRouteParams(
|
|
79
|
+
props.config.subFormParams,
|
|
80
|
+
formData.value,
|
|
81
|
+
fieldList.value
|
|
82
|
+
);
|
|
83
|
+
return params;
|
|
62
84
|
}
|
|
85
|
+
return {};
|
|
63
86
|
});
|
|
64
87
|
const templateKey = vue.computed(() => {
|
|
65
88
|
if (props.config.formSource == "dynamic") {
|
|
@@ -128,7 +151,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
128
151
|
templateKey: vue.unref(templateKey),
|
|
129
152
|
isSubForm: "",
|
|
130
153
|
onLayoutUpdated: subFormLoaded,
|
|
131
|
-
canPageEvent: __props.config.
|
|
154
|
+
canPageEvent: __props.config.dataSourceFrom == "self",
|
|
132
155
|
initFormMode: __props.formMode,
|
|
133
156
|
modelValue: vue.unref(subFormData),
|
|
134
157
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.isRef(subFormData) ? subFormData.value = $event : null)
|