const PMixin = {
data() {
return {}
},
onNavigationBarButtonTap() {
console.log("执行")
uni.switchTab({
url: "/pages/index/index"
});
},
methods: {
addButtus() {
// #ifdef APP-PLUS
let webView = this.$mp.page.$getAppWebview();
webView.setStyle({
titleNView: {
"buttons": [{
"text": "\ue657",
// "float": "left",
"fontSrc": "/static/iconfont.ttf",
"fontSize": "19px"
}]
}
});
// #endif
}
},
onLoad() {
this.addButtus();
}
}
export default PMixin;
方法mounted,onLoad,onReady都试过,onNavigationBarButtonTap还是不执行
pages.json 未设置
只是动态添加自定义按钮
3***@qq.com (作者)
好的,谢谢
2020-06-12 10:07