首页  >  问答  >  正文

在 EXTJS 中创建 node.appendChild 时选择并编辑

我对 Extjs 非常陌生,我目前正在使用一棵树,我可以在其中创建一个分支,然后创建部分。我需要有关代码编辑功能的帮助。

createSection:函数(按钮){ var node = Button.up('menu').node;

if (node.data.leaf) {
        return false;
    }

    node.expand();

    var newSection = node.appendChild({
        name: 'New section ' + "(" + (node.childNodes.length +1) + ")" ,
        type: 'toc-by-system',
        leaf: false,
        id: uuid['v4'](),
        children: [],
        editor: {
            xtype: 'textfield'
        }
    });

    newSection.BeginEdit(),
},

P粉321676640P粉321676640180 天前417

全部回复(1)我来回复

  • P粉614840363

    P粉6148403632024-04-04 15:05:20

    检查这个小提琴,它有单击和双击编辑的选项 动态树单元编辑器

    回复
    0
  • 取消回复