EXTJS tpl绑定model报错Uncaught TypeError: Cannot read property 'internalId' of undefined

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>申请开票&nbsp;&nbsp;</span>',
                  '<span style="background-color: #006CB8;color: white">&nbsp;&nbsp;SCM&nbsp;&nbsp;</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>申请开票&nbsp;&nbsp;</font>',
                  '<font style="background-color: #006CB8;color: white">&nbsp;&nbsp;SCM&nbsp;&nbsp;</font>',
                '</div>',
                '<div style="border-top: 1px solid black;width: 240px;">{createTime}</div>',
            '</div>',
        '</div>',

         '</tpl>',

    ]

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值