Giter Club home page Giter Club logo

vue-easy-tree's Issues

开启虚拟滚动时,懒加载需要增加node-key么?

开启虚拟滚动时,懒加载我这边测试有问题

<template>
  <div class="ve-tree" style="height:calc(100vh - 20px)">
    <vue-easy-tree
      ref="veTree"
      node-key="id"
      height="calc(100vh - 20px)"
      :props="props"
      lazy
      :load="loadNode"
    ></vue-easy-tree>
  </div>
</template>

<script>
export default {
  data() {
    return {
      props: {
        label: "name",
        children: "children"
      },
      treeData: []
    };
  },
  created() {

  },
  methods: {
    loadNode(node, resolve) {
      if (node.level === 0) {
        return resolve([{ name: 'region' }]);
      }
      if (node.level > 1) return resolve([]);

      this.getChildrenData(resolve)      
    },
    getChildrenData(resolve) {
      setTimeout(() => {
        const data = [
          {
            name: Math.random(),
          },
          {
            name: Math.random(),
          },
          {
            name: Math.random(),
          },
          {
            name: Math.random(),
          },                     
        ]

        resolve(data)
      }, 1000)
    }    
  }
};
</script>

<style>
</style>

image

在出现滚动条后,向上滚动过程会突然全部收起所有的节点

  • 项目描述: 我原来使用el-tree的updateKeyChildren来实现类似点击某节点后再动态加载该节点下的数据,并没有采用el-tree组件的lazy+load的形式去懒加载,后来某些节点下面会有上万条数据导致页面卡死后,尝试使用vue-easy-tree的虚拟滚动来解决问题

  • 问题描述: 再直接替换el-tree为vue-easy-tree时,没有任何报错,每个节点都能顺利展开,尤其是上万条节点也能顺利显示,但是当出现滚动条时,只要向上滚动至接近顶部时,所有展开的节点会全部收起。

支持 props.children 为函数吗?

支持 props.children 为函数吗?
在某些层级不想让其有下层级,想通过改变 props.children 实现,比如 props.children(data, node) 让开发者来判断是否有下层级?

非常好

谢谢大佬~非常感谢,不管样式还是功能都很全,

不同的节点可以不一样的高吗?

比如一个树结构,有些节点需要高度大些,有些节点需要高度小些,有属性可以进行这样的调整吗 ?发现有个item-size是可以调节高度的,但他是调整所有节点高度,可以一些特殊的节点去专门调节他的高度吗;如果使用scoped slot的话 只能改样式,但涉及到高度时,超出的部分并不能给高撑开

从隐藏到显示,虚拟列表不生效

我把vue-easy-tree和el-select组合了一下,做成了树型的下拉框组件,展开下拉框的时候虚拟列表不生效,布局也不正确,要不要考虑解决一下这种从隐藏到显示的问题,例如可以向外暴露一个重新渲染的函数

支持展开收起动画

于 Element-ui 的组件相比,缺少了展开/收起的动画。

缺少动画也就缺少了一些自然的感觉

根据data中的属性,隐藏checkbox

大佬,我想实现根据数据中的某个属性,决定是否展示checkbox,怎么弄啊。比如图片中,不想要通道的checkbo展示出来。这个树的层级不定,可能会嵌套很深。
image

不能使用height:​ 100%定义高度

提示报错:Error in v-on handler: "Error: Rendered items limit reached"

It seems the scroller element isn't scrolling, so it tries to render all the items at once. Scroller: <div class=​"vue-recycle-scroller ready direction-vertical" style=​"height:​ 100%;​ overflow-y:​ auto;​ scroll-behavior:​ smooth;​">​…​​
vue-virtual-scroller.esm.js?e508:619 Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.

发现子节点超过2000多好像就会报这样的错,然后数据就只会加载一半

不兼容低版本Vue

提示item跟active is not defined,查看原因发现不兼容vue2.5.17,能否兼容一下

滚动到底部渲染速度慢

正要实现虚拟滚动,就找到你这个了,赞
不过跑了demo,发现最顶端的渲染延迟可忽略,但几万节点时,最底端的节点渲染会有延迟,卡顿了几下,是因为上面节点太多,累计计算的原因么【展开节点2w】
Peek 2022-04-05 11-03

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.