@yugu-ui/flow-ui 0.1.10 → 0.1.12

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.
@@ -4,8 +4,8 @@ type __VLS_Props = {
4
4
  data?: Record<string, any> | null;
5
5
  publishing?: boolean;
6
6
  isExternal?: number;
7
- /** 是否隐藏「字段配置」页签(true=不渲染该 tab,fields 数据仍随 publish 输出) */
8
- hideFields?: boolean;
7
+ /** 本地开发模式(true=展示字段配置页签与更多设置预留字段;false=打包后行为,两者隐藏,数据仍随 publish 输出) */
8
+ devMode?: boolean;
9
9
  };
10
10
  declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
11
11
  formChange: (data: any) => any;
@@ -31,7 +31,7 @@ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {
31
31
  flowName: string;
32
32
  activeTab: "form" | "flow" | "more";
33
33
  publishing: boolean;
34
- hideFields: boolean;
34
+ devMode: boolean;
35
35
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
36
36
  declare const _default: typeof __VLS_export;
37
37
  export default _default;
@@ -1,5 +1,7 @@
1
1
  type __VLS_Props = {
2
2
  data?: Record<string, any>;
3
+ /** 是否展示预留配置项(撤回/转办/加签/催办/审批超时/超时自动通过/通知方式);隐藏时字段仍按默认值/回显值随 change 输出 */
4
+ showReserved?: boolean;
3
5
  };
4
6
  declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {
5
7
  validate: () => Promise<string[]>;
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { NAvatar, NButton, NCard, NCheckbox, NCollapse, NCollapseItem, NDrawer, NDrawerContent, NEl, NEllipsis, NEmpty, NForm, NFormItem, NImage, NInput, NInputGroup, NInputGroupLabel, NInputNumber, NModal, NPopover, NRadio, NRadioButton, NRadioGroup, NSelect, NSpace, NSpin, NSwitch, NTab, NTabs, NTag, NTooltip, useThemeVars } from "naive-ui";
1
+ import { NAvatar, NButton, NCard, NCheckbox, NCheckboxGroup, NCollapse, NCollapseItem, NDrawer, NDrawerContent, NEl, NEllipsis, NEmpty, NForm, NFormItem, NImage, NInput, NInputGroup, NInputGroupLabel, NInputNumber, NModal, NPopover, NRadio, NRadioButton, NRadioGroup, NSelect, NSpace, NSpin, NSwitch, NTab, NTabs, NTag, NTooltip, useThemeVars } from "naive-ui";
2
2
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, guardReactiveProps, inject, markRaw, mergeModels, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onBeforeUnmount, onMounted, openBlock, provide, reactive, ref, renderList, renderSlot, resolveDynamicComponent, shallowRef, toDisplayString, toRef, unref, useModel, useSlots, vModelText, vShow, watch, withCtx, withDirectives, withModifiers } from "vue";
3
3
  import { Graph } from "@antv/x6";
4
4
  import { VueShapeView, getTeleport, register } from "@antv/x6-vue-shape";
@@ -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,
@@ -2196,7 +2196,7 @@ var initGraph = (container, options = {}) => {
2196
2196
  },
2197
2197
  panning: {
2198
2198
  enabled: true,
2199
- eventTypes: ["rightMouseDown"]
2199
+ eventTypes: ["leftMouseDown"]
2200
2200
  },
2201
2201
  connecting: { enabled: false },
2202
2202
  interacting: {
@@ -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-b34837eb"]]);
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" };
@@ -4659,7 +4675,10 @@ var _hoisted_1$11 = { class: "flow-config-more" };
4659
4675
  var FlowConfigMore_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
4660
4676
  name: "FlowConfigMore",
4661
4677
  __name: "FlowConfigMore",
4662
- props: { data: {} },
4678
+ props: {
4679
+ data: {},
4680
+ showReserved: { type: Boolean }
4681
+ },
4663
4682
  emits: ["change"],
4664
4683
  setup(__props, { expose: __expose, emit: __emit }) {
4665
4684
  const props = __props;
@@ -4671,6 +4690,7 @@ var FlowConfigMore_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/
4671
4690
  allowTransfer: false,
4672
4691
  allowAddSign: false,
4673
4692
  allowUrge: true,
4693
+ allowRevokeAfterPass: false,
4674
4694
  timeout: 24,
4675
4695
  autoPass: false,
4676
4696
  notifyMethods: ["system"],
@@ -4708,6 +4728,9 @@ var FlowConfigMore_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/
4708
4728
  return (_ctx, _cache) => {
4709
4729
  const _component_NFormItem = NFormItem;
4710
4730
  const _component_NInputNumber = NInputNumber;
4731
+ const _component_NSwitch = NSwitch;
4732
+ const _component_NCheckbox = NCheckbox;
4733
+ const _component_NCheckboxGroup = NCheckboxGroup;
4711
4734
  const _component_NInput = NInput;
4712
4735
  const _component_NForm = NForm;
4713
4736
  return openBlock(), createElementBlock("div", _hoisted_1$11, [createVNode(_component_NForm, {
@@ -4739,10 +4762,86 @@ var FlowConfigMore_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/
4739
4762
  }, null, 8, ["value"])]),
4740
4763
  _: 1
4741
4764
  }),
4765
+ __props.showReserved ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
4766
+ createVNode(_component_NFormItem, { label: "允许撤回" }, {
4767
+ default: withCtx(() => [createVNode(_component_NSwitch, {
4768
+ value: settings.value.allowWithdraw,
4769
+ "onUpdate:value": _cache[2] || (_cache[2] = ($event) => settings.value.allowWithdraw = $event)
4770
+ }, null, 8, ["value"])]),
4771
+ _: 1
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
+ }),
4780
+ createVNode(_component_NFormItem, { label: "允许转办" }, {
4781
+ default: withCtx(() => [createVNode(_component_NSwitch, {
4782
+ value: settings.value.allowTransfer,
4783
+ "onUpdate:value": _cache[4] || (_cache[4] = ($event) => settings.value.allowTransfer = $event)
4784
+ }, null, 8, ["value"])]),
4785
+ _: 1
4786
+ }),
4787
+ createVNode(_component_NFormItem, { label: "允许加签" }, {
4788
+ default: withCtx(() => [createVNode(_component_NSwitch, {
4789
+ value: settings.value.allowAddSign,
4790
+ "onUpdate:value": _cache[5] || (_cache[5] = ($event) => settings.value.allowAddSign = $event)
4791
+ }, null, 8, ["value"])]),
4792
+ _: 1
4793
+ }),
4794
+ createVNode(_component_NFormItem, { label: "允许催办" }, {
4795
+ default: withCtx(() => [createVNode(_component_NSwitch, {
4796
+ value: settings.value.allowUrge,
4797
+ "onUpdate:value": _cache[6] || (_cache[6] = ($event) => settings.value.allowUrge = $event)
4798
+ }, null, 8, ["value"])]),
4799
+ _: 1
4800
+ }),
4801
+ createVNode(_component_NFormItem, { label: "审批超时(小时)" }, {
4802
+ default: withCtx(() => [createVNode(_component_NInputNumber, {
4803
+ value: settings.value.timeout,
4804
+ "onUpdate:value": _cache[7] || (_cache[7] = ($event) => settings.value.timeout = $event),
4805
+ min: 0,
4806
+ placeholder: "0为不限制"
4807
+ }, null, 8, ["value"])]),
4808
+ _: 1
4809
+ }),
4810
+ createVNode(_component_NFormItem, { label: "超时自动通过" }, {
4811
+ default: withCtx(() => [createVNode(_component_NSwitch, {
4812
+ value: settings.value.autoPass,
4813
+ "onUpdate:value": _cache[8] || (_cache[8] = ($event) => settings.value.autoPass = $event)
4814
+ }, null, 8, ["value"])]),
4815
+ _: 1
4816
+ }),
4817
+ createVNode(_component_NFormItem, { label: "通知方式" }, {
4818
+ default: withCtx(() => [createVNode(_component_NCheckboxGroup, {
4819
+ value: settings.value.notifyMethods,
4820
+ "onUpdate:value": _cache[9] || (_cache[9] = ($event) => settings.value.notifyMethods = $event)
4821
+ }, {
4822
+ default: withCtx(() => [
4823
+ createVNode(_component_NCheckbox, { value: "system" }, {
4824
+ default: withCtx(() => [..._cache[11] || (_cache[11] = [createTextVNode("系统通知", -1)])]),
4825
+ _: 1
4826
+ }),
4827
+ createVNode(_component_NCheckbox, { value: "email" }, {
4828
+ default: withCtx(() => [..._cache[12] || (_cache[12] = [createTextVNode("邮件", -1)])]),
4829
+ _: 1
4830
+ }),
4831
+ createVNode(_component_NCheckbox, { value: "sms" }, {
4832
+ default: withCtx(() => [..._cache[13] || (_cache[13] = [createTextVNode("短信", -1)])]),
4833
+ _: 1
4834
+ })
4835
+ ]),
4836
+ _: 1
4837
+ }, 8, ["value"])]),
4838
+ _: 1
4839
+ })
4840
+ ], 64)) : createCommentVNode("", true),
4742
4841
  createVNode(_component_NFormItem, { label: "备注" }, {
4743
4842
  default: withCtx(() => [createVNode(_component_NInput, {
4744
4843
  value: settings.value.remark,
4745
- "onUpdate:value": _cache[2] || (_cache[2] = ($event) => settings.value.remark = $event),
4844
+ "onUpdate:value": _cache[10] || (_cache[10] = ($event) => settings.value.remark = $event),
4746
4845
  type: "textarea",
4747
4846
  placeholder: "请输入备注信息",
4748
4847
  autosize: {
@@ -4757,7 +4856,7 @@ var FlowConfigMore_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/
4757
4856
  }, 8, ["model"])]);
4758
4857
  };
4759
4858
  }
4760
- }), [["__scopeId", "data-v-b4e7caf8"]]);
4859
+ }), [["__scopeId", "data-v-253184d3"]]);
4761
4860
  //#endregion
