更改双击以简单单击tree.js代码

发布于 2025-02-04 18:22:03 字数 933 浏览 3 评论 0原文

我无法从 tree.js修改代码。 单击节点(文件夹名称)时,用户可以打开文件夹。您可以看到我在这里构建的网站 nofe nesh notes notes 强>“出现在左上方。

在此刻,需要双击文件夹名称,或单击箭头以打开文件夹。我看不到代码中的双击在哪里。

我想简单单击文件夹的名称。

谢谢!我的此站点的代码在此github branch 。它是由雨果生成的,但最好看 tree.js < /a>对于我正在使用的来源。

I've not been able to modify the code from tree.js to allow user to open a folder when clicking on a node (folder name). You can see the website I'm building here where the folder named "notes" appears at the top left.

For the moment one needs to double click on the folder name or simple click on the arrow to open the folder. I cannot see where double click is called in the code.

I would like to simple click the folder's name to open it.

enter image description here

Thanks ! my code for this site is in this github branch. It is generated with Hugo, but better look at tree.js for the source that I'm using.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

涫野音 2025-02-11 18:22:03

无需修改代码。只需在某些事件中手动打开即可。

tree.on('select', e => {
  if (e.tagName === 'SUMMARY') {
    tree.open(e.parentElement);
  }
});

来自 https://github.com/lunu-bounir/lunu-bounir/tree.js/sissues /1

There is no need to modify the code. Just manually open on select event.

tree.on('select', e => {
  if (e.tagName === 'SUMMARY') {
    tree.open(e.parentElement);
  }
});

from https://github.com/lunu-bounir/tree.js/issues/1

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文