//修復導航欄
var headerList=$api.domAll('header');
for(var i=0;i<headerList.length;i++){
$api.fixStatusBar(headerList[i]);
}
//修復footer,這個方法,api.js中沒有需要另外添加
$api.fixTabBar($api.byId('footer'));
添加代碼(添加進api.js中)
u.fixTabBar = function(el){ if(!u.isElement(el)){ console.warn('$api.fixTabBar Function need el param, el param must be DOM Element'); return 0; } el.style.paddingBottom = api.safeArea.bottom + 'px'; return el.offsetHeight;}