diff --git a/frontend/src/pages/Workflow/Definition/Design/index.tsx b/frontend/src/pages/Workflow/Definition/Design/index.tsx
index 0ec79bfb..77391b4c 100644
--- a/frontend/src/pages/Workflow/Definition/Design/index.tsx
+++ b/frontend/src/pages/Workflow/Definition/Design/index.tsx
@@ -1,6 +1,6 @@
import React, {useEffect, useState, useRef} from 'react';
import {useParams, useNavigate} from 'react-router-dom';
-import {Button, Space, Card, Row, Col, message, Modal, Collapse} from 'antd';
+import {Button, Space, Card, Row, Col, message, Modal, Collapse, Tooltip} from 'antd';
import {
ArrowLeftOutlined,
SaveOutlined,
@@ -405,122 +405,97 @@ const WorkflowDesign: React.FC = () => {
- }
- onClick={() => navigate('/workflow/definition')}
- className="back-button"
- >
- 返回
-
- 工作流设计器
+
+ }
+ onClick={() => navigate('/workflow/definition')}
+ />
+
+ {title}
- }
- onClick={() => {
- if (!graph) return;
- const cells = graph.getCells();
- if (cells.length === 0) {
- message.info('当前没有可选择的元素');
- return;
- }
- graph.resetSelection();
- graph.select(cells);
- }}
- title="全选"
- />
- }
- onClick={() => {
- if (!graph) return;
- const cells = graph.getSelectedCells();
- if (cells.length === 0) {
- message.info('请先选择要复制的元素');
- return;
- }
- graph.copy(cells);
- }}
- title="复制"
- />
- }
- onClick={() => {
- if (!graph) return;
- const cells = graph.getSelectedCells();
- if (cells.length === 0) {
- message.info('请先选择要剪切的元素');
- return;
- }
- graph.cut(cells);
- }}
- title="剪切"
- />
- }
- onClick={() => {
- if (!graph) return;
- if (!graph.isClipboardEmpty()) {
- const cells = graph.paste({ offset: 32 });
- graph.cleanSelection();
- graph.select(cells);
- } else {
- message.info('剪贴板为空');
- }
- }}
- title="粘贴"
- />
- }
- onClick={() => {
- if (!graph) return;
- const cells = graph.getSelectedCells();
- if (cells.length === 0) {
- message.info('请先选择要删除的元素');
- return;
- }
- Modal.confirm({
- title: '确认删除',
- content: '确定要删除选中的元素吗?',
- onOk: () => {
- graph.removeCells(cells);
- }
- });
- }}
- danger
- title="删除"
- />
+
+ }
+ onClick={() => graph?.undo()}
+ />
+
+
+ }
+ onClick={() => graph?.redo()}
+ />
+
- }
- onClick={() => {
- if (!graph) return;
- if (graph.canUndo()) {
- graph.undo();
- } else {
- message.info('没有可撤销的操作');
- }
- }}
- title="撤销"
- />
- }
- onClick={() => {
- if (!graph) return;
- if (graph.canRedo()) {
- graph.redo();
- } else {
- message.info('没有可重做的操作');
- }
- }}
- title="重做"
- />
+
+ }
+ onClick={() => graph?.cut()}
+ />
+
+
+ }
+ onClick={() => graph?.copy()}
+ />
+
+
+ }
+ onClick={() => graph?.paste()}
+ />
+
- }>
- 保存
-
+
+
+ }
+ onClick={() => {
+ if (!graph) return;
+ const cells = graph.getCells();
+ if (cells.length === 0) {
+ message.info('当前没有可选择的元素');
+ return;
+ }
+ graph.resetSelection();
+ graph.select(cells);
+ }}
+ />
+
+
+ }
+ onClick={() => {
+ if (!graph) return;
+ const cells = graph.getSelectedCells();
+ if (cells.length === 0) {
+ message.info('请先选择要删除的元素');
+ return;
+ }
+ Modal.confirm({
+ title: '确认删除',
+ content: '确定要删除选中的元素吗?',
+ onOk: () => {
+ graph.removeCells(cells);
+ }
+ });
+ }}
+ />
+
+
+
+ }
+ onClick={handleSaveWorkflow}
+ >
+ 保存
+
+