// #ifdef APP-PLUS
const pages = getCurrentPages()
const page = pages[pages.length - 1];
const currentWebview = page.$getAppWebview()
currentWebview.setStyle({
titleNView:{
buttons:
[
{
float:'left',
type:'back',
onclick:function(){
uni.switchTab({
url:'/'+ pages[0].route
})
}
},
{
float:'right',
type:'home',
onclick:function(){
uni.switchTab({
url: this.src
});
alert("hahdhasdhsadhsahd");
}
},
]
}
})
// #endif
1 个回复
DCloud_UNI_WZF
测试未复现该问题,注意检查按钮事件定义及路由参数是否正确