mirror of
https://gitee.com/antv/g6.git
synced 2024-12-03 20:28:36 +08:00
fix: 修复 IGraph 中find 和 findall 第二个参数为可选
This commit is contained in:
parent
f6d04ac26f
commit
a2dc01a7c3
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@antv/g6",
|
||||
"version": "3.3.0-beta.3",
|
||||
"version": "3.3.0-beta.4",
|
||||
"description": "A Graph Visualization Framework in JavaScript",
|
||||
"keywords": [
|
||||
"antv",
|
||||
|
@ -1,5 +1,5 @@
|
||||
export default {
|
||||
version: '3.3.0-beta.3',
|
||||
version: '3.3.0-beta.4',
|
||||
rootContainerClassName: 'root-container',
|
||||
nodeContainerClassName: 'node-container',
|
||||
edgeContainerClassName: 'edge-container',
|
||||
|
@ -445,7 +445,7 @@ export interface IGraph extends EventEmitter {
|
||||
* @param {(item: T, index: number) => T} fn 指定规则
|
||||
* @return {T} 元素实例
|
||||
*/
|
||||
find<T extends Item>(type: ITEM_TYPE, fn: (item: T, index: number) => boolean): T;
|
||||
find<T extends Item>(type: ITEM_TYPE, fn: (item: T, index?: number) => boolean): T;
|
||||
|
||||
/**
|
||||
* 查找所有满足规则的元素
|
||||
@ -453,7 +453,7 @@ export interface IGraph extends EventEmitter {
|
||||
* @param {string} fn 指定规则
|
||||
* @return {array} 元素实例
|
||||
*/
|
||||
findAll<T extends Item>(type: ITEM_TYPE, fn: (item: T, index: number) => boolean): T[];
|
||||
findAll<T extends Item>(type: ITEM_TYPE, fn: (item: T, index?: number) => boolean): T[];
|
||||
|
||||
/**
|
||||
* 查找所有处于指定状态的元素
|
||||
|
Loading…
Reference in New Issue
Block a user