ronds-metadata 1.1.20 → 1.1.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,6 +14,10 @@ interface IDynamicPortsProps {
14
14
  * 节点选中事件
15
15
  */
16
16
  onNodeSelect?: (data: NDPGraph.Node) => void;
17
+ /**
18
+ * 获取实例
19
+ */
20
+ getDPGraphInstance?: (data: any) => void;
17
21
  }
18
22
  declare const DynamicPorts: (props: IDynamicPortsProps) => JSX.Element;
19
23
  export default DynamicPorts;
@@ -4,7 +4,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
4
4
  /*
5
5
  * @Author: wangxian
6
6
  * @Date: 2022-05-16 18:53:31
7
- * @LastEditTime: 2022-06-25 11:10:31
7
+ * @LastEditTime: 2022-06-28 14:17:21
8
8
  */
9
9
  import React from 'react';
10
10
  import { filter } from 'rxjs';
@@ -20,7 +20,8 @@ import { GraphHandler } from './comps/GraphHandler';
20
20
  var DynamicPorts = function DynamicPorts(props) {
21
21
  var defaultValue = props.defaultValue,
22
22
  onChange = props.onChange,
23
- onNodeSelect = props.onNodeSelect;
23
+ onNodeSelect = props.onNodeSelect,
24
+ getDPGraphInstance = props.getDPGraphInstance;
24
25
  var divRef = React.useRef(null);
25
26
  var containerRef = React.useRef(null);
26
27
 
@@ -55,6 +56,7 @@ var DynamicPorts = function DynamicPorts(props) {
55
56
  onNodeSelect && onNodeSelect(v[0]);
56
57
  });
57
58
 
59
+ getDPGraphInstance && getDPGraphInstance(_dpGraph);
58
60
  firstLoadRef.current = false;
59
61
  }
60
62
  }, [defaultValue]); // 处理组件拖拽落下事件
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "public": true,
3
3
  "name": "ronds-metadata",
4
- "version": "1.1.20",
4
+ "version": "1.1.21",
5
5
  "scripts": {
6
6
  "start": "dumi dev",
7
7
  "docs:build": "dumi build",