lodhua

rootnet

Usage no npm install needed!

<script type="module">
  import lodhua from 'https://cdn.skypack.dev/lodhua';
</script>

README

RootNet

In the project directory, you can:

components


Dialog

use

​import { Dialog } from 'rootnet';

API

​Dialog.defaultProps = {

​ footer: true,

​ header: true,

​ cancel : function()=>{},

​ confirm : function()=>{},

​ cancelButtonVisible: true,

​ confirmButtonVisible: true,

​ cancelButtonText: "取消",

​ confirmButtonText: "确认",

​};

Tree

use

​import { Tree } from 'rootnet';

API

​<Tree

​menu={menu}

​btns={['添加子节点','删除子节点']}

​type={'leftBotRed'}

​onClick={this.treeClick}

​tipsClick={this.tipsClick}

​onDragStart={this.handlerDragStart}

​onDragEnd={this.handlerDragEnd}

​onDragMove={this.handlerDragMove}

​ />

​menu= [ { name: "小明", id: 1, dragAble: true, checkBox: false, childrens: [ { name: '电子', id: 2, dragAble: true, checkBox: false, showTip: true, } ]

​}

​]

utils


Format

use

​import { NF } from 'rootnet/utils';

API

  1. 日期YYYY-MM-DD格式化 20180501=>2019-05-01

​export function Dateformat(patten) {}

​ 2.日期毫秒格式 毫秒转换为YYYY-MM-DD HH:MM:SS

​export function DateSecond(date) {}