我對 Extjs 非常陌生,我目前正在使用一棵樹,我可以在其中建立一個(gè)分支,然後建立部分。我需要有關(guān)程式碼編輯功能的協(xié)助。
createSection:函數(shù)(按鈕){ 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(), },
檢查這個(gè)小提琴,它有點(diǎn)擊和雙擊編輯的選項(xiàng) 動(dòng)態(tài)樹單元編輯器