+
95
-

uniapp中如何在web-view加载完成网页后再显示?

uni

uniapp中如何在web-view加载完成网页后再显示?


网友回复

+
15
-
<template>
	<view>

	</view>
</template>

<script>
	//将要创建的webview对象
	var wv;

	export default {
		data() {
			return {
				windowInfo: null
			}
		},
		props: {
			devinfo: {
				type: Object,
				default: function(){
					return {};
				}
			},
			cmuid: {
				type: Number,
				default: 0
			}
		},
		mounted() {
			uni.getSystemInfo({
			    success: (res)=> {
					this.windowInfo = res;
					//this.createWvAndLoadUrl('https://uniapp.dcloud.io/static/web-view.html');
					this.createWvAndLoadUrl('http://www.baidu.com');

			    }
			});
		},
		beforeDestroy() {
			//关闭webview对象
			if(wv){
				wv.close()
				//w...

点击查看剩余70%

我知道答案,我要回答