GithubHelp home page GithubHelp logo

Comments (4)

hizzgdev avatar hizzgdev commented on July 20, 2024

这个功能在现有情况下就能做到。参考以下思路:

  1. 需要异步加载的节点,首次展示时设为折叠状态,并添加一个临时节点;
  2. 监听”加号“点击事件,异步加载数据后,通过API删除临时节点,并添加异步返回的数据

from jsmind.

asdfghjkl01 avatar asdfghjkl01 commented on July 20, 2024

@linchen1102 请问异步载入数据的方式实现了吗,能不能共享下代码

from jsmind.

DiSheng1994 avatar DiSheng1994 commented on July 20, 2024

这个功能在现有情况下就能做到。参考以下思路:

  1. 需要异步加载的节点,首次展示时设为折叠状态,并添加一个临时节点;
  2. 监听”加号“点击事件,异步加载数据后,通过API删除临时节点,并添加异步返回的数据
    官方提供的文档中无法监听“加号”点击事件,请问我要如何监听

from jsmind.

hizzgdev avatar hizzgdev commented on July 20, 2024

@DiSheng1994 用 dom 事件就可以了。这个元素大概长这样:

<jmexpander nodeid="sub2">-</jmexpander>

里面也有 nodeid 可供你使用。

from jsmind.

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.