diff --git a/src/tab/navtab.js b/src/tab/navtab.js index 8ed76fa..493c53d 100644 --- a/src/tab/navtab.js +++ b/src/tab/navtab.js @@ -1,4 +1,4 @@ -/** +/** * @fileOverview 导航标签 * @author dxq613@gmail.com * @ignore @@ -320,10 +320,13 @@ define('bui/tab/navtab',['bui/common','bui/menu'],function(require){ }, closeAll:function(){ var _self = this, - children = _self.get('children'); + children = _self.get('children'),actived; BUI.each(children,function(item){ if(item.get('closeable')){ item.close(); + }else if(!actived){ + _self.setActived(item.get('id')); + actived = true; } }); }, @@ -331,7 +334,7 @@ define('bui/tab/navtab',['bui/common','bui/menu'],function(require){ var _self = this, children = _self.get('children'); BUI.each(children,function(item){ - if(curItem !==item){ + if(curItem !==item&&item.get('closeable')){ item.close(); } diff --git a/src/tab/navtabitem.js b/src/tab/navtabitem.js index c879b26..195a578 100644 --- a/src/tab/navtabitem.js +++ b/src/tab/navtabitem.js @@ -49,7 +49,7 @@ define('bui/tab/navtabitem',['bui/common'],function(requrie){ var _self = this, el = _self.get('el'); //el.attr('title',v); - $('.' + CLS_ITEM_TITLE,el).html(v); + $('.' + CLS_ITEM_TITLE,el).html(v).attr("title",v); }, _uiSetActived : function(v){ var _self = this,