uni app webview zoom page implementation

default-user-image.png

Add the following code in OnReady

 var wv;             // #ifdef APP-PLUS             console.log('App plus2')             var currentWebview = this.$mp.page.$getAppWebview() //Get the webview object of the current page setTimeout(function() {               wv = currentWebview.children()[0]               wv.setStyle({scalable:true})             }, 1000); //If it is a page initialization call, you need to delay it // #endif

This article is reprinted from https://blog.p2hp.com/archives/8520
This site is for inclusion only, and the copyright belongs to the original author.

Leave a Comment