我们当前的页面需要根路由去动态设置title,如题所述,小程序再这块有什么办法或者api去设置吗
小程序内webivew在页面load之前可以设置title,页面load后就不能再设置title?The webivew in the applet can set the title before the page is loaded, but cannot set the title after the page is loaded?
小程序内webivew在页面load之前可以设置title,页面load后就不能再设置title?我们当前的页面需要根路由去动态设置title,如题所述,小程序再这块有什么办法或者api去设置吗
Our current page needs the root route to dynamically set the title. As mentioned in the title, is there any way or API for the applet to set it
回答:
webview页面标题是网页的标题,你想动态改变就得动态改变你网页的标题
小程序内部的页面标题才是属于小程序的,通过wx.setNavigationBarTitle更改
webview页面会自动加载网页的标题做title
webview页面 默认加载网页的title哦
不过加载好,你还是可以通过wx.setNavigationBarTitle 修改