【问题标题】:Add loading indicator when select node in jstree在 jstree 中选择节点时添加加载指示器
【发布时间】:2017-12-21 07:25:02
【问题描述】:

我的 jstree 中有很多类别,我想在选择节点及其子节点时向用户添加一些信息,例如加载指示器。我试过这种方式 how to show loading image when a child node is loading data dynamically using JSTREE? 但它对我不起作用。

thisInstance.treeInstance.jstree({
            core: {
                data: values,
                themes: {
                    name: 'proton',
                    responsive: true
                }
            },
            plugins: plugins
        });

有什么想法吗?

当我选择或取消选择时,我想让用户加载指示器知道某些工作正在进行中

【问题讨论】:

  • 为了了解什么不起作用,您需要展示代码、您为解决它所付出的努力以及您遇到的问题。
  • 我添加了其他信息

标签: javascript jquery css jstree


【解决方案1】:

我有同样的问题。 我想在选择有很多孩子的节点时显示加载器。

“activate_node”函数完成时触发事件,启动时不触发。

我尝试使用点击事件: // that.jsTree = $('#tree-view');

that.jsTree.on("click.jstree", ".jstree-anchor", function (e) {
    console.log("on click jstree"); // display
    that.jsTree.hide(); // test not work
});

that.jsTree.on('activate_node.jstree', function (e, data) {
     console.log("after activate_node"); // display
     that.jsTree.show(); // test not work
});

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-02-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多