diff --git a/docs/xflow/api.md b/docs/xflow/api.md index ef88e1f21..32fb46f0a 100644 --- a/docs/xflow/api.md +++ b/docs/xflow/api.md @@ -20,7 +20,7 @@ title: API | onNodeClick | 节点点击事件 | `NodeMouseHandler` | | | antdVersion | antd 的版本 | `V4 \| V5` | `V5` | | readOnly | 只读模式 | `boolean` | `false` | -| onDebug | 单点调试方法 | `() => void` | | +| onTesting | 单点调试方法 | `() => void` | | ## TNodePanel diff --git a/packages/x-flow/src/components/PanelContainer/index.tsx b/packages/x-flow/src/components/PanelContainer/index.tsx index 6653fc4ee..a0ababc98 100644 --- a/packages/x-flow/src/components/PanelContainer/index.tsx +++ b/packages/x-flow/src/components/PanelContainer/index.tsx @@ -47,7 +47,7 @@ const Panel: FC = (props: IPanelProps) => { globalConfig, antdVersion, readOnly, - onDebug, + onTesting, }: any = useContext(ConfigContext); const nodeSetting = settingMap[nodeType] || {}; const { nodes, setNodes } = useStore( @@ -149,7 +149,7 @@ const Panel: FC = (props: IPanelProps) => {
- {!isDisabled && onDebug && ( + {!isDisabled && onTesting && ( <> diff --git a/packages/x-flow/src/types.ts b/packages/x-flow/src/types.ts index 9062a36ba..b92a51d1c 100644 --- a/packages/x-flow/src/types.ts +++ b/packages/x-flow/src/types.ts @@ -135,7 +135,7 @@ export interface FlowProps { onMenuItemClick: (itemInfo: ItemInfo, defaultAction: () => void) => void; clickAddNode:(type:string,NodeItem:TNodeItem,addNode:(initData?:Record)=>void)=>void // 单点调试方法 - onDebug?: () => void;// 单点调试方法 + onTesting?: () => void;// 单点调试方法 } interface ItemInfo { key: 'copy' | 'paste' | 'delete' | string; diff --git a/packages/x-flow/src/withProvider.tsx b/packages/x-flow/src/withProvider.tsx index a3a3c24f2..5a58a23a9 100644 --- a/packages/x-flow/src/withProvider.tsx +++ b/packages/x-flow/src/withProvider.tsx @@ -33,7 +33,7 @@ export default function withProvider( antdVersion ='V5', readOnly, clickAddNode, - onDebug, + onTesting, ...restProps } = props; const settingMap = useMemo(() => { @@ -66,7 +66,7 @@ export default function withProvider( ...defaultWidgets, ...widgets, }, - onDebug + onTesting }; return (