uniapp页面切换修改页面标题setNavigationBarTitle

思路很简单,在一个单切面切换的时候拿到切换的index,之后进行判断就可以实现了,默认让currentTab是0,页面头部就会改变了 

	
//currentTab=0
if(this.currentTab==0){
				uni.setNavigationBarTitle({
					title: '未'
				});
			}else{
				uni.setNavigationBarTitle({
					title: '已'
				});
			}

是不是很简单,文章到此结束,希望对你有所帮助

猜你喜欢

转载自blog.csdn.net/qq_44278289/article/details/127859704