easyui--tab 选项卡组件

easyui--tab 选项卡组件_第1张图片easyui--tab 选项卡组件_第2张图片


easyui--tab 选项卡组件_第3张图片easyui--tab 选项卡组件_第4张图片easyui--tab 选项卡组件_第5张图片

$('#box').tabs({
width:600,
height:600,
plain:false,
//fit:true,
//border:false,
scrollIncrement:1,
scrollDuration:1000,
tools:[{
iconCls:'icon-add',
handler:function(){
alert('添加');
},},
{}],
//tools:'#tab-tools',
toolPosition:'left',
tabPosition:'left',
headerWidth:100,
tabWidth:100,
tabHeight:50,
selected:1,
//showHeader:false,
onLoad:function(panel){
alert(panel);
},
onSelect:function(title,index){
alert('selected');
},
onUnselect:function(title,index){
alert('onUnselect');
},
onBeforeClose:function(title,index){
alert(title+'|'+index);
return false;
},
onClose:function(title,index){
alert('close');
},
onAdd:function(title,index){
alert('add');
},
        onUpdate:function(title,index){
alert('onUpdate');
},
onContextMenu:function(e,title,index){
alert(onContextMenu);
},












});
setTimeout(function(){
console.log($('#box').tabs('options'));
},5000);
setTimeout(function(){
console.log($('#box').tabs('tabs'));
},7000);
setTimeout(function(){
$('#box').tabs('add',{title:'new panel',selected:false,});
console.log('add');
},10000);
setTimeout(function(){
$('#box').tabs('select',1);
console.log('select');
},13000);
setTimeout(function(){
$('#box').tabs('select',0);
console.log('onUnselect');
},16000);
setTimeout(function(){
$('#box').tabs('close',1);
console.log('close');
},20000);
setTimeout(function(){

console.log($('#box').tabs('exists',4));
},22000);
setTimeout(function(){

console.log($('#box').tabs('getTab',1));
},24000);
setTimeout(function(){

console.log($('#box').tabs('getTabIndex','#tabs2'));
},26000);
setTimeout(function(){

console.log($('#box').tabs('getSelected'));
},28000);
setTimeout(function(){

$('#box').tabs('hideHeader');
console.log('hide');
},30000);
setTimeout(function(){

$('#box').tabs('showHeader');
console.log('show');
},32000);
setTimeout(function(){
$('#box').tabs('update',{tab:$('#update'),option:{Title:'new title'}});
console.log('new title');
},34000);


你可能感兴趣的:(easyui)