Uncaught TypeError: Cannot read property 'internalId' of undefined at constructor.updateIndexes (ext-all-debug.js:164584) at constructor.refresh (ext-all-debug.js:164159) at constructor.callParent (ext-all-debug.js:11714) at constructor.refresh (ext-all-debug.js:165799) at constructor.doFirstRefresh (ext-all-debug.js:164633) at constructor.bindStore (ext-all-debug.js:164610) at constructor.callParent (ext-all-debug.js:11714) at constructor.bindStore (ext-all-debug.js:165869) at constructor.updateStore (ext-all-debug.js:164958) at constructor.setter [as setStore] (ext-all-debug.js:9894)
报错信息明显可看出internalId为 undefined
检查后没有发现有使用c错误,固一行行删除代码排查,最后发现:
在EXTJS6.0下使用tpl渲染页面的时候不能使用span标签,如需使用可以用font代替
关于是否还有其他标签不能使用,后续发现会继续补充。
代码示例如下:
// 修改前 tpl: [ '<tpl for=".">', '<div style="float:left" align="center">', '<div style="padding-bottom: 5px;">', '<span>申请开票 </span>', '<span style="background-color: #006CB8;color: white"> SCM </span>', '</div>', '<div style="border-top: 1px solid black;width: 240px;">{createTime}</div>', '</div>', '</div>', '</tpl>', ] //修改后 ,区别只是span修改为font tpl: [ '<tpl for=".">', '<div style="float:left" align="center">', '<div style="padding-bottom: 5px;">', '<font>申请开票 </font>', '<font style="background-color: #006CB8;color: white"> SCM </font>', '</div>', '<div style="border-top: 1px solid black;width: 240px;">{createTime}</div>', '</div>', '</div>', '</tpl>', ]