0
items: [
         {
          xtype: 'textareafield',
           label: 'references',
           items: [{
                    xtype:'textareafield',
                      }
                 ]
                   }]

我想在 textarea 中创建一个 textarea 字段,但它只显示一个 textareafield 而没有显示内部 textareafield。

4

1 回答 1

1

itemsconfig 在这里不起作用,因为它不可用Ext.field,请尝试componentconfig 代替,如下所示:

{
    xtype: 'textfield',
    component: {
      xtype: 'container', 
      layout: 'vbox', 
      items: [
      {
        xtype: 'textareainput', 
        flex: 3,
      }, 
      {
        xtype: 'textareafield',
        flex: 1, 
      }
      ]},
},

P/S:幕后,Sencha Touch 2 默认设置componentconfig 为{xtype: "textareainput"},所以通过这个方法,你可以插入任何你想要的东西,比如按钮等等。

于 2012-04-13T04:31:17.337 回答