@yugu-ui/flow-ui 0.1.11 → 0.1.13

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/dist/index.js CHANGED
@@ -101,7 +101,7 @@ var _hoisted_1$17 = {
101
101
  class: "fcc-empty"
102
102
  };
103
103
  var _hoisted_2$13 = ["onMousedown"];
104
- var _hoisted_3$10 = { class: "fcc-field__index" };
104
+ var _hoisted_3$11 = { class: "fcc-field__index" };
105
105
  var _hoisted_4$8 = { class: "fcc-field__tags" };
106
106
  var _hoisted_5$7 = {
107
107
  key: 0,
@@ -460,7 +460,7 @@ var FlowConfigField_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ *
460
460
  r: "1.4"
461
461
  })
462
462
  ], -1)])], 40, _hoisted_2$13),
463
- createElementVNode("span", _hoisted_3$10, toDisplayString(index + 1), 1),
463
+ createElementVNode("span", _hoisted_3$11, toDisplayString(index + 1), 1),
464
464
  createElementVNode("span", { class: normalizeClass(["fcc-field__name", { "is-empty": !item.label }]) }, toDisplayString(item.label || "未命名字段"), 3),
465
465
  createElementVNode("span", { class: normalizeClass(["fcc-field__key", { "is-empty": !item.key }]) }, toDisplayString(item.key), 3),
466
466
  createElementVNode("span", _hoisted_4$8, [item.condition ? (openBlock(), createElementBlock("span", _hoisted_5$7, toDisplayString(typeLabel(item.conditionType)), 1)) : createCommentVNode("", true), item.condition && item.conditionType === "select" ? (openBlock(), createElementBlock("span", {
@@ -614,7 +614,7 @@ var FlowConfigField_default = /* @__PURE__ */ _plugin_vue_export_helper_default(
614
614
  //#region src/config/FlowConfigFlow/components/FlowIcon.vue?vue&type=script&setup=true&lang.ts
615
615
  var _hoisted_1$16 = ["width", "height"];
616
616
  var _hoisted_2$12 = ["d"];
617
- var _hoisted_3$9 = [
617
+ var _hoisted_3$10 = [
618
618
  "cx",
619
619
  "cy",
620
620
  "r"
@@ -721,7 +721,7 @@ var FlowIcon_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__P
721
721
  cx: seg.cx,
722
722
  cy: seg.cy,
723
723
  r: seg.r
724
- }, null, 8, _hoisted_3$9)) : seg.t === "rect" ? (openBlock(), createElementBlock("rect", {
724
+ }, null, 8, _hoisted_3$10)) : seg.t === "rect" ? (openBlock(), createElementBlock("rect", {
725
725
  key: 2,
726
726
  x: seg.x,
727
727
  y: seg.y,
@@ -2843,7 +2843,7 @@ function useOverflowTags(options) {
2843
2843
  //#region src/person-selector/index.vue?vue&type=script&setup=true&lang.ts
2844
2844
  var _hoisted_1$15 = { class: "person-selector" };
2845
2845
  var _hoisted_2$11 = { class: "person-selector__tag-name" };
2846
- var _hoisted_3$8 = ["onClick"];
2846
+ var _hoisted_3$9 = ["onClick"];
2847
2847
  var _hoisted_4$6 = {
2848
2848
  key: 0,
2849
2849
  class: "person-selector__tag person-selector__tag--more"
@@ -3177,7 +3177,7 @@ var person_selector_default = /* @__PURE__ */ _plugin_vue_export_helper_default(
3177
3177
  createElementVNode("span", {
3178
3178
  class: "person-selector__tag-close",
3179
3179
  onClick: withModifiers(($event) => remove(item), ["stop"])
3180
- }, "×", 8, _hoisted_3$8)
3180
+ }, "×", 8, _hoisted_3$9)
3181
3181
  ])), [[vShow, idx < unref(visibleCount)]]);
3182
3182
  }), 128)), unref(overflowCount) > 0 ? (openBlock(), createElementBlock("span", _hoisted_4$6, " +" + toDisplayString(unref(overflowCount)), 1)) : createCommentVNode("", true)], 64)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(unref(resolvedSelected), (item) => {
3183
3183
  return openBlock(), createElementBlock("span", {
@@ -3689,7 +3689,7 @@ var _hoisted_2$10 = {
3689
3689
  key: 0,
3690
3690
  class: "cond__empty"
3691
3691
  };
3692
- var _hoisted_3$7 = { class: "cond__group" };
3692
+ var _hoisted_3$8 = { class: "cond__group" };
3693
3693
  var _hoisted_4$5 = { class: "cond__group-head" };
3694
3694
  var _hoisted_5$4 = { class: "cond__group-tag" };
3695
3695
  var _hoisted_6$2 = { class: "cond__group-head-right" };
@@ -3792,7 +3792,7 @@ var ConditionConfig_default = /* @__PURE__ */ _plugin_vue_export_helper_default(
3792
3792
  onClick: addGroup
3793
3793
  }, "+ 添加条件")])) : createCommentVNode("", true),