4762
4861
  //#region src/config/FlowConfig.vue?vue&type=script&setup=true&lang.ts
4763
4862
  var _hoisted_1$10 = { class: "flow-config__header" };
@@ -4777,7 +4876,7 @@ var FlowConfig_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @_
4777
4876
  default: false
4778
4877
  },
4779
4878
  isExternal: { default: 0 },
4780
- hideFields: {
4879
+ devMode: {
4781
4880
  type: Boolean,
4782
4881
  default: false
4783
4882
  }
@@ -4797,7 +4896,7 @@ var FlowConfig_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @_
4797
4896
  flow: 2,
4798
4897
  more: 3
4799
4898
  };
4800
- const currentStep = ref(props.hideFields && (tabToStep[props.activeTab] ?? 1) === 1 ? 2 : tabToStep[props.activeTab] ?? 1);
4899
+ const currentStep = ref(!props.devMode && (tabToStep[props.activeTab] ?? 1) === 1 ? 2 : tabToStep[props.activeTab] ?? 1);
4801
4900
  /** tab 配置(v-for 渲染,value 即步骤序号) */
4802
4901
  const steps = computed(() => [
4803
4902
  {
@@ -4812,9 +4911,9 @@ var FlowConfig_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @_
4812
4911
  value: 3,
4813
4912
  label: "更多设置"
4814
4913
  }
4815
- ].filter((step) => !(props.hideFields && step.value === 1)));
4816
- watch(() => props.hideFields, (v) => {
4817
- if (v && currentStep.value === 1) currentStep.value = 2;
4914
+ ].filter((step) => props.devMode || step.value !== 1));
4915
+ watch(() => props.devMode, (v) => {
4916
+ if (!v && currentStep.value === 1) currentStep.value = 2;
4818
4917
  });
