aotoo-react-treex
Install
// installyarn add aotoo-react-treex
USAGE
Depends on aotoo this library, Aotoo
is a global variable
import Aotoo from 'aotoo'import treex from 'aotoo-react-treex' const _data = title: '' idf: 'aaa' title: 'abcfd' parent: 'aaa' title: 'bcasd' parent: 'aaa' title: 'aacwq' parent: 'aaa' title: <button>123</button> idf: 'bbb' title: 'yyufs' parent: 'bbb' title: 'xfdsw' parent: 'bbb' title: 'xxxdsehh' parent: 'bbb' const treeList = // Render in the dom of the specified id treeList // ======== or treeList{ ...}const box = <div> treeList <button>button</button> </div> Aotoo
API
$update(opts)
// after `treeList.render(id)`,You can dynamically update the structure after you update the data(_data) treeList // ======== or treeList
The above operation causes the structure to be re-rendered and the callback method rendered
is executed again
$append(opts)
// after `treeList.render(id)` treeList // ======== or treeList
access the above operation, you can dynamically append the structure after you append the data(_data)
$prepend(opts)
// after `treeList.render(id)` treeList // ======== or treeList
access the above operation, you can dynamically prepend the structure after you prepend the data(_data)
$delete(opts)
// after `treeList.render(id)` treeList // ======== or treeList
access the above operation, you can dynamically delete the structure after you delete the data(_data)
List status
$loading(opts)
// after `treeList.render(id)` treeList
access the above operation, will show loading bar
$over(opts)
// after `treeList.render(id)` treeList
access the above operation, will show over bar
$pulldown(opts)
// after `treeList.render(id)` treeList
access the above operation, will show pulldown bar
$trigger(opts)
// after `treeList.render(id)` treeList
access the above operation, will show trigger bar