Skip to content

Commit

Permalink
feat:增加参数
Browse files Browse the repository at this point in the history
  • Loading branch information
jile1997 committed Jan 6, 2025
1 parent c1c3785 commit 3a937c5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/x-flow/src/components/NodeEditor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const NodeEditor: FC<INodeEditorProps> = (props: any) => {
const [asyncSchema, setAsyncSchema] = useState<Schema>({});

async function getSchema() {
const shema = await getSettingSchema(id, nodeType, form).catch(() => ({}));
const shema = await getSettingSchema(id, nodeType,nodeSetting,data,form).catch(() => ({}));
setAsyncSchema(shema);
}
useEffect(() => {
Expand Down
1 change: 0 additions & 1 deletion packages/x-flow/src/nodes/node-switch/setting/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
4 changes: 2 additions & 2 deletions packages/x-flow/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export interface TNodeItem {
width?: string | number; // 配置面板宽度
hideDesc?: boolean; // 配置面板描述
};
getSettingSchema?: (nodeId: string, nodeType: string, form: ReturnType<typeof useForm>) => Promise<Schema>;
getSettingSchema?: (nodeId: string, nodeType: string, nodeItem:TNodeItem,nodeData:any,form: ReturnType<typeof useForm>) => Promise<Schema>;
switchExtra: { // 条件节点额外属性配置
hideElse: boolean;
valueKey: string;
Expand Down Expand Up @@ -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<string,any>)=>void)=>void
clickAddNode?:(type:string,nodeItem:TNodeItem,addNode:(initData?:Record<string,any>)=>void)=>void
// 单点调试方法
onTesting?: () => void;// 单点调试方法
}
Expand Down

0 comments on commit 3a937c5

Please sign in to comment.