4819
4918
  const formData = ref({});
4820
4919
  const fieldData = ref({});
@@ -4858,7 +4957,7 @@ var FlowConfig_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @_
4858
4957
  validating.value = true;
4859
4958
  try {
4860
4959
  const failed = [
4861
- ...props.hideFields ? [] : [{
4960
+ ...!props.devMode ? [] : [{
4862
4961
  step: 1,
4863
4962
  tip: "【字段配置】存在未填写项",
4864
4963
  errors: fieldRef.value?.validate?.() || []
@@ -4960,8 +5059,9 @@ var FlowConfig_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @_
4960
5059
  ref_key: "moreRef",
4961
5060
  ref: moreRef,
4962
5061
  data: moreData.value,
5062
+ "show-reserved": __props.devMode,
4963
5063
  onChange: handleMoreChange
4964
- }, null, 8, ["data"]), [[vShow, currentStep.value === 3]])
5064
+ }, null, 8, ["data", "show-reserved"]), [[vShow, currentStep.value === 3]])
4965
5065
  ])]),
4966
5066
  _: 1
4967
5067
  }, 8, ["show"])]),
@@ -4969,7 +5069,7 @@ var FlowConfig_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @_
4969
5069
  }, 8, ["style"]);
4970
5070
  };
4971
5071
  }
4972
- }), [["__scopeId", "data-v-86b98e2f"]]);
5072
+ }), [["__scopeId", "data-v-5e56d074"]]);
4973
5073
  //#endregion
4974
5074
  //#region src/utils/common.ts
4975
5075
  /** 判断是否为空(undefined/null/空字符串) */
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-b34837eb] {
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-b34837eb] {
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-b34837eb] {
1483
1483
  /* Developed collaboratively with vscode - 改动代码行数: 13行(右上角缩放百分比胶囊) */
1484
1484
  }
