헤더가있는 Ext.js 컨테이너가 있고 헤더에는 제목과 아이콘으로 텍스트가 포함되어 있습니다. 탭을 새로 고치는 데 사용됩니다. 해당 컨테이너 헤더에 대한 아이콘 클릭 이벤트를 어떻게 얻을 수 있습니까? 나는 icon: '@Url.Content("~/Images/icon-supp.png")',
텍스트 옆에 아이콘을 얻는 데 사용 했습니다. 내 코드는 다음과 같습니다.
'TabChange'는 탭이 변경된 경우에만 활성화되며 아이콘을 클릭하는 동안에는 활성화되지 않습니다.
추가 정보 : 중앙 컨테이너가 있습니다. 나는 Ext.tab.Panel을 추가하고 있습니다.
items: [
{
xtype: 'container',
title: 'FooText',
id: 'FooPanel',
icon: '@Url.Content("~/Images/icon-refresh.png")',
tools: [{
type: 'help',
handler: function(){
//Doesnt hit on click of tab
}
}, {
itemId: 'refresh',
type: 'refresh',
hidden: true,
handler: function(){
//Doesnt hit on click of tab
}
}
}],
listeners: {
activate: function () {
//This just hits only once when that tab gets activated./
alert('you clicked me');
},
click:function(){//Doesnt work},
},
handler:function(){//Doesnt work},
autoScroll: true,
},
이제 필요한 것은 이미지 아이콘을 클릭하면 핸델 이벤트입니다. 가능합니까?
마지막으로 제목에 html 이미지 버튼을 사용하고 onClick 이벤트를 처리했습니다.
title: 'fooTitle <input type="image" style="float: right;padding-left:10px; height: 15px;width:30px; " src="Images/icon-refresh.png" onclick="refreshFooTab()"></input>',
function refreshFooTab()
{...}
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다