|
[superwebview]
关于窗口管理的问题
[复制链接]
问题 : 我底部导航用的是openFrameGroup管理的。这时候发现有个tab卡,我仍然想用openFrameGroup,可现在出现了问题。
图片 :
这个是正常的图片。这个是出现BUG的图片
代码 :function funIniGroup(){ var eHeaderLis = $api.domAll('header li'),
frames = [];
for (var i = 0,len = eHeaderLis.length; i < len; i++) {
frames.push( {
name: 'frame'+i,
url: './frame'+i+'.html',
bgColor : 'rgba(0,0,0,.2)',
bounces:true
} )
}
api.openFrameGroup({
name: 'group',
scrollEnabled: false,
rect: {
x: 0,
y: $api.dom('header').offsetHeight,
w: api.winWidth,
h: $api.dom('#main').offsetHeight
},
index: 0,
frames: frames
}, function (ret, err) {
});
}
// 随意切换按钮
function randomSwitchBtn( tag ) {
if( tag == $api.dom('#footer li.active') )return;
var eFootLis = $api.domAll('#footer li'),
eHeaderLis = $api.domAll('header li'),
index = 0;
for (var i = 0,len = eFootLis.length; i < len; i++) {
if( tag == eFootLis ){
index = i;
}else{
$api.removeCls(eFootLis, 'active');
$api.removeCls(eHeaderLis, 'active');
}
}
$api.addCls( eFootLis[index], 'active');
$api.addCls( eHeaderLis[index], 'active');
api.setFrameGroupIndex({
name: 'group',
index: index
});
}
请问为什么会出现这个BUG,怎么解决?
|
-
|