1485
- .flow-config-flow__zoom[data-v-da20dabb] {
1485
+ .flow-config-flow__zoom[data-v-b34837eb] {
1486
1486
  position: absolute;
1487
1487
  top: 12px;
1488
1488
  right: 12px;
@@ -1497,14 +1497,54 @@ 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-b34837eb] {
1501
1501
  cursor: pointer;
1502
1502
  }
1503
- .flow-config-flow__zoom--reset[data-v-da20dabb]:hover {
1503
+ .flow-config-flow__zoom--reset[data-v-b34837eb]: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-b34837eb] {
1508
+ /* Developed collaboratively with vscode - 改动代码行数: 40行(画布操作提示胶囊:顶部居中、样式与右上角缩放胶囊一致;内嵌圆形 × 关闭按钮带 hover 反馈,关闭后 localStorage 记忆) */
1509
+ }
1510
+ .flow-config-flow__hint[data-v-b34837eb] {
1511
+ position: absolute;
1512
+ top: 12px;
1513
+ left: 50%;
1514
+ transform: translateX(-50%);
1515
+ z-index: 5;
1516
+ display: flex;
1517
+ align-items: center;
1518
+ gap: 4px;
1519
+ padding: 3px 6px 3px 10px;
1520
+ font-size: 12px;
1521
+ line-height: 20px;
1522
+ color: var(--fc-text-color-secondary);
1523
+ background: var(--fc-card-bg);
1524
+ border: 1px solid var(--fc-card-border);
1525
+ border-radius: 999px;
1526
+ user-select: none;
1527
+ }
1528
+ .flow-config-flow__hint-close[data-v-b34837eb] {
1529
+ display: flex;
1530
+ align-items: center;
1531
+ justify-content: center;
1532
+ width: 20px;
1533
+ height: 20px;
1534
+ padding: 0;
1535
+ font-size: 14px;
1536
+ line-height: 1;
1537
+ color: inherit;
1538
+ cursor: pointer;
1539
+ background: none;
1540
+ border: none;
1541
+ border-radius: 50%;
1542
+ }
1543
+ .flow-config-flow__hint-close[data-v-b34837eb]:hover {
1544
+ color: var(--fc-text-color);
1545
+ background: var(--fc-bg-color-secondary);
1546
+ }
1547
+ .flow-config-flow__menu[data-v-b34837eb] {
1508
1548
  position: absolute;
1509
1549
  z-index: 10;
1510
1550
  display: flex;
@@ -1517,7 +1557,7 @@ to {
1517
1557
  border-radius: 6px;
1518
1558
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
1519
1559
  }
1520
- .flow-config-flow__menu-item[data-v-da20dabb] {
1560
+ .flow-config-flow__menu-item[data-v-b34837eb] {
1521
1561
  display: flex;
1522
1562
  align-items: center;
1523
1563
  gap: 8px;
@@ -1528,7 +1568,7 @@ to {
1528
1568
  cursor: pointer;
1529
1569
  transition: background-color 0.15s ease;
1530
1570
  }
1531
- .flow-config-flow__menu-item[data-v-da20dabb]:hover {
1571
+ .flow-config-flow__menu-item[data-v-b34837eb]:hover {
1532
1572
  background: var(--fc-bg-color-secondary);
1533
1573
  }
1534
1574
  /* Developed collaboratively with vscode - 改动代码行数: 1行(全局 style 块改用 scss) */
@@ -1538,7 +1578,7 @@ to {
1538
1578
  }
1539
1579
  /* Developed collaboratively with vscode - 改动代码行数: 1行(style 块改用 scss) */
1540
1580
  /* Developed collaboratively with vscode - 改动代码行数: 6行 */
1541
- .flow-config-more[data-v-b4e7caf8] {
1581
+ .flow-config-more[data-v-253184d3] {
1542
1582
  max-width: 600px;
1543
1583
  /* Developed collaboratively with vscode - 改动代码行数: 3行(白色背景 + 圆角 + 距外部 20px 边距) */
1544
1584
  margin: 20px auto;
@@ -1550,14 +1590,14 @@ to {
1550
1590
  }
1551
1591
  /* Developed collaboratively with vscode - 改动代码行数: 1行(style 块改用 scss 并做 BEM 嵌套整理) */
1552
1592
  /* Developed collaboratively with vscode - 改动代码行数: 14行 */
1553
- .flow-config[data-v-86b98e2f] {
1593
+ .flow-config[data-v-5e56d074] {
1554
1594
  /* .n-card 根元素自带 flex column 布局与 cardColor 背景,此处只补满高度;
1555
1595
  overflow: hidden 让底部圆角裁掉子组件直角背景的超出部分 */
1556
1596
  /* Developed collaboratively with vscode - 改动代码行数: 1行(根容器裁剪圆角外溢出) */
1557
1597
  height: 100%;
1558
1598
  overflow: hidden;
1559
1599
  }
1560
- .flow-config__header[data-v-86b98e2f] {
1600
+ .flow-config__header[data-v-5e56d074] {
1561
1601
  /* header 插槽行:占满卡片头部宽度并作为 title / publish 的 absolute 定位包含块;
1562
1602
  内容区自身滚动(overflow: auto),头部天然固定,无需 sticky */
1563
1603
  position: relative;
@@ -1568,7 +1608,7 @@ to {
1568
1608
  padding: 16px 20px;
1569
1609
  border-bottom: 1px solid var(--fc-border-color);
1570
1610
  }
1571
- .flow-config__title[data-v-86b98e2f] {
1611
+ .flow-config__title[data-v-5e56d074] {
1572
1612
  font-size: 15px;
1573
1613
  font-weight: 500;
1574
1614
  color: var(--fc-primary-color);
@@ -1579,38 +1619,38 @@ to {
1579
1619
  padding-left: 10px;
1580
1620
  border-left: 3px solid var(--fc-primary-color);
1581
1621
  }
1582
- .flow-config__publish[data-v-86b98e2f] {
1622
+ .flow-config__publish[data-v-5e56d074] {
1583
1623
  position: absolute;
1584
1624
  right: 20px;
1585
1625
  }
1586
- .flow-config[data-v-86b98e2f] {
1626
+ .flow-config[data-v-5e56d074] {
1587
1627
  /* Developed collaboratively with vscode - 改动代码行数: 7行(NTabs segment 收缩为内容宽度;segment 模式 rail 均分容器宽度,fit-content 下富余为零导致标签文字紧连,补 label 水平内边距还原分段控件观感) */
1588
1628
  }
1589
- .flow-config__tabs[data-v-86b98e2f] {
1629
+ .flow-config__tabs[data-v-5e56d074] {
1590
1630
  width: fit-content;
1591
1631
  }
1592
- .flow-config__tabs[data-v-86b98e2f] .n-tabs-tab__label {
1632
+ .flow-config__tabs[data-v-5e56d074] .n-tabs-tab__label {
1593
1633
  padding: 0 12px;
1594
1634
  }
1595
- .flow-config[data-v-86b98e2f] {
1635
+ .flow-config[data-v-5e56d074] {
1596
1636
  /* Developed collaboratively with vscode - 改动代码行数: 9行(内容区 loading:NSpin 链式撑满替代原 body 的 flex 布局职责) */
1597
1637
  /* NSpin 承载内容区 flex 布局职责,内部容器链式撑满,保证 body 滚动与遮罩覆盖正确 */
1598
1638
  }
1599
- .flow-config__spin[data-v-86b98e2f] {
1639
+ .flow-config__spin[data-v-5e56d074] {
1600
1640
  flex: 1;
1601
1641
  min-height: 0;
1602
1642
  }
1603
- .flow-config__spin[data-v-86b98e2f] .n-spin-container,
1604
- .flow-config__spin[data-v-86b98e2f] .n-spin-content {
1643
+ .flow-config__spin[data-v-5e56d074] .n-spin-container,
1644
+ .flow-config__spin[data-v-5e56d074] .n-spin-content {
1605
1645
  height: 100%;
1606
1646
  }
1607
- .flow-config__body[data-v-86b98e2f] {
1647
+ .flow-config__body[data-v-5e56d074] {
1608
1648
  height: 100%;
1609
1649
  overflow: auto;
1610
1650
  /* 内容区浅色背景,子组件以白色卡片浮于其上 */
1611
1651
  background: var(--fc-bg-color);
1612
1652
  }
1613
- .flow-config__body[data-v-86b98e2f] > * {
1653
+ .flow-config__body[data-v-5e56d074] > * {
1614
1654
  min-height: 100%;
1615
1655
  }
1616
1656
  /* Developed collaboratively with vscode - 改动代码行数: 39行 */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yugu-ui/flow-ui",
3
- "version": "0.1.10",
3
+ "version": "0.1.12",
4
4
  "description": "堉古商城流程组件库:流程设计器(config)/ 审批时间线(timeline)/ 流程列表(FlowList)",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",