从Ext5升级到7.2后,以编程方式启用按钮后,将无法再看到工具提示。
Ext.define('X', {
extend: 'Ext.panel.Panel',
initComponent: function() {
this.tbar = [{
text: 'Foo',
disabled: true,
itemId: 'fooBtn',
tooltip: 'FooTip',
handler: function(btn){
this.setHtml('Test')
},
scope: this
},
{
text: 'Bar',
tooltip: 'BarTip',
handler: function(btn) {
this.down('#fooBtn').enable();
},
scope: this
}];
this.callParent();
}
});
Ext.application({
name: 'Fiddle',
launch: function() {
new X({
renderTo: document.body,
title: 'Foo',
width: 200,
height: 200
});
}
});
https://fiddle.sencha.com/#view/editor&fiddle/37o5
2条答案
按热度按时间aurhwmvo1#
奇怪的错误。您可以使用下列覆写来修正它:
vawmfj5a2#
您可以尝试在启用以下功能后添加一行:
可能是一个坏的解决方案,但需要更少的代码。