Original "Open source a tree-level component Vue-ztree written in Vue"

Source: Internet
Author: User

Recently due to the needs of the background management project, the page needs to make an infinite tree needs, I first thought of the plugin ztree, but I think it is too big, or self-clothed it.

Ztree's demo address: http://www.treejs.cn/v3/demo.php

I brought the Ztree style library, I wrote the algorithm, the whole of a small and beautiful vue-ztree components, it basically can meet my business needs, I also hope to benefit the open source community, I intend to open it up.

Profile:

1:vue-ztree's

How 2:vue-ztree is called

The technical point of 3:vue-ztree

4:vue-ztree's Open Source address

1:vue-ztree's

The Vue-ztree effect, as shown in:

Figure one: Figure II:

2:vue-ztree Method of Invocation:

component notation, such as:

Vue-ztree's parameter explanation:

Parameters Type Default value Describe
List Array - Structure data sources for trees
Func Function - Click the node callback method
Is-open Bealoon True Whether to expand the tree

3. Technical points of Vue-ztree

The technical point of Vue-ztree is mainly the use of recursive algorithms, and some clever coding techniques.

Recommended Understanding Vue Component Tree recursive knowledge, address : Https://github.com/vuejs/vue/tree/dev/examples/tree

4. Vue-ztree's Open Source address

Open Source Address: https://github.com/lisiyizu/vue-ztree, welcome to fork, suggestions.

Installation Run steps:

1:NPM Install

2:NPM Run Dev

See the effect of running

Original "Open source a tree-level component Vue-ztree written in Vue"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.