npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@bdsoft/bdgraph

v1.1.0

Published

组件库 关系图组件 ## 说明

Readme

组件库 关系图组件

说明

参数 说明 类型/传参 必选 默认值 options 图谱初始配置,一个对象,里面包含了具体的选项(非响应式,要动态更改配置请调用setOptions方法): Object Y options.debug 是否开始调试模式,调试模式下会在控制台打印额外的日志信息 boolean N false options.showDebugPanel 是否显示调试按钮,通过此按钮可以打印配置、数据等 boolean N false options.backgroundColor 图谱背景颜色,你也可以通过样式穿透来设置 string N options.backgroundImage 图谱水印url,如:https://ssl.relation-graph.com/images/relatioon-graph-canvas-bg.png string N options.backgroundImageNoRepeat 只在右下角显示水印,不重复显示水印 boolean N true options.allowShowMiniToolBar 是否显示工具栏 boolean N true options.allowSwitchLineShape 是否在工具栏中显示切换线条形状的按钮 boolean N true options.allowSwitchJunctionPoint 是否在工具栏中显示切换连接点位置的按钮 boolean N false options.allowAutoLayoutIfSupport 是否在工具栏中显示【自动布局】按钮(只有在布局支持且此选项为true时才会显示的按钮) boolean N true options.allowShowRefreshButton 是否在工具栏中显示【刷新】按钮 boolean N true options.allowShowDownloadButton 是否在工具栏中显示【下载图片】按钮 boolean N true options.downloadImageFileName 下载图片时,图片的名称 string N Random options.disableZoom 是否禁用图谱的缩放功能 boolean N false options.disableDragNode 是否禁用图谱中节点的拖动 boolean N false options.disableNodeClickEffect 是否禁用节点默认的点击效果(选中、闪烁) boolean N false options.disableLineClickEffect 是否禁用线条默认的点击效果(选中、闪烁) boolean N false options.moveToCenterWhenRefresh 当图谱刷新后(调用setJsonData或refresh方法都会触发),让图谱根据节点居中(图片会默认将根节点作为中心展示,此选项会根据节点分布寻找中心) boolean N false options.zoomToFitWhenRefresh 当图谱刷新后(调用setJsonData或refresh方法都会触发),是否让图谱缩放到适合可见区域大小,此选项不适用于fixed和force布局 boolean N true options.useAnimationWhenRefresh 当图谱刷新后(调用setJsonData或refresh方法都会触发),使用动画让图居中、缩放 boolean N true options.defaultFocusRootNode 默认为根节点添加一个被选中的样式 boolean N true options.allowShowZoomMenu 是否在右侧菜单栏显示放大缩小的按钮,此设置和disableZoom不冲突 boolean N true options.placeSingleNode 自动为孤点分配位置(当孤点设置了fixed=true时则不处理) boolean N true options.placeOtherGroup 支持展示多个关系网,默认只展示主关系网(即根节点所在的关系网),开启此选项,可以为所有关系网分配位置 boolean N true options.isMoveByParentNode 是否在拖动节点后让子节点跟随 boolean N false options.hideNodeContentByZoom 是否根据缩放比例隐藏节点内容 boolean N false options.defaultNodeShape 默认的节点形状,0:圆形;1:矩形 int N 1 options.defaultNodeColor 默认的节点背景颜色 string N options.defaultNodeFontColor 默认的节点文字颜色 string N options.defaultNodeBorderColor 默认的节点边框颜色 string N options.defaultNodeBorderWidth 默认的节点边框粗细(像素) int N 1 options.defaultNodeWidth 节点的默认宽度 int N - options.defaultNodeHeight 节点的默认高度 int N - options.defaultJunctionPoint 默认的连线与节点接触的方式(border:边缘/ltrb:上下左右/tb:上下/lr:左右)当布局为树状布局时应使用tb或者lr,这样才会好看 string N - options.defaultExpandHolderPosition 默认的节点展开/关闭按钮位置(left/top/right/bottom/hide) string N hide options.defaultLineColor 默认的线条颜色 string N options.checkedLineColor 当线条被选中时的颜色 string N #FD8B37 options.defaultLineWidth 默认的线条粗细(像素) int N 1 options.defaultLineShape 默认的线条样式(1:直线/2:样式2/3:样式3/4:折线/5:样式5/6:样式6)使用示例 int N options.defaultLineMarker 默认的线条箭头样式,示例参考:配置工具中的选项:连线箭头样式 Object N options.defaultShowLineLabel 默认是否显示连线文字,v2版本此选项已无效,主要是这个选项没什么用 boolean N true options.graphOffset_x 画布整体的x偏移量,此属性相当于正常布局完成后又将画布水平拖动x像素,注意:画布整体的偏移量,此属性相当于正常布局完成后又将画布拖动一些距离,他不会更改节点的坐标,偏移的效果也不会受到其他因素影响。 number N 0 options.graphOffset_y 画布整体的y偏移量,此属性相当于正常布局完成后又将画布垂直拖动y像素,注意:画布整体的偏移量,此属性相当于正常布局完成后又将画布拖动一些距离,他不会更改节点的坐标,偏移的效果也不会受到其他因素影响。 number N 0 options.layout 布局方式,布局配置详情参考Layout布局 Object N center layout

升级

20250929

升级relation-graph-vue3版本2.2.10到2.2.11 --pnpm add [email protected]