Extjs整体加载树节点

  Ext.onReady(function () {
            Ext.define('company', {
                extend: 'Ext.data.Model',
                fields: ['text']
            });
            
            var treeStore1 = Ext.create('Ext.data.TreeStore', {
                model: 'company',
                proxy: {
                    type: 'ajax',
                    url: 'Handler6.ashx',
                     //reader: 'json'
                }
            });
         
            Ext.create('Ext.tree.Panel', {
                title: '分级加载树节点',
                renderTo: Ext.getBody(),
                500,
                height: 350,
                store: treeStore1,
               // root:{text:'树根'},
                rootVisible:false,//root可有可无,但是这个配置项必须有,否则树结构无法显示。WHY???
                useArrows:true,
                columns: [
                    { xtype: 'treecolumn', text: '名称', dataIndex: 'text', sortable: true}
          
                ]
            });
        });

原文地址:https://www.cnblogs.com/lz3018/p/4579805.html