Sencha Architect:建造一棵树

时间:2013-01-03 09:08:29

标签: extjs tree treenode sencha-architect

如何构建 ins Sencha Architect ?我在网上找到的所有内容都与编辑在我的情况下只读的代码有关。我该怎么办?

请帮忙!我真的很感激,因为我一直很难搞清楚。

提前谢谢

1 个答案:

答案 0 :(得分:2)

  1. 使用下面指定的配置添加TreeStore *
  2. 使用{store:'TreeStore',rootVisible:false}添加TreePanel
  3. *

    fields: [{
        name: 'text'
    }],
    //please note that you need to wrap the root config inside an object {}
    root: {
        expanded: true,
        children: [
                { text: "detention", leaf: true },
                { text: "homework", expanded: true, children: [
                    { text: "book report", leaf: true },
                    { text: "algebra", leaf: true}
                ] },
                { text: "buy lottery tickets", leaf: true }
        ]
    }
    

    <强> EDIT1:
    按此绿色图标可编辑根配置 Edit mode