未捕获的TypeError:无法读取null ExtJS 4.0.7的属性'nextSibling'

时间:2018-02-14 17:50:56

标签: dom extjs

尝试使用ExtJS渲染表格时出现此错误。该表按预期呈现,但我无法找出错误的原因。这仅在呈现表时发生。如果我将所有autoEl替换为div,则不再出现错误。

Rendered Table image

  

未捕获的TypeError:无法读取null的属性'nextSibling'

以下是呈现表格的代码

Ext.application({
  name: 'AM',

  // appFolder: 'app',

  launch: function() {
    Ext.create("Ext.Container", {
      autoEl: "div",
      cls: "card",
      items: [{
        xtype: "container",
        autoEl: "div",
        cls: "row",
        style: {
          "margin-left": "20px",
          "margin-right": "20px"
        },
        items: [{
          xtype: "container",
          autoEl: "table",
          cls: "table table-hover table-striped",
          items: [{
            xtype: "container",
            autoEl: "thead",
            id: "tablethead",
            items: [{
              xtype: "container",
              autoEl: "tr",
              items: [{
                xtype: "component",
                autoEl: "th",
                html: "ROW"
              }]
            }]
          }, {
            xtype: "container",
            autoEl: "tbody",
            items: [{
              xtype: "container",
              autoEl: "tr",
              items: [{
                xtype: "component",
                autoEl: "td",
                html: "CELL"
              }]
            }]
          }]
        }]
      }],
      renderTo: Ext.getBody()
    })
  }
});

0 个答案:

没有答案
相关问题