zoukankan      html  css  js  c++  java
  • 多级分布加载树节点

    Ext.onReady(function () {
                Ext.define('companyInfo', {
                    extend: 'Ext.data.Model',
                    fields: [ 'companyName','staffNum']
                });
                var treeStore1= Ext.create('Ext.data.TreeStore', {
                    model: 'companyInfo',
                    proxy: {
                        type: 'ajax',
                        url: 'Handler5.ashx',
                       // reader: 'json'
                    },
                   // nodeParam: 'orgId',nodeParam默认为“node”
                    //autoLoad: true,
                    root: {//定义本store的根节点,后台需要根的id来选择加载根的节点。根的id默认是空的
                        name: '根节点',
                        id: '-1'
                    }
                });
                Ext.create('Ext.tree.Panel', {
                    title: '分级加载树节点',
                    renderTo: Ext.getBody(),
                    500,
                    height: 350,
                    store: treeStore1,
                    //rootVisible:false,
                    columns: [
                        { xtype:'treecolumn', text: '公司名称', dataIndex: 'companyName', sortable: true, flex: 1 },
                { text: '员工人数', dataIndex: 'staffNum', sortable: true, flex: 1 }
                    ]
                });
            });
            
            
            
            
            
  • 相关阅读:
    common-pool2连接池详解与使用
    Nginx实现页面缓存
    Nginx实现动静分离
    lnmp环境下nginx配置‘负载均衡’
    用phpstudy搭建的lnmp环境下mysql授权远程连接
    新浪OAuth网络登录,请求access_token时遇到21323的错误
    使用curl进行模拟登录
    yii2.0分页
    yii2.0表单自带验证码
    yii2.0查询关联数据以及widgets小部件
  • 原文地址:https://www.cnblogs.com/lz3018/p/4579791.html
Copyright © 2011-2022 走看看