这样创建的底部选项卡,但是边缘有1像素的边框,如何去掉??
var mainWv = plus.webview.currentWebview();
var activeTab = '';
// 默认只加载首页webview
var homeWv = plus.webview.create(subInfos[0].url, subInfos[0].id, subStyles);
mainWv.append(homeWv);
activeTab = subInfos[0].id;
// 点击切换,动态创建其它webview;
mui('.mui-bar-tab').on('tap', 'a.mui-tab-item', function(e) {
var _self = this;
var targetTab = _self.getAttribute('data-id');
if(targetTab === activeTab) {
return;
}
var _subWv = plus.webview.getWebviewById(targetTab);
// 若webview不存在,则创建;
if(!_subWv) {
var _subInfo = getSubInfoById(subInfos, targetTab);
_subWv = plus.webview.create(_subInfo.url, _subInfo.id, subStyles);
mainWv.append(_subWv);
}
_subWv.show();
// 隐藏之前的webview
plus.webview.getWebviewById(activeTab).hide('none');
activeTab = targetTab;
console.log(targetTab)
});
0 个回复