dsh-knj-workflow 2026.9.12 → 2026.9.20
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/lib/client.js +3 -2
- package/lib/ui-regression.test.js +10 -0
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -720,7 +720,8 @@ table.knj-tbl{width:100%;border-collapse:collapse;table-layout:fixed}
|
|
|
720
720
|
return u;
|
|
721
721
|
});
|
|
722
722
|
const edges = wf.edges.map((e) => ({ ...e, from: e.from === oldId ? newId : e.from, to: e.to === oldId ? newId : e.to }));
|
|
723
|
-
|
|
723
|
+
// 改名成功后若当前选中就是被改名节点,同步 selectedId,避免选中节点"失联"导致属性面板闪空
|
|
724
|
+
this.setState({ wf: { ...wf, nodes, edges }, selectedId: this.state.selectedId === oldId ? newId : this.state.selectedId });
|
|
724
725
|
toast('阶段编码已更新为 ' + newId + ';prompt 里的 ${' + oldId + '.字段} 引用请手动改为 ${' + newId + '.字段}');
|
|
725
726
|
}
|
|
726
727
|
addNode(type) {
|
|
@@ -1477,7 +1478,7 @@ table.knj-tbl{width:100%;border-collapse:collapse;table-layout:fixed}
|
|
|
1477
1478
|
),
|
|
1478
1479
|
desc ? react.createElement('div', { style: { fontSize: 11, color: 'var(--dsw-alias-label-tertiary)', lineHeight: 1.5, marginBottom: 4 } }, desc) : null,
|
|
1479
1480
|
);
|
|
1480
|
-
return react.createElement('div', { className: 'knj-ge-props-inner' },
|
|
1481
|
+
return react.createElement('div', { key: node.id, className: 'knj-ge-props-inner' },
|
|
1481
1482
|
react.createElement('div', { className: 'knj-form-label' }, '节点配置',
|
|
1482
1483
|
react.createElement('span', { onClick: () => this.setState({ showNodeGuide: true }), style: { cursor: 'pointer', color: 'var(--dsw-alias-label-tertiary)', marginLeft: 8, fontSize: 12, textDecoration: 'underline' }, title: '节点各字段的配置说明(区别于顶部「工作流配置说明」)' }, '❓ 字段说明'),
|
|
1483
1484
|
),
|
|
@@ -65,3 +65,13 @@ test('UI:流程运行头部不再把「新建任务」堆在主看板顶栏(
|
|
|
65
65
|
test('UI:流程设计列表点击标题(.knj-item-title)进入编辑页面', () => {
|
|
66
66
|
assert.match(src, /className: 'knj-item-title', title: '点击进入编辑', onClick: \(\) => this\.setState\(\{ editing: w \}\) \}, w\.name/);
|
|
67
67
|
});
|
|
68
|
+
|
|
69
|
+
// ---- 画布编辑器:切换选中节点时属性面板必须重建(bug:编码框残留上一节点编码)----
|
|
70
|
+
|
|
71
|
+
test('UI:节点属性面板根元素以 node.id 为 key(切换节点时整树重建,defaultValue 控件不残留)', () => {
|
|
72
|
+
assert.match(src, /return react\.createElement\('div', \{ key: node\.id, className: 'knj-ge-props-inner' \},/);
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
test('UI:修改节点编码成功后同步 selectedId(避免选中节点"失联"导致面板闪空)', () => {
|
|
76
|
+
assert.match(src, /selectedId: this\.state\.selectedId === oldId \? newId : this\.state\.selectedId/);
|
|
77
|
+
});
|