javascript - 如何将文本字段项放置在 extJS 选项卡字段中
问题描述
如何将文本字段项放置在 extJS 选项卡字段中。
我已经要求我想放置在 extJS 文本字段上的文本字段。这是图像。
现在下面是我的代码。标签很好,但看不到 extJS 文本字段。我在这里缺少的任何具体内容,
{
xtype : "panel",
region: 'center',
floatable: false,
margin: '0 0 0 0',
cls: 'tabpanel-common ',
items:[{
xtype: 'tabpanel',
items: [{
xtype: 'panel',
title: "panel 1",
items: []
},{
xtype: 'panel',
title: "Panel2",
items: []
},{
xtype: 'panel',
title: "panel3",
items: []
},{
xtype: 'panel',
title: "panel4",
items: []
},{
xtype: 'tbfill'
},{
xtype: 'textfield',
// itemId: 'buttonItemId',
text: 'Button',
hidden: false,
padding: '3px',
title: "Search",
margin: '2px 5px 5px 2px',
}]
}],
listeners: {
boxready: 'boxready',
scope: 'controller'
},
}
解决方案
您可以使用tabBar配置道具:
Ext.application({
name: 'Fiddle',
launch: function () {
Ext.create('Ext.tab.Panel', {
height: 400,
renderTo: document.body,
tabBar: {
items: [{
xtype: 'tbfill'
}, {
xtype: 'textfield',
triggers: {
search: {
cls: 'x-form-search-trigger',
handler: function () {
console.log('Search trigger is clicked', this.getValue());
}
}
}
}]
},
items: [{
title: 'Foo',
html: "FOO"
}, {
title: 'Bar',
html: "BAR"
}]
});
}
});
推荐阅读
- html - 即使左 div 有更多数据,也希望左 div 与内容 div 匹配大小
- xcode - 如何解决此错误:“找不到 -lGTMSessionFetcher 的库”
- android - 即使在某些设备上授予所有必需的权限后,调用 WifiManager.startLocalOnlyHotspot() 也会引发 SecurityException
- android - 从android中提取Sqlite数据库会产生空数据库
- google-sheets - 根据表格内容编译列表
- python - 改变图像的范围并用该范围而不是像素匹配图
- webfonts - 交换时Titillium字体更小
- javascript - 访问json对象javascript中的值和键?
- swift - 为什么我会收到错误消息:“类不符合键专业的键值编码”,即使专业是类的属性?
- junit - 如何在 JUnit 中实现 WebUI 对象