Extjs component inside Ext.XTemplate on EXTJS 4

后端 未结 1 1830
甜味超标
甜味超标 2021-02-04 13:25

I\'m trying to add extjs components to tpl panel. Is there anyway to insert component to tpl like this

Ext.create(\'Ext.panel.Panel\',{ 
    renderTo: Ext.getBo         


        
1条回答
  •  抹茶落季
    2021-02-04 14:00

    Try this

    Ext.create('Ext.panel.Panel', {
        renderTo: Ext.getBody(),
        data: {},
        listeners: {
            refresh: function() {
                var renderSelector = Ext.query('div.comment-add-textarea');
                for (var i in renderSelector) {
                    Ext.create('Ext.form.field.TextArea', {
                        height: 300,
                        renderTo: renderSelector[i]
                    });
                }
            }
        },
        tpl: Ext.create('Ext.XTemplate',
            '',
            '
    ', '
    ', { compiled: true }) });

    0 讨论(0)
提交回复
热议问题