87,919
社区成员
发帖
与我相关
我的任务
分享
var treejson = [
{"id":1,"text":"一年级","children":[{"id":11,"text":"一年级1班","leaf":true},
{"id":12,"text":"一年级2班","leaf":true}]},
{"id":2,"text":"二年级","leaf":true},
{"id":3,"text":"三年级","leaf":true}
]
var store = Ext.create( 'Ext.data.TreeStore',{
fields : ['id', 'text'],
data:treejson,
root:{
expanded:true,
text:'光明小学',
id:'0'
},
})
{
text:'编辑',
handler:function(){
Ext.MessageBox.prompt('标题','请输入',function(btn,text){
if(btn=='ok'){
record.data.text=text;
store.load();
}
}
)
}
}