Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue2-org-tree

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue2-org-tree

A simple organization tree chart based on Vue2.x

  • 1.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
254
decreased by-75.53%
Maintainers
1
Weekly downloads
 
Created
Source

vue-org-tree

A simple organization tree chart based on Vue2.x

Usage

NPM

# use npm
npm i vue2-org-tree

# use yarn
yarn add vue2-org-tree

Import Plugins

import Vue from 'vue'
import Vue2OrgTree from 'vue2-org-tree'

Vue.use(Vue2OrgTree)

// ...

CDN

# css
<link href="https://unpkg.com/vue2-org-tree@1.1.0/dist/style.css">

<!--
...
-->

# js
<script src="https://unpkg.com/vue@2.5.17/dist/vue.js"></script>
<script src="https://unpkg.com/vue2-org-tree@1.1.0/dist/index.js"></script>

API

  • props
    propdescriptontypedefault
    dataObject
    propsconfigure propsObject{label: 'label', children: 'children', expand: 'expand'}
    labelWidthnode label widthString | Number.auto
    collapsablechildren node is collapsableBooleantrue
    renderContenthow to render node labelFunction-
    labelClassNamenode label classFunction | String-

selectedKey | The key of the selected node | String | - selectedClassName | The className of the selected node | Function | String | -

  • events

    • on-expand callback function

      • params e Event
      • params data Current node data

      well be called when the collapse-btn clicked

    • on-node-click callback function

      • params e Event
      • params data Current node data

      well be called when the node-label clicked

Example

  • default

    default

  • horizontal

    horizontal

Browser support

use table layout!

IE9+、Chrome、Firefox、Opera

Change log

  • 1.2.0

    • Add props: selectedClassName, selectedKey
  • 1.1.1

    • Fixed bug #11
  • 1.1.0

    • Extract CSS
    • Fixed unable to use in browser #9

License

MIT

FAQs

Package last updated on 08 Jul 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc