在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
在 ExtJS 5.1 中,使用 tabpanel,用 setActiveTab 来指定激活哪个 tab 的时候抱错: Uncaught TypeError: c.isFocusable is not a function Caused By这是 ExtJS 5.1 的一个 open issue。 Solution加上如下代码 1 Ext.define('Override.ComponentQuery', { 2 override : 'Ext.ComponentQuery' 3 }, function() { 4 5 Ext.apply(this.pseudos, { 6 7 focusable : function(cmps) { 8 var len = cmps.length, results = [], i = 0, c; 9 10 for (; i < len; i++) { 11 c = cmps[i]; 12 // If this is a generally focusable Component (has a focusEl, is 13 // rendered, enabled and visible) 14 // then it is currently focusable if focus management is enabled 15 // or if it is an input field, a button or a menu item 16 if (c.isFocusable && c.isFocusable()) { 17 // if (c.isFocusable()) { 18 results.push(c); 19 } 20 } 21 22 return results; 23 }, 24 25 }); 26 }); Reference
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论