Skip to content

A Vue tree component using pure css to implement fold and expand

Notifications You must be signed in to change notification settings

turnon/pure-tree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pure-tree

A Vue tree component using pure css to implement fold and expand

Usage

<template>
  <div id="app">
    <tree :root="top"></tree>
  </div>
</template>

<script>
  import tree from '@ken_yuan/pure-tree'
  import '@ken_yuan/pure-tree/dist/pure-tree.css'

  export default {
    name: 'app',
    components: {
      tree
    },
    data() {
      return {
        top: {
          key: "a",
          value: "a",
          children: [{
            key: "b",
            value: "b",
            children: [{
              key: "d",
              value: "d"
            }, {
              key: "e",
              value: "e"
            }]
          }, {
            key: "c",
            value: "c"
          }]
        }
      }
    }
  }
</script>

About

A Vue tree component using pure css to implement fold and expand

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published