Giter Site home page Giter Site logo

el-virtual-tree's Introduction

el-virtual-tree

el-tree 支持虚拟滚动

Attributes、props、方法、Events

el-tree 一致

依赖插件

vue-virtual-scroll-list

使用方法(使用前请确认已引入 element-ui

第一步 安装依赖

npm i vue-virtual-scroll-list

第二步 导入组件

在你的项目组件目录中(一般为src/components)新建文件夹el-virtual-tree, 将本项目所有文件粘贴至该文件夹

按需引入

import ElVirtualTree from '@/src/components/el-virtual-tree'

vue components引入组件components: { ElVirtualTree }

或者全局引入

import Vue from 'vue';
import ElVirtualTree from '@/src/components/el-virtual-tree;

Vue.use(ElVirtualTree)

使用说明

设置组件高度height属性开启虚拟滚动,否则不开启。

height属性为字符类型,需自带单位,例:height="300px" height="calc(100vh - 200px)"

完整例子

<el-virtual-tree
:data="treeData"
node-key="id"
height="calc(100vh - 210px)" // 设置该属性则开启虚拟滚动
>
...
</el-virtual-tree>
```

el-virtual-tree's People

Contributors

niesk avatar

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.