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

@xlaoyu/enhanced-el-tree

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xlaoyu/enhanced-el-tree

enhanced element-ui's tree component

  • 1.1.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

enhanced-el-tree

Base on element-ui's tree component, add some useful function and horizontal-mode

Futures

horizontal mode

Or can be said that is multiple-cascader component.Try it Demo demo

restrict:when use horizontal mode,some origin tree property would not take efffect, eg: indent, accordion etc.

several useful methods

NameDescriptionParameters
getAllCheckedKeyslike getCheckedKeys but includes indeterminate nodes
getAllCheckedNodeslike getCheckedNodes but includes indeterminate nodes
setCheckedNodesPreciselyUsually used with getAllCheckedNodes to restore the original state of the treean array of nodes get from getAllCheckedKeys
setCheckedKeysPreciselyUsually used with getAllCheckedKeys to restore the original state of the treean array of keys get from getAllCheckedKeys
getCheckedKeysWithoutChildget checked node except all child checked nodes, look at the example below
getCheckedNodesWithoutChildditto

getCheckedKeysWithoutChild example:

/**
 *
 * @example
 *  level1 - intermediate
 *    level1.1 - checked
 *      level1.1.1 - checked
 *      level1.1.2 - checked
 *    level1.2 - checked
 *    level1.3 - intermediate
 *      level1.3.1 - checked
 *      level1.3.2 - not checked
 *    level1.4 - not checked
 *  level2 - checked
 *
 *  getCheckedKeysWithoutChild() will return [level2, level1.1, level1.2, level1.3.1]
 */

Installation

$ npm install @xlaoyu/enhanced-el-tree -D

Usage

<template>
  <enhanced-el-tree horizontal></enhanced-el-tree>
</template>

<script>
import EnhancedElTree from '@xlaoyu/enhanced-el-tree';

// component constructor
{
  name: 'FooComponent',
  components: {
    EnhancedElTree
  }
}
</script>

Denpencics

Vue@2.5.13

Element@2.2.1

License

MIT @ xlaoyu

Keywords

FAQs

Package last updated on 28 Mar 2018

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