【发布时间】:2019-09-05 13:18:17
【问题描述】:
我有这个
Ext.define('MyComp', {
extend: 'Ext.container.Container',
id: 'myid',
alias: 'widget.myid',
xtype: 'myid',
layout: {
type: 'hbox'
},
config: {
mydata: 'Hi there!!!'
},
items: [
{
xtype: 'textfield',
name: 'name',
fieldLabel: **this.config.mydata**, // this is what I need to do
labelWidth: 100,
labelAlign: 'right'
},
{
xtype: 'button',
text: 'Go',
}
],
constructor: function () {
this.callParent(arguments);
},
initComponent: function () {
this.callParent(arguments);
}
});
如何使用config.mydata 文本作为字段标签?我尝试了this.getView().config.mydata 和一种组合,但没有成功。我怎样才能实现这个目标?
【问题讨论】:
标签: extjs