tab界面
mui.plusReady(function() {
var page = [
'house.html',
'talk_list.html',
'me.html',
'announce.html'
];
var ws = plus.webview.currentWebview();
var styles = {
top: "0px",
bottom: "50px"
};
for (var i = 0; i < page.length; i++) {
var item = plus.webview.create(page[i], page[i], styles);
item.hide();
ws.append(item);
}
plus.webview.show(page[0]);
mui(".mui-bar-tab").on("tap", 'a', function()
{
var href = this.getAttribute("href");
plus.webview.show(href); }
});
talk_list.html界面
mui.plusReady(function() {
var self = plus.webview.currentWebview();
self.addEventListener('show',function()
{
console.log('show');
// ... 后续为渲染页面代码
});
})
APP启动时,第一次点击tab按钮,跳转执行一次,后续切换不执行
0 个回复