【发布时间】:2021-01-18 10:54:23
【问题描述】:
我的 ext js 有问题,我想在我的商店中使用引用从我的字段中获取价值,但是当我 console.log 时出现错误 lookupReference is not a function。
我的表格
items: [
{
xtype: 'combobox',
name: 'REC_TERMINAL_CODE_2',
fieldLabel: 'Terminal 2',
emptyText : 'Terminal',
reference: 'terminal2'
},
{
xtype: 'combobox',
name: 'REC_TERMINAL_CODE',
fieldLabel: 'Terminal',
emptyText : 'Terminal',
store: {
type: 'terminal'
},
displayField: 'terminal_name',
valueField: 'terminal_code',
value: 'T01',
minChars: 3,
queryParam: 'q',
queryMode: 'remote',
editable: false,
allowBlank: false,
fieldStyle: 'text-transform:uppercase',
afterLabelTextTpl: [
'<span style="color:red;font-weight:bold" data-qtip="Required"> *</span>'
],
flex: 1
},
]
在我的终端存储文件中
listeners: {
load: function (store, records, success) {
console.log(this.lookupReference('terminal2'))
if (!success) {
Ext.Msg.confirm('Status Error', 'This connection failed, reload ?',
function (choice) {
if (choice === 'yes') {
window.location.reload();
}
}
);
}
}
}
【问题讨论】:
标签: javascript extjs sencha-architect