0
即時通訊工具中的新手。 我想在面板中顯示一些信息。 我創建一個面板,當我重寫數據tpl「未捕獲TypeError:無法設置屬性'innerHTML'爲null」發生。Extjs4 MVC Xtemplate錯誤:無法設置屬性'innerHTML'爲空
代碼:
initComponent: function(){
var me = this;
var data={
name:'lux',
age:'22'
};
var item=Ext.create('Ext.panel.Panel',{title:'title'});
var tpl=new Ext.XTemplate(
'<p>Name: {name}</p>',
'<p>Company: {age}</p>',
'<p>Location:</p>',
'<p>Kids: '
);
tpl.overwrite(item.body, data);
Ext.applyIf(me,{
items:item
});
me.callParent(arguments);
}