From 3a937c512607d056311428ac0e6940f34463b9b0 Mon Sep 17 00:00:00 2001 From: jile1997 <1154416769@qq.com> Date: Mon, 6 Jan 2025 17:43:45 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=A2=9E=E5=8A=A0=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/x-flow/src/components/NodeEditor/index.tsx | 2 +- packages/x-flow/src/nodes/node-switch/setting/index.tsx | 1 - packages/x-flow/src/types.ts | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/x-flow/src/components/NodeEditor/index.tsx b/packages/x-flow/src/components/NodeEditor/index.tsx index 89b617780..845947621 100644 --- a/packages/x-flow/src/components/NodeEditor/index.tsx +++ b/packages/x-flow/src/components/NodeEditor/index.tsx @@ -27,7 +27,7 @@ const NodeEditor: FC = (props: any) => { const [asyncSchema, setAsyncSchema] = useState({}); async function getSchema() { - const shema = await getSettingSchema(id, nodeType, form).catch(() => ({})); + const shema = await getSettingSchema(id, nodeType,nodeSetting,data,form).catch(() => ({})); setAsyncSchema(shema); } useEffect(() => { diff --git a/packages/x-flow/src/nodes/node-switch/setting/index.tsx b/packages/x-flow/src/nodes/node-switch/setting/index.tsx index 671255651..f314651cf 100644 --- a/packages/x-flow/src/nodes/node-switch/setting/index.tsx +++ b/packages/x-flow/src/nodes/node-switch/setting/index.tsx @@ -40,7 +40,6 @@ const schema: Schema = { export default memo((props: INodeSwitchSettingPorps) => { const form = useForm(); const { onChange, value } = props; - console.log('%cprops', 'background-color: darkorange', props); const watch = { '#': (allValues: any) => { diff --git a/packages/x-flow/src/types.ts b/packages/x-flow/src/types.ts index aa6ccea6e..1f86bdc5c 100644 --- a/packages/x-flow/src/types.ts +++ b/packages/x-flow/src/types.ts @@ -22,7 +22,7 @@ export interface TNodeItem { width?: string | number; // 配置面板宽度 hideDesc?: boolean; // 配置面板描述 }; - getSettingSchema?: (nodeId: string, nodeType: string, form: ReturnType) => Promise; + getSettingSchema?: (nodeId: string, nodeType: string, nodeItem:TNodeItem,nodeData:any,form: ReturnType) => Promise; switchExtra: { // 条件节点额外属性配置 hideElse: boolean; valueKey: string; @@ -133,7 +133,7 @@ export interface FlowProps { panel?:TPanel //表单配置面板 onNodeClick?: NodeMouseHandler; onMenuItemClick?: (itemInfo: ItemInfo, defaultAction: () => void) => void; - clickAddNode?:(type:string,NodeItem:TNodeItem,addNode:(initData?:Record)=>void)=>void + clickAddNode?:(type:string,nodeItem:TNodeItem,addNode:(initData?:Record)=>void)=>void // 单点调试方法 onTesting?: () => void;// 单点调试方法 }