vue-safe-force-graph 2.0.52 → 2.0.54

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.
package/README.md CHANGED
@@ -276,7 +276,15 @@ app.use(Graph)
276
276
  | handle-data-loaded | 图加载数据完成后 的事件通知。会返回图中所有的节点数据 | `<ForceGraphByCanvas :graph-api="graphApi" :module="module" :start-node="startNode" @handle-data-loaded="handleDataLoaded" @custom-contextmenu-click="handleContextmenu" @handle-select-node="handleSelectNode" />` |
277
277
  | custom-contextmenu-click | 自定义右键菜单的点击事件。返回 **eventName** 事件名 、**customConfig**、 **当前点击的nodes** 节点的整个数据, 所有节点**allNodes** | 如上 |
278
278
  | handle-select-node | 选择节点事件 | 如上 |
279
- | controlOperation | 操作控制,传入node数据和对应api操作。如显示隐藏按钮 | 示例如下 |
279
+ | | | |
280
+
281
+ ## 方法
282
+
283
+ | 方法名 | 说明 | 参数 |
284
+ | ------------------ | ------------------------------------------------------------ | ---- |
285
+ | controlOperation | 操作控制,传入node数据和对应api操作。如显示隐藏按钮,示例如下 | |
286
+ | handleCustomSelect | 选择节点 | |
287
+ | | | |
280
288
 
281
289
  ##### controlOperation示例
282
290
 
@@ -315,6 +323,16 @@ function hideNode() {
315
323
  - `un_fix_nodes`取消固定节点
316
324
  - `delete_node`删除节点
317
325
 
326
+
327
+
328
+ ##### handleCustomSelect
329
+
330
+ ```
331
+ const handleHighLight = () => {
332
+ forceGraph.value.handleCustomSelect('include', 'id', ['xxxs0'])
333
+ }
334
+ ```
335
+
318
336
  ### 图标加载方式
319
337
 
320
338
  图标icon图片有2中加载方式:1从cdn中加载,2打包为base64到npm包中加载。
@@ -385,7 +403,7 @@ function hideNode() {
385
403
  "id": "sfdsdfsf",
386
404
  "name": "“xxx",
387
405
  "type": "report",
388
- "inner_img": "自定义节点图片", // 自定义图片
406
+ "icon_img": "自定义节点图片", // 自定义图片
389
407
  "basic": {
390
408
  "title": "“黑球”行动再升级,SMBGhost漏洞攻击进入实战",
391
409
  "url": "xxxx",