@fecp/designer 5.2.2 → 5.2.3
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 +24 -24
- package/es/packages/designer/src/packages/form/aside/index.mjs +1 -0
- package/es/packages/designer/src/packages/form/property/widgets.vue.mjs +98 -74
- package/es/packages/vue/src/components/dialog/DialogRenderer.vue2.mjs +4 -3
- package/es/packages/vue/src/components/dialog/index.mjs +2 -2
- package/es/packages/vue/src/components/forms/form/Form.vue.mjs +16 -2
- package/es/packages/vue/src/components/table/TableColumn.vue.mjs +2 -2
- package/es/packages/vue/src/utils/eventFlow/actionHandlers.mjs +23 -16
- package/lib/designer.css +24 -24
- package/lib/packages/designer/src/packages/form/aside/index.js +1 -0
- package/lib/packages/designer/src/packages/form/property/widgets.vue.js +98 -74
- package/lib/packages/vue/src/components/dialog/DialogRenderer.vue2.js +4 -3
- package/lib/packages/vue/src/components/dialog/index.js +2 -2
- package/lib/packages/vue/src/components/forms/form/Form.vue.js +16 -2
- package/lib/packages/vue/src/components/table/TableColumn.vue.js +2 -2
- package/lib/packages/vue/src/utils/eventFlow/actionHandlers.js +23 -16
- package/package.json +1 -1
|
@@ -289,14 +289,15 @@ const _sfc_main = {
|
|
|
289
289
|
});
|
|
290
290
|
return btnArr;
|
|
291
291
|
});
|
|
292
|
-
function formFooterClick(button) {
|
|
292
|
+
async function formFooterClick(button) {
|
|
293
293
|
var _a;
|
|
294
294
|
const formData = dialogFormRef.value.getFormData();
|
|
295
|
-
handleEvent.value(
|
|
295
|
+
await handleEvent.value(
|
|
296
296
|
formData,
|
|
297
297
|
button,
|
|
298
298
|
(_a = button.eventConfig) == null ? void 0 : _a.find((item) => item.name == "Click")
|
|
299
299
|
);
|
|
300
|
+
emit("confirm");
|
|
300
301
|
}
|
|
301
302
|
return (_ctx, _cache) => {
|
|
302
303
|
const _component_el_button = index$3.ElButton;
|
|
@@ -411,5 +412,5 @@ const _sfc_main = {
|
|
|
411
412
|
};
|
|
412
413
|
}
|
|
413
414
|
};
|
|
414
|
-
const DialogRenderer = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
415
|
+
const DialogRenderer = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-dd10a495"]]);
|
|
415
416
|
exports.default = DialogRenderer;
|
|
@@ -45,12 +45,12 @@ function openDialog(displayField, dialogConfig, instance, componentCtx, fieldsLi
|
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
onConfirm: (data) => {
|
|
48
|
-
resolve(data);
|
|
49
48
|
cleanupDialog();
|
|
49
|
+
resolve(data);
|
|
50
50
|
},
|
|
51
51
|
onCancel: () => {
|
|
52
|
-
reject(new Error("用户取消"));
|
|
53
52
|
cleanupDialog();
|
|
53
|
+
reject(new Error("用户取消"));
|
|
54
54
|
}
|
|
55
55
|
});
|
|
56
56
|
vnode.appContext = instance.appContext;
|
|
@@ -504,9 +504,23 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
504
504
|
result[fieldName] = value.join("|");
|
|
505
505
|
}
|
|
506
506
|
} else if (fieldName && fieldType === "date" && value) {
|
|
507
|
+
const dateValueType = field.dateValueType;
|
|
507
508
|
const valueFormat = valueFormatMap[field.dateType] || "YYYYMMDD";
|
|
508
509
|
const formValueFormat = formValueFormatMap[field.dateType] || "YYYY-MM-DD";
|
|
509
|
-
|
|
510
|
+
switch (dateValueType) {
|
|
511
|
+
case "date":
|
|
512
|
+
result[fieldName] = moment.default(value, formValueFormat).toDate();
|
|
513
|
+
break;
|
|
514
|
+
case "timestamp":
|
|
515
|
+
result[fieldName] = moment.default(value, formValueFormat).valueOf();
|
|
516
|
+
break;
|
|
517
|
+
case "string":
|
|
518
|
+
default:
|
|
519
|
+
result[fieldName] = moment.default(value, formValueFormat).format(
|
|
520
|
+
valueFormat
|
|
521
|
+
);
|
|
522
|
+
break;
|
|
523
|
+
}
|
|
510
524
|
}
|
|
511
525
|
};
|
|
512
526
|
if (fieldsData.value) {
|
|
@@ -668,5 +682,5 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
668
682
|
};
|
|
669
683
|
}
|
|
670
684
|
});
|
|
671
|
-
const _Form = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
685
|
+
const _Form = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-42af7e52"]]);
|
|
672
686
|
exports.default = _Form;
|
|
@@ -257,7 +257,7 @@ const _sfc_main = {
|
|
|
257
257
|
};
|
|
258
258
|
const optColumnWidth = vue.computed(() => {
|
|
259
259
|
const padding = 20;
|
|
260
|
-
const btnWidth =
|
|
260
|
+
const btnWidth = 60;
|
|
261
261
|
if (!props.tableData || props.tableData.length === 0) {
|
|
262
262
|
return props.optBtns.length * btnWidth + padding;
|
|
263
263
|
}
|
|
@@ -379,5 +379,5 @@ const _sfc_main = {
|
|
|
379
379
|
};
|
|
380
380
|
}
|
|
381
381
|
};
|
|
382
|
-
const TableColumn = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
382
|
+
const TableColumn = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-82ffe38c"]]);
|
|
383
383
|
exports.default = TableColumn;
|
|
@@ -461,22 +461,29 @@ async function handleDialog(node, data, fields, context) {
|
|
|
461
461
|
console.error("ui-dialog: 未找到匹配的弹层配置," + (basic == null ? void 0 : basic.dialogId));
|
|
462
462
|
return;
|
|
463
463
|
}
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
464
|
+
try {
|
|
465
|
+
await index$1.openDialog(
|
|
466
|
+
basic.displayFieldName,
|
|
467
|
+
dialog,
|
|
468
|
+
context.instance,
|
|
469
|
+
context.ctx,
|
|
470
|
+
fields,
|
|
471
|
+
data
|
|
472
|
+
);
|
|
473
|
+
return {
|
|
474
|
+
success: true,
|
|
475
|
+
message: "用户已确认",
|
|
476
|
+
shouldShowError: false
|
|
477
|
+
};
|
|
478
|
+
} catch (error) {
|
|
479
|
+
return {
|
|
480
|
+
success: false,
|
|
481
|
+
message: "用户已取消",
|
|
482
|
+
confirmed: false,
|
|
483
|
+
shouldShowError: false
|
|
484
|
+
// 用户取消不提示错误
|
|
485
|
+
};
|
|
486
|
+
}
|
|
480
487
|
}
|
|
481
488
|
const defaultActionHandlers = {
|
|
482
489
|
"page-jump": handlePageJump,
|