Coder Social home page Coder Social logo

Comments (6)

x6-bot avatar x6-bot commented on June 6, 2024

👋 @xiyuvi

Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it.
To help make it easier for us to investigate your issue, please follow the contributing guidelines.
We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

from x6.

xiyuvi avatar xiyuvi commented on June 6, 2024

有删除自定义Tool的方法吗

from x6.

xiyuvi avatar xiyuvi commented on June 6, 2024

我上面说的解决方法无效,重新跳转页面是一个新的vue实例,这导致在已经销毁的页面创建的btn1按钮,无法正常调用新页面的函数。我需要查询tool是否存在以及删除tool的方法,有人可以告诉我吗,十分感谢

from x6.

xiyuvi avatar xiyuvi commented on June 6, 2024

我解决了这个问题,使用的是unregisterNodeTool方法
image
虽然没有查找自定义tool是否存在的方法,但是删除不存在的tool并不会报错。
希望对和我遇到相同问题的人有帮助。
吐槽一下,官方文档没有写这个函数,问ai问题真的像炼丹,你永远不知道你会得到什么仙丹(ai告诉我的判断tool是否存在的方法hasNodeTool是错的,没有那个方法)
image
image

from x6.

GuangZ96 avatar GuangZ96 commented on June 6, 2024

的确没有 hasNodeTool 这个方法
只有 hasTool 跟 removeTool 🤔

from x6.

cuidong626 avatar cuidong626 commented on June 6, 2024

register 的有个force属性,会强制覆盖

from x6.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.