3794
3794
  (openBlock(true), createElementBlock(Fragment, null, renderList(__props.config.conditionGroups, (group, gi) => {
3795
- return openBlock(), createElementBlock(Fragment, { key: gi }, [createElementVNode("div", _hoisted_3$7, [createElementVNode("div", _hoisted_4$5, [createElementVNode("div", _hoisted_5$4, "条件组 " + toDisplayString(gi + 1), 1), createElementVNode("div", _hoisted_6$2, [_cache[2] || (_cache[2] = createElementVNode("span", { class: "cond__and-hint" }, "组内条件取「且」", -1)), createVNode(_component_NButton, {
3795
+ return openBlock(), createElementBlock(Fragment, { key: gi }, [createElementVNode("div", _hoisted_3$8, [createElementVNode("div", _hoisted_4$5, [createElementVNode("div", _hoisted_5$4, "条件组 " + toDisplayString(gi + 1), 1), createElementVNode("div", _hoisted_6$2, [_cache[2] || (_cache[2] = createElementVNode("span", { class: "cond__and-hint" }, "组内条件取「且」", -1)), createVNode(_component_NButton, {
3796
3796
  quaternary: "",
3797
3797
  type: "error",
3798
3798
  size: "small",
@@ -4151,7 +4151,7 @@ var _hoisted_1$13 = {
4151
4151
  class: "fnode fnode--add-condition"
4152
4152
  };
4153
4153
  var _hoisted_2$9 = { class: "fnode__icon" };
4154
- var _hoisted_3$6 = { class: "fnode__body" };
4154
+ var _hoisted_3$7 = { class: "fnode__body" };
4155
4155
  var _hoisted_4$4 = { class: "fnode__desc" };
4156
4156
  var _hoisted_5$3 = {
4157
4157
  key: 1,
@@ -4344,7 +4344,7 @@ var FlowNodeCard_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/*
4344
4344
  size: 18,
4345
4345
  color: "#fff"
4346
4346
  }, null, 8, ["name"])]),
4347
- createElementVNode("div", _hoisted_3$6, [titleOverflow.value ? (openBlock(), createBlock(_component_NTooltip, {
4347
+ createElementVNode("div", _hoisted_3$7, [titleOverflow.value ? (openBlock(), createBlock(_component_NTooltip, {
4348
4348
  key: 0,
4349
4349
  placement: "top",
4350
4350
  delay: 300
@@ -4413,7 +4413,11 @@ var FlowNodeCard_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/*
4413
4413
  //#endregion
4414
4414
  //#region src/config/FlowConfigFlow/index.vue?vue&type=script&setup=true&lang.ts
4415
4415
  var _hoisted_1$12 = { class: "flow-config-flow" };
4416
- var _hoisted_2$8 = ["onClick"];
4416
+ var _hoisted_2$8 = {
4417
+ key: 0,
4418
+ class: "flow-config-flow__hint"
4419
+ };
4420
+ var _hoisted_3$6 = ["onClick"];
4417
4421
  var x6SetupDone = false;
4418
4422
  var teleportContainerCache;
4419
4423
  /** X6 环境一次性装配:仅在首次渲染 FlowConfigFlow 时执行(时序与原模块加载等价——均先于画布初始化) */
@@ -4479,6 +4483,13 @@ var FlowConfigFlow_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/
4479
4483
  graph?.zoomTo(1);
4480
4484
  fitStartToTop(graph, false);
4481
4485
  };
4486
+ /** 画布操作提示显隐;关闭状态持久化,避免每次进入重复打扰 */
4487
+ const PAN_HINT_STORAGE_KEY = "flow_ui_canvas_pan_hint_dismissed";
4488
+ const panHintVisible = ref(localStorage.getItem(PAN_HINT_STORAGE_KEY) !== "1");
4489
+ const dismissPanHint = () => {
4490
+ panHintVisible.value = false;
4491
+ localStorage.setItem(PAN_HINT_STORAGE_KEY, "1");
4492
+ };
4482
4493
  /** 当前点击「+」按钮对应的连线两端节点 id(afterGroup:组出口按钮,插入到整组之后) */
4483
4494
  let pendingInsert = null;
4484
4495
  /** 可选的节点类型列表(审批人 / 抄送人 / 条件分支) */
@@ -4613,9 +4624,14 @@ var FlowConfigFlow_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/
4613
4624
  class: normalizeClass(["flow-config-flow__zoom", { "flow-config-flow__zoom--reset": zoomPercent.value !== 100 }]),
4614
4625
  onClick: handleZoomReset
4615
4626
  }, toDisplayString(zoomPercent.value) + "% ", 3),
4627
+ panHintVisible.value ? (openBlock(), createElementBlock("div", _hoisted_2$8, [_cache[0] || (_cache[0] = createElementVNode("span", null, "按住左键拖拽平移画布 · 滚轮缩放", -1)), createElementVNode("button", {
4628
+ type: "button",
4629
+ class: "flow-config-flow__hint-close",
4630
+ onClick: dismissPanHint
4631
+ }, "×")])) : createCommentVNode("", true),
4616
4632
  createVNode(unref(TeleportContainer)),
4617
4633
  addMenu.visible ? (openBlock(), createElementBlock("div", {
4618
- key: 0,
4634
+ key: 1,
4619
4635
  class: "flow-config-flow__menu",
4620
4636
  style: normalizeStyle({
4621
4637
  left: `${addMenu.x}px`,
@@ -4630,7 +4646,7 @@ var FlowConfigFlow_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/
4630
4646
  name: opt.icon,
4631
4647
  size: 16,
4632
4648
  color: "var(--fc-text-color-secondary)"
4633
- }, null, 8, ["name"]), createElementVNode("span", null, toDisplayString(opt.label), 1)], 8, _hoisted_2$8);
4649
+ }, null, 8, ["name"]), createElementVNode("span", null, toDisplayString(opt.label), 1)], 8, _hoisted_3$6);
4634
4650
  }), 128))], 4)) : createCommentVNode("", true),
4635
4651
  createVNode(NodeConfigDrawer_default, {
4636
4652
  visible: unref(drawerVisible),
@@ -4650,7 +4666,7 @@ var FlowConfigFlow_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/
4650
4666
  ]);
4651
4667
  };
4652
4668
  }
4653
- }), [["__scopeId", "data-v-da20dabb"]]);
4669
+ }), [["__scopeId", "data-v-c3fa1fc2"]]);
4654
4670
  //#endregion
4655
4671
  //#region src/config/FlowConfigMore.vue?vue&type=script&setup=true&lang.ts
4656
4672
  var _hoisted_1$11 = { class: "flow-config-more" };
@@ -4754,31 +4770,38 @@ var FlowConfigMore_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/
4754
4770
  }, null, 8, ["value"])]),
