【问题标题】:Sencha Architect: Build a treeSencha Architect:建造一棵树
【发布时间】:2013-01-03 09:08:28
【问题描述】:

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

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

提前谢谢你

【问题讨论】:

    标签: extjs tree treenode sencha-architect


    【解决方案1】:
    1. 使用下面指定的配置添加TreeStore*
    2. 使用 {store: 'TreeStore', rootVisible: false} 添加TreePanel

    *

    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 }
        ]
    }
    

    编辑1:
    按此绿色图标可编辑根配置。

    【讨论】:

    • 我无法添加代码,因为代码是只读的,我该如何解决?我应该为 TreeStore 添加一个模型,还是不需要它?
    • 只添加一个字段。那是一个简化的模型。您是否有权编辑代码?
    • 不,我不能编辑代码。它是只读的;我无法剪切、粘贴或添加任何内容
    猜你喜欢
    • 2017-10-27
    • 1970-01-01
    • 1970-01-01
    • 2018-10-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-05-23
    • 1970-01-01
    相关资源
    最近更新 更多