故如虹,知恩;故如月,知明
排名
6
文章
6
粉丝
16
评论
8
{{item.articleTitle}}
{{item.blogName}} : {{item.content}}
ICP备案 :渝ICP备18016597号-1
网站信息:2018-2024TNBLOG.NET
技术交流:群号656732739
联系我们:contact@tnblog.net
欢迎加群交流技术

uni-app使用web-view引入页面

4618人阅读 2020/5/20 10:11 总访问:3921766 评论:0 收藏:0 手机
分类: 移动开发

代码如下:

<template>
	<view class="h5-html">
		<web-view :webview-styles="webviewStyles" type="xj" :src="src"></web-view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				src: '',
				webviewStyles: {
					progress: {
						color: '#FF3333'
					}
				}
			}
		},
		onLoad(e) {
			this.src = "http://m.tnblog.net/hb/article/details/5903";
			// if (e.title) {
			// 	uni.setNavigationBarTitle({
			// 		title: e.title,
			// 		success(e) {
			// 			console.log("设置标题成功", e);
			// 		},
			// 		fail(e) {
			// 			console.log("设置标题....", e);
			// 		}
			// 	});
			// }
		},
		methods: {

		}
	}
</script>

<style>
	.h5-html {
		width: 100%;
		height: 100%;
	}
</style>


欢迎加群讨论技术,群:677373950(满了,可以加,但通过不了),2群:656732739

评价