ExtJS에 새로운tabpanel 추가 전체 페이지 불러오기(viewport 레이아웃)

2004 단어 htmlext
이 문제는 나를 이틀 동안 괴롭혔는데, 지금 마침내 해결되었으니, 꺼내서 공유해라!
코드를 보십시오.
 
tree1.on('click',function(node){
    	var id=node.id;
    	var tab=Ext.getCmp('auto');
    	if(node.text == "    "){
	       if(id=='information'){
	       		var tabItem=Ext.getCmp('form_information');
	       		if(tabItem==null){
					tabItem=tab.add(new Ext.Panel({
						id:"form_information",
						title:"    ",
						closable:true,
						autoScroll:true,
						frame:true,
						items:[{
							showMask: true,
							maskMsg: '      ',
							scripts:true,
							html:" <iframe scrolling='auto' frameborder='0' width='100%' height='100%' src='http://localhost:8080/HH/test.html'> </iframe>"
						}]
					}));
					tab.setActiveTab(tabItem);
				}
				else{
					tab.setActiveTab("form_information");
				}
	       		
	        }else{
	        	Ext.MessageBox.alert("error");
	        }
    	}
    	else if(node.text == "    "){
    		 if(id=='schoolinfo'){
    		 	
    		 }
    	}
    });

 
핵심은 다음과 같습니다.
 
tabItem=tab.add(new Ext.Panel({
						id:"form_information",
						title:"    ",
						closable:true,
						autoScroll:true,
						frame:true,
						items:[{
							showMask: true,
							maskMsg: '      ',
							scripts:true,
							html:" <iframe scrolling='auto' frameborder='0' width='100%' height='100%' src='http://localhost:8080/HH/test.html'> </iframe>"
						}]
					}));

autoLoad를 사용하지 마십시오. 불러온 후 항상 페이지가 혼란스럽습니다.지금은 html로 바꾸기만 하면 됩니다. "

좋은 웹페이지 즐겨찾기