This commit is contained in:
asp_ly 2024-12-14 13:05:07 +08:00
parent 0ef01ce4d4
commit b843b4603f

View File

@ -11,6 +11,7 @@ import {
RedoOutlined,
ScissorOutlined,
SnippetsOutlined,
SelectOutlined,
} from '@ant-design/icons';
import {Graph, Cell} from '@antv/x6';
import '@antv/x6-plugin-snapline';
@ -420,6 +421,20 @@ const WorkflowDesign: React.FC = () => {
extra={
<Space>
<Space.Compact>
<Button
icon={<SelectOutlined />}
onClick={() => {
if (!graph) return;
const cells = graph.getCells();
if (cells.length === 0) {
message.info('当前没有可选择的元素');
return;
}
graph.resetSelection();
graph.select(cells);
}}
title="全选"
/>
<Button
icon={<CopyOutlined />}
onClick={() => {