[英]Is it possible to use an xtype inside an ExtJS template
我想知道是否可以在ExtJS中執行類似的操作。 我正在將自己的按鈕創建為xtype,並希望在創建的表行中使用它。
testTpl: Ext.DomHelper.createTemplate(
{
tag: 'tbody',
children: [
{
tag: 'tr',
cls: 'test-row',
children:[{
tag: 'td',
cls: 'test-table-cell test-class1',
html: '{value1}'
},
{
tag: 'td',
xtype:'myxtype'
cls: 'test-table-cell test-class2',
html: '{value2}'
}]
}]
});
無法將ExtJS組件放置在extjs模板中。 盡管您可以做的是在模板中創建一個占位符,然后將ExtJS組件渲染到render函數中的該占位符中。
以下是一些示例鏈接:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.