4755
4771
  _: 1
4756
4772
  }),
4773
+ createVNode(_component_NFormItem, { label: "通过后撤回" }, {
4774
+ default: withCtx(() => [createVNode(_component_NSwitch, {
4775
+ value: settings.value.allowRevokeAfterPass,
4776
+ "onUpdate:value": _cache[3] || (_cache[3] = ($event) => settings.value.allowRevokeAfterPass = $event)
4777
+ }, null, 8, ["value"])]),
4778
+ _: 1
4779
+ }),
4757
4780
  createVNode(_component_NFormItem, { label: "允许转办" }, {
4758
4781
  default: withCtx(() => [createVNode(_component_NSwitch, {
4759
4782
  value: settings.value.allowTransfer,
4760
- "onUpdate:value": _cache[3] || (_cache[3] = ($event) => settings.value.allowTransfer = $event)
4783
+ "onUpdate:value": _cache[4] || (_cache[4] = ($event) => settings.value.allowTransfer = $event)
4761
4784
  }, null, 8, ["value"])]),
4762
4785
  _: 1
4763
4786
  }),
4764
4787
  createVNode(_component_NFormItem, { label: "允许加签" }, {
4765
4788
  default: withCtx(() => [createVNode(_component_NSwitch, {
4766
4789
  value: settings.value.allowAddSign,
4767
- "onUpdate:value": _cache[4] || (_cache[4] = ($event) => settings.value.allowAddSign = $event)
4790
+ "onUpdate:value": _cache[5] || (_cache[5] = ($event) => settings.value.allowAddSign = $event)
4768
4791
  }, null, 8, ["value"])]),
4769
4792
  _: 1
4770
4793
  }),
