uni-app使用web-view引入页面
电脑版发表于:2020/5/20 10:11
代码如下:
<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>