当前位置:网站首页>How to cancel the display of the return button at the uniapp uni app H5 end the autobackbutton does not take effect

How to cancel the display of the return button at the uniapp uni app H5 end the autobackbutton does not take effect

2022-06-24 07:52:00 Zhangxiaolang

uniapp uni-app H5 How to cancel Return to the display of the button autoBackButton Don't take effect
modify pages.json "autoBackButton": false Don't take effect
pages.json Middle configuration autoBackButton It doesn't work , Because of this property Only programs are supported aspect , H5 Setting this property is not supported .

as follows : Don't take effect

Realization

H5 We have our own way , All elements are controllable , Just use the browser side method to hide it .
stay  mounted  Just add the following sentence , It means after the page is rendered , Find the back button , Hide it .

mounted(){
			document.querySelector('.uni-page-head-hd').style.display = 'none'
},

perfect !!!

 

原网站

版权声明
本文为[Zhangxiaolang]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/175/202206240328341557.html