Creating JQuery Easyui / TopJUI basic form of a tree

<table data-toggle="topjui-treegrid"
       data-options="id:'menuTg',
        idField:'id',
        treeField:'text',
        url:remoteHost+'/system/codeItem/getListByCodeSetIdAndLevelId?codeSetId=0&levelId=0',
        expandUrl:remoteHost+'/system/codeItem/getListByPid?pid={id}'">
    <thead>
    <tr>
        <th data-options="field:'uuid',title:'UUID',checkbox:true"></th>
        <th data-options="field:'text',title:'名称'"></th>
        <th data-options="field:'codeSetId',title:'体系代码'"></th>
        <th data-options="field:'id',title:'编号'"></th>
        <th data-options="field:'pid',title:'父级编号'"></th>
    </tr>
    </thead>
</table>


<!-- 表格工具栏开始 -->
<div id="menuTg-toolbar" class="topjui-toolbar"
     data-options="grid:{
           type:'treegrid',
           id:'menuTg',
           parentIdField:'pid'
       }">
        <a href="javascript:void(0)"
       data-toggle="topjui-menubutton"
       data-options="method:'expandAll',
       extend: '#menuTg-toolbar',
       btnCls:'topjui-btn-blue'">展开全部</a>
    <a href="javascript:void(0)"
       data-toggle="topjui-menubutton"
       data-options="method:'collapseAll',
       extend: 'menuTg-Toolbar # ', 
<- ended tables Toolbar ->!
</ div>
       btnCls:' topjui-btn-Blue ' "> Collapse All </a>

  

Show results
       The default page display
 

 

 
 Click to show the full effect

 

 
Note: This is an open level, click once to open a
Click folding effect (all at once collapsed.)
 

 

Plain HTML code, shows good package folding methods can be called directly.
 
 
   EasyUI Chinese network: http://www.jeasyui.cn
  TopJUI front-end frame: http://www.topjui.com
  TopJUI exchange community: http://ask.topjui.com

Guess you like

Origin www.cnblogs.com/xvpindex/p/10964079.html