Skip to content

Commit

Permalink
fix:修改onDebug为onTesting
Browse files Browse the repository at this point in the history
  • Loading branch information
昔梦 committed Jan 6, 2025
1 parent b27067e commit bc1ce0a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/xflow/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ title: API
| onNodeClick | 节点点击事件 | `NodeMouseHandler` | |
| antdVersion | antd 的版本 | `V4 \| V5` | `V5` |
| readOnly | 只读模式 | `boolean` | `false` |
| onDebug | 单点调试方法 | `() => void` | |
| onTesting | 单点调试方法 | `() => void` | |


## TNodePanel
Expand Down
4 changes: 2 additions & 2 deletions packages/x-flow/src/components/PanelContainer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const Panel: FC<IPanelProps> = (props: IPanelProps) => {
globalConfig,
antdVersion,
readOnly,
onDebug,
onTesting,
}: any = useContext(ConfigContext);
const nodeSetting = settingMap[nodeType] || {};
const { nodes, setNodes } = useStore(
Expand Down Expand Up @@ -149,7 +149,7 @@ const Panel: FC<IPanelProps> = (props: IPanelProps) => {
</div>
<div className="title-actions">
<Space size={[4, 4]}>
{!isDisabled && onDebug && (
{!isDisabled && onTesting && (
<>
<IconView type="icon-yunhang" style={{ fontSize: 16 }} />
<Divider type="vertical" />
Expand Down
2 changes: 1 addition & 1 deletion packages/x-flow/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export interface FlowProps {
onMenuItemClick: (itemInfo: ItemInfo, defaultAction: () => void) => void;
clickAddNode:(type:string,NodeItem:TNodeItem,addNode:(initData?:Record<string,any>)=>void)=>void
// 单点调试方法
onDebug?: () => void;// 单点调试方法
onTesting?: () => void;// 单点调试方法
}
interface ItemInfo {
key: 'copy' | 'paste' | 'delete' | string;
Expand Down
4 changes: 2 additions & 2 deletions packages/x-flow/src/withProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default function withProvider<T>(
antdVersion ='V5',
readOnly,
clickAddNode,
onDebug,
onTesting,
...restProps
} = props;
const settingMap = useMemo(() => {
Expand Down Expand Up @@ -66,7 +66,7 @@ export default function withProvider<T>(
...defaultWidgets,
...widgets,
},
onDebug
onTesting
};

return (
Expand Down

0 comments on commit bc1ce0a

Please sign in to comment.