treestore for extjs

Definition of treestore

sumTypeTree: {
    type: 'tree',
    rootVisible: true,
    //defaultRootProperty:'awardTotal',
    root: {
        expanded: true,
        text: 'All',
    },
    proxy: {
        type:'ajax',
        url : 'sumType/index',
        extraParams:{tree:true},
        reader: {
            type: 'json',
        }
    },
},
 The treestore needs to have a root attribute, all data starts from the root, and the data obtained by the proxy is appended to the children of the root
defaultRootProperty can modify the default children property
Ext.data.NodeInterface defines properties specific to treemodel
text text
leaf is a leaf node
 
The node of the treestore can be a simple treemodel or a combination of treemodel and model. In this case, the model attribute needs to be specified for the treestore
The root node is always not displayed in the treelist component, and you can set whether to display it in the treepanel component

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326449362&siteId=291194637