Socket
Book a DemoInstallSign in
Socket

dd-rc-nstree

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dd-rc-nstree

---

0.1.8
latest
npmnpm
Version published
Weekly downloads
2
100%
Maintainers
1
Weekly downloads
 
Created
Source

dd-rc-nstree

基于 react + antd + zTree 定制的节点树。

安装

dd-rc-nstree

示例

import { Nstree } from 'dd-rc-nstree';

const App = React.createClass({
  nstreeBeforeInit(treeData) {
    return treeData.children[0];
  },
  render() {
    return  (
      <div className="nsTree-sidebar">
        <Nstree 
          beforeInit={this.nstreeBeforeInit}
          treeApi="http://127.0.0.1:8848/rig/worldtree/tree"
        />
      </div>
    );
  }
});

ReactDOM.render(<App />, document.getElementById('react-content'));

API

参数说明类型默认值
width宽度string、number200
height高度度string、number500
treeId节点树IDstring'nstree'
treeApi数据接口string''
zTreeObjSettingzTree配置object{}
beforeInit初始化前回调function(treeData)noop
afterInit初始化后回调function(zTreeObj)noop
searchsearch模块配置object
参数说明类型默认值
enabled是否开启搜索模块boolean
searchTypes搜索类型array
searchTypes = [{
  name: '搜索节点',
  type: 'ns'
}, {
  name: '搜索机器',
  type: 'machine'
}, {
  name: '搜索监控',
  type: 'collect'
}, {
  name: '初始化策略',
  type: 'init'
}, {
  name: '部署策略',
  type: 'deploy'
}]

refresh nsTree

$(document).trigger('refreshTree');

License

MIT

Keywords

react

FAQs

Package last updated on 19 Jul 2016

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.