@hzab/flowlong-designer 0.1.7 → 0.1.8

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/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ # @hzab/flowlong-designer@0.1.8
2
+
3
+ fix:重置将子节点置为 null
4
+ fix:发起人节点正常删除
5
+
1
6
  # @hzab/flowlong-designer@0.1.7
2
7
 
3
8
  fix:请假天数文案改为时长
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hzab/flowlong-designer",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "自定义审批流配置组件",
5
5
  "main": "src",
6
6
  "scripts": {
@@ -88,7 +88,7 @@ export const Branch = (props) => {
88
88
 
89
89
  nodeConfig.conditionNodes.forEach((el, index) => {
90
90
  el.priorityLevel = index;
91
- el.nodeName = el.nodeName ? el.nodeName : "条件" + index;
91
+ el.nodeName = el.nodeName ? el.nodeName : "条件" + (index + 1);
92
92
  });
93
93
  onChange && onChange({ ...nodeConfig });
94
94
  }
@@ -135,7 +135,6 @@ export const Branch = (props) => {
135
135
  onChange({ ...nodeConfig });
136
136
  }
137
137
  }
138
- console.log(nodeConfig, "nodeConfignodeConfig");
139
138
 
140
139
  function toText(nodeConfig, idx) {
141
140
  var { conditionList } = nodeConfig.conditionNodes[idx];
@@ -137,13 +137,18 @@ export const Promoter = (props) => {
137
137
  <Button
138
138
  type="primary"
139
139
  onClick={() =>
140
- selectorCtx.setSelectHandler(2, form.nodeAssigneeList, (selected) => {
141
- setForm((f) => {
142
- // 设置 人员、角色 列表数组
143
- f.nodeAssigneeList = selected;
144
- return { ...f };
145
- });
146
- }, 1)
140
+ selectorCtx.setSelectHandler(
141
+ 2,
142
+ form.nodeAssigneeList,
143
+ (selected) => {
144
+ setForm((f) => {
145
+ // 设置 人员、角色 列表数组
146
+ f.nodeAssigneeList = selected;
147
+ return { ...f };
148
+ });
149
+ },
150
+ 1,
151
+ )
147
152
  }
148
153
  >
149
154
  选择人员
@@ -155,7 +160,8 @@ export const Promoter = (props) => {
155
160
  key={idx}
156
161
  className="node-assignee-item"
157
162
  closable
158
- onClose={() => {
163
+ onClose={(e) => {
164
+ e.preventDefault();
159
165
  onRoleDel(idx);
160
166
  }}
161
167
  >
package/src/index.tsx CHANGED
@@ -82,7 +82,7 @@ function FlowlongDesigner(props, ref) {
82
82
  /** 重置 */
83
83
  const onReset = () => {
84
84
  const newData = { ...data };
85
- newData.nodeConfig.childNode = {};
85
+ newData.nodeConfig.childNode = null;
86
86
  setData(newData);
87
87
  };
88
88