New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

simter-vue-tree

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simter-vue-tree

A vue tree component

latest
Source
npmnpm
Version
0.1.1
Version published
Maintainers
1
Created
Source

simter-vue-tree

A vue tree component. Demo.

Requirement

NameVersion
Vue2.5+
Parcel1.10+

Develop

yarn install
yarn start

Then visit http://localhost:1234.

Build

yarn run build

Use rollup build component to dist directory. Use parcel build demo to docs/demo directory.

Props

NameRequireValueTypeDescription
nodestrue[{}]
[String]
Function
Define tree nodes.
- Array : The child nodes, String array item means setting the label property
- Function : return a array or Promise resolve with the child nodes, the first param is the parent node object
├ labeltrueString
Function
The node's visible text. It's the string value or the function return value. The function's first param is the node object
├ iconfalseStringThe node's icon class
├ ...customfalseCustomThe custom properties for this node
├ nodesfalse[{}]
Function
The nested nodes
parentNodefalseNodeThe parent node that this tree belong to
classesfalse{}Define inner dom elements global classes
├ hoverfalseStringThe class to add when hover on the node
├ activefalseStringThe class to add when the node is active
├ treefalseStringThe extra tree class to add
├ nodefalseStringThe extra node class to add
├ wrapperfalseStringThe extra node wrapper class to add
├ togglefalseStringThe extra toggle class to add
├ iconfalseStringThe extra icon class to add
├ labelfalseStringThe extra label class to add
├ collapsedfalseStringThe folder's collapsed class
├ expandedfalseStringThe folder's expanded class

Events

NameParamsDescription
click-nodenodeemit when use click the node

Html Structure

<ul class="st-tree">
  <!-- folder node -->
  <li class="st-node">
    <div class="st-wrapper">
      <span class="st-toggle"></span>
      <span class="st-icon"></span>
      <span class="st-label">Node 1</span>
    </div>
    <ul class="st-tree">
      <!-- leaf node -->
      <li class="st-node">
        <div class="st-wrapper">
          <span class="st-toggle"></span>
          <span class="st-icon"></span>
          <span class="st-label">Node 1-1</span>
        </div>
      </li>
      ...
    </ul>
  </li>
  <!-- leaf node -->
  <li class="st-node">
    <div class="st-wrapper">
      <span class="st-toggle"></span>
      <span class="st-icon"></span>
      <span class="st-label">Node 2</span>
    </div>
  </li>
  ...
</ul>

Keywords

simter

FAQs

Package last updated on 12 Dec 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