xworker.html.jqueryesayui.layout.tabs/@searcher2
事物 onBeforeClose(onBeforeClose)

- 父事物:
- tabs
- 描述者:
- 事物
- thing
- 继承:
- EasyUIFunction
Fires before the tab panel is closed, return false to cancel this close action. The example below shows how to show confirm dialog before closing tab panel.
$('#tt').tabs({
onBeforeClose: function(title){
return confirm('Are you sure you want to close ' + title);
}
});
// using the async confirm dialog
$('#tt').tabs({
onBeforeClose: function(title,index){
var target = this;
$.messager.confirm('Confirm','Are you sure you want to close '+title,function(r){
if (r){
var opts = $(target).tabs('options');
var bc = opts.onBeforeClose;
opts.onBeforeClose = function(){}; // allowed to close now
$(target).tabs('close',index);
opts.onBeforeClose = bc; // restore the event function
}
});
return false; // prevent from closing
}
});
code
-
label
-
name
-
params
-
useChildsCode
是否使用子节点生成代码。
toHtml
-
toJavaScriptCode
-
-
-