@fecp/designer 5.2.2 → 5.2.4

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.
@@ -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
- index$1.openDialog(
465
- basic.displayFieldName,
466
- dialog,
467
- context.instance,
468
- context.ctx,
469
- fields,
470
- data
471
- ).then((result) => {
472
- console.log("确定", result);
473
- }).catch(() => {
474
- console.log("取消");
475
- });
476
- return {
477
- success: true,
478
- message: `弹层 ${dialog.name} 已打开`
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,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fecp/designer",
3
- "version": "5.2.2",
3
+ "version": "5.2.4",
4
4
  "main": "lib/packages/designer/index.js",
5
5
  "module": "es/packages/designer/index.mjs",
6
6
  "files": [