// #ifdef APP-PLUS
const pages = getCurrentPages()
const page = pages[pages.length - 1];
const currentWebview = page.$getAppWebview()
if(pages.length > 3){
currentWebview.setStyle({
titleNView:{
buttons:[{
float:'left',
type:'close',
onclick:function(){
uni.switchTab({
url:'/'+ pages[0].route
})
}
}]
}
})
}
console.log(pages.length)
console.log(pages[0].route)
// #endif
uni-app通过webView在原生导航栏中添加自定义按钮
最新推荐文章于 2024-06-15 15:42:06 发布