4771
4794
  createVNode(_component_NFormItem, { label: "允许催办" }, {
4772
4795
  default: withCtx(() => [createVNode(_component_NSwitch, {
4773
4796
  value: settings.value.allowUrge,
4774
- "onUpdate:value": _cache[5] || (_cache[5] = ($event) => settings.value.allowUrge = $event)
4797
+ "onUpdate:value": _cache[6] || (_cache[6] = ($event) => settings.value.allowUrge = $event)
4775
4798
  }, null, 8, ["value"])]),
4776
4799
  _: 1
4777
4800
  }),
4778
4801
  createVNode(_component_NFormItem, { label: "审批超时(小时)" }, {
4779
4802
  default: withCtx(() => [createVNode(_component_NInputNumber, {
4780
4803
  value: settings.value.timeout,
4781
- "onUpdate:value": _cache[6] || (_cache[6] = ($event) => settings.value.timeout = $event),
4804
+ "onUpdate:value": _cache[7] || (_cache[7] = ($event) => settings.value.timeout = $event),
4782
4805
  min: 0,
4783
4806
  placeholder: "0为不限制"
4784
4807
  }, null, 8, ["value"])]),
@@ -4787,14 +4810,14 @@ var FlowConfigMore_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/
4787
4810
  createVNode(_component_NFormItem, { label: "超时自动通过" }, {
4788
4811
  default: withCtx(() => [createVNode(_component_NSwitch, {
4789
4812
  value: settings.value.autoPass,
4790
- "onUpdate:value": _cache[7] || (_cache[7] = ($event) => settings.value.autoPass = $event)
4813
+ "onUpdate:value": _cache[8] || (_cache[8] = ($event) => settings.value.autoPass = $event)
4791
4814
  }, null, 8, ["value"])]),
4792
4815
  _: 1
4793
4816
  }),
4794
4817
  createVNode(_component_NFormItem, { label: "通知方式" }, {
4795
4818
  default: withCtx(() => [createVNode(_component_NCheckboxGroup, {
4796
4819
  value: settings.value.notifyMethods,
4797
- "onUpdate:value": _cache[8] || (_cache[8] = ($event) => settings.value.notifyMethods = $event)
4820
+ "onUpdate:value": _cache[9] || (_cache[9] = ($event) => settings.value.notifyMethods = $event)
4798
4821
  }, {
4799
4822
  default: withCtx(() => [
4800
4823
  createVNode(_component_NCheckbox, { value: "system" }, {
@@ -4815,13 +4838,6 @@ var FlowConfigMore_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/
4815
4838
  _: 1
4816
4839
  })
4817
4840
  ], 64)) : createCommentVNode("", true),
4818
- createVNode(_component_NFormItem, { label: "通过后撤销" }, {
4819
- default: withCtx(() => [createVNode(_component_NSwitch, {
4820
- value: settings.value.allowRevokeAfterPass,
4821
- "onUpdate:value": _cache[9] || (_cache[9] = ($event) => settings.value.allowRevokeAfterPass = $event)
4822
- }, null, 8, ["value"])]),
4823
- _: 1
4824
- }),
4825
4841
  createVNode(_component_NFormItem, { label: "备注" }, {
4826
4842
  default: withCtx(() => [createVNode(_component_NInput, {
4827
4843
  value: settings.value.remark,
@@ -4840,7 +4856,7 @@ var FlowConfigMore_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/
4840
4856
  }, 8, ["model"])]);
4841
4857
  };
4842
4858
  }
4843
- }), [["__scopeId", "data-v-fb67635a"]]);
4859
+ }), [["__scopeId", "data-v-253184d3"]]);
4844
4860
  //#endregion
4845
4861
  //#region src/config/FlowConfig.vue?vue&type=script&setup=true&lang.ts
4846
4862
  var _hoisted_1$10 = { class: "flow-config__header" };
package/dist/style.css CHANGED
@@ -1466,23 +1466,23 @@ to {
1466
1466
  }
1467
1467
  /* Developed collaboratively with vscode - 改动代码行数: 1行(style 块改用 scss 并做 BEM 嵌套整理) */
1468
1468
  /* Developed collaboratively with vscode - 改动代码行数: 45行 */
1469
- .flow-config-flow[data-v-da20dabb] {
1469
+ .flow-config-flow[data-v-c3fa1fc2] {
1470
1470
  position: relative;
1471
1471
  display: flex;
1472
1472
  flex-direction: column;
1473
1473
  height: 100%;
1474
1474
  /* Developed collaboratively with vscode - 改动代码行数: 3行(去除卡片背景/圆角与画布描边,避免与外层卡片形成双边框) */
1475
1475
  }
1476
- .flow-config-flow__canvas[data-v-da20dabb] {
1476
+ .flow-config-flow__canvas[data-v-c3fa1fc2] {
1477
1477
  flex: 1;
1478
1478
  min-height: 0;
1479
1479
  background: var(--fc-bg-color-secondary);
1480
1480
  overflow: hidden;
1481
1481
  }
1482
- .flow-config-flow[data-v-da20dabb] {
1482
+ .flow-config-flow[data-v-c3fa1fc2] {
1483
1483
  /* Developed collaboratively with vscode - 改动代码行数: 13行(右上角缩放百分比胶囊) */
1484
1484
  }
1485
- .flow-config-flow__zoom[data-v-da20dabb] {
1485
+ .flow-config-flow__zoom[data-v-c3fa1fc2] {
1486
1486
  position: absolute;
1487
1487
  top: 12px;
1488
1488
  right: 12px;
@@ -1497,14 +1497,53 @@ to {
1497
1497
  user-select: none;
1498
1498
  /* Developed collaboratively with vscode - 改动代码行数: 8行(非 100% 时可点击恢复:指针 + hover 反馈) */
1499
1499
  }
1500
- .flow-config-flow__zoom--reset[data-v-da20dabb] {
1500
+ .flow-config-flow__zoom--reset[data-v-c3fa1fc2] {
1501
1501
  cursor: pointer;
1502
1502
  }
1503
- .flow-config-flow__zoom--reset[data-v-da20dabb]:hover {
1503
+ .flow-config-flow__zoom--reset[data-v-c3fa1fc2]:hover {
1504
1504
  color: var(--fc-text-color);
1505
1505
  border-color: var(--fc-text-color-secondary);
1506
1506
  }
1507
- .flow-config-flow__menu[data-v-da20dabb] {
1507
+ .flow-config-flow[data-v-c3fa1fc2] {
1508
+ /* Developed collaboratively with vscode - 改动代码行数: 6行(画布操作提示改为警告配色(--fc-warning-color 文字/描边 + 10% 透明底)并定位画布左上角 top/left 各 10px) */
1509
+ }
1510
+ .flow-config-flow__hint[data-v-c3fa1fc2] {
1511
+ position: absolute;
1512
+ top: 10px;
1513
+ left: 10px;
1514
+ z-index: 5;
1515
+ display: flex;
1516
+ align-items: center;
1517
+ gap: 4px;
1518
+ padding: 3px 6px 3px 10px;
1519
+ font-size: 12px;
1520
+ line-height: 20px;
1521
+ color: var(--fc-warning-color);
1522
+ background: var(--fc-warning-color-bg);
1523
+ border: 1px solid var(--fc-warning-color);
1524
+ border-radius: 999px;
1525
+ user-select: none;
1526
+ }
1527
+ .flow-config-flow__hint-close[data-v-c3fa1fc2] {
1528
+ display: flex;
1529
+ align-items: center;
1530
+ justify-content: center;
1531
+ width: 20px;
1532
+ height: 20px;
1533
+ padding: 0;
1534
+ font-size: 14px;
1535
+ line-height: 1;
1536
+ color: inherit;
1537
+ cursor: pointer;
1538
+ background: none;
1539
+ border: none;
1540
+ border-radius: 50%;
1541
+ }
1542
+ .flow-config-flow__hint-close[data-v-c3fa1fc2]:hover {
1543
+ color: var(--fc-text-color);
1544
+ background: var(--fc-bg-color-secondary);
1545
+ }
1546
+ .flow-config-flow__menu[data-v-c3fa1fc2] {
1508
1547
  position: absolute;
1509
1548
  z-index: 10;
1510
1549
  display: flex;
@@ -1517,7 +1556,7 @@ to {
1517
1556
  border-radius: 6px;
1518
1557
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
1519
1558
  }
1520
- .flow-config-flow__menu-item[data-v-da20dabb] {
1559
+ .flow-config-flow__menu-item[data-v-c3fa1fc2] {
1521
1560
  display: flex;
1522
1561
  align-items: center;
1523
1562
  gap: 8px;
@@ -1528,7 +1567,7 @@ to {
1528
1567
  cursor: pointer;
1529
1568
  transition: background-color 0.15s ease;
1530
1569
  }
1531
- .flow-config-flow__menu-item[data-v-da20dabb]:hover {
1570
+ .flow-config-flow__menu-item[data-v-c3fa1fc2]:hover {
1532
1571
  background: var(--fc-bg-color-secondary);
1533
1572
  }
1534
1573
  /* Developed collaboratively with vscode - 改动代码行数: 1行(全局 style 块改用 scss) */
@@ -1538,7 +1577,7 @@ to {
1538
1577
  }
1539
1578
  /* Developed collaboratively with vscode - 改动代码行数: 1行(style 块改用 scss) */
1540
1579
  /* Developed collaboratively with vscode - 改动代码行数: 6行 */
1541
- .flow-config-more[data-v-fb67635a] {
1580
+ .flow-config-more[data-v-253184d3] {
1542
1581
  max-width: 600px;
1543
1582
  /* Developed collaboratively with vscode - 改动代码行数: 3行(白色背景 + 圆角 + 距外部 20px 边距) */
1544
1583
  margin: 20px auto;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yugu-ui/flow-ui",
3
- "version": "0.1.11",
3
+ "version": "0.1.13",
4
4
  "description": "堉古商城流程组件库:流程设计器(config)/ 审批时间线(timeline)/ 流程列表(FlowList)",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",