0
작업 표시 줄 빠른 시작에 단추를 추가해야하지만 예를 들어 확인 메시지 상자를 표시하는 로그 아웃 단추와 같은 모듈 창을 열고 싶지 않습니다. :Extjs Desktop TaskBar에 단추 추가 Quickstart
getTaskbarConfig: function() {
var ret = this.callParent();
me = this;
return Ext.apply(ret, {
quickStart: [
{ name: 'Window', iconCls: 'icon-window', module: 'ext-win' },
{ name: 'Logout', iconCls:'logout', handler: me.onLogout}
]
});
},
onLogout: function() {
Ext.Msg.confirm('Logout', 'Are you sure you want to logout?');
},
그리고 내가 TaskBar.js의 getQuickStart 기능이로 파일을 변경 :
getQuickStart: function() {
var me = this, ret = {
minWidth: 20,
width: Ext.themeName === 'neptune' ? 70 : 60,
items: [],
enableOverflow: true
};
Ext.each(this.quickStart, function (item) {
ret.items.push({
tooltip: { text: item.name, align: 'bl-tl' },
overflowText: item.name,
iconCls: item.iconCls,
module: item.module,
//handler: me.onQuickStartClick, **original code**
handler: item.handler == undefined ? me.onQuickStartClick : item.handler,
scope: me
});
});
return ret;
}
그러나이 작동하지 않습니다, 작업 표시 줄의 빠른 시작에 간단한 버튼을 추가하는 방법이 있나요?
당신은 이것을 위해 바이올린을 제공 할 수 있습니까? 그것의 당신이 시도하고 싶었던 명확하지 않은가? https://fiddle.sencha.com –
을 시도해보십시오. 문제를 해결하고 답변을 게시했습니다. 답장을 보내 주셔서 감사합니다. – Remigio