-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Graph.registerNodeTool 不应报错,而是仅仅给出警告 #4245
Comments
👋 @xiyuvi Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. |
有删除自定义Tool的方法吗 |
我上面说的解决方法无效,重新跳转页面是一个新的vue实例,这导致在已经销毁的页面创建的btn1按钮,无法正常调用新页面的函数。我需要查询tool是否存在以及删除tool的方法,有人可以告诉我吗,十分感谢 |
的确没有 hasNodeTool 这个方法 |
register 的有个force属性,会强制覆盖 |
功能描述
···
Graph.registerNodeTool("btn1)
···
重复进一次页面,以上初始化代码会执行,导致x6抛出错误,之后的代码无法执行
”Node tool with name 'btn1' already registered.“
期望解决方案
个人觉得没必要抛出错误,给一个警告信息就可以了。
目前我的解决方法是包一层捕捉错误
我在文档中没有搜到怎么判断某个Tool是否已经存在的函数,如果有这种函数的话麻烦分享一下,谢谢
The text was updated successfully, but these errors were encountered: