mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
chore(tab): do not add .pane to ion-nav-view tab
This commit is contained in:
6
js/angular/directive/tab.js
vendored
6
js/angular/directive/tab.js
vendored
@@ -75,17 +75,19 @@ function($compile, $ionicConfig, $ionicBind, $ionicViewSwitcher) {
|
||||
var childElementCount = tabContentEle.childElementCount;
|
||||
element.empty();
|
||||
|
||||
var navViewName;
|
||||
var navViewName, isNavView;
|
||||
if (childElementCount) {
|
||||
if (tabContentEle.children[0].tagName === 'ION-NAV-VIEW') {
|
||||
// get the name if it's a nav-view
|
||||
navViewName = tabContentEle.children[0].getAttribute('name');
|
||||
tabContentEle.children[0].classList.add('view-container');
|
||||
isNavView = true;
|
||||
}
|
||||
if(childElementCount === 1) {
|
||||
// make the 1 child element the primary tab content container
|
||||
tabContentEle = tabContentEle.children[0];
|
||||
}
|
||||
tabContentEle.classList.add('pane');
|
||||
if (!isNavView) tabContentEle.classList.add('pane');
|
||||
tabContentEle.classList.add('tab-content');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user