mpvue目前版本,动态修改小程序中导航条文字,颜色,背景的操作方式是下面这种方法,采用了微信小程序api方法;之前在main.js方法中设置的方式以及不生效了。
<template>
<div>
这里是html
</div>
</template>
<script>
export default {
created(){
},
onLoad(){
wx.setNavigationBarTitle({
title:'修改后的导航',
})
wx.setNavigationBarColor({
frontColor:'#ffffff',//前景颜色值,包括按钮、标题、状态栏的颜色,仅支持 #ffffff 和 #000000 (微信小程序官方规定)
backgroundColor: