首頁  >  問答  >  主體

在 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 天前412

全部回覆(1)我來回復

  • P粉614840363

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

    檢查這個小提琴,它有點擊和雙擊編輯的選項 動態樹單元編輯器

    回覆
    0
  • 取消回覆