31 lines
645 B
Vue
31 lines
645 B
Vue
|
<template>
|
||
|
<view v-if="src">
|
||
|
<!-- #ifdef H5 -->
|
||
|
<!-- <iframe style="width: 100%;min-height: 100vh;" :src="src" :title="title" /> -->
|
||
|
<web-view :src="src" />
|
||
|
<!-- #endif -->
|
||
|
<!-- #ifndef H5 -->
|
||
|
<web-view :webview-styles="wbStyles" :src="src" :fullscreen="false" />
|
||
|
<!-- #endif -->
|
||
|
</view>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
|
export default {
|
||
|
data() {
|
||
|
return {
|
||
|
title: '',
|
||
|
src: '',
|
||
|
wbStyles: {
|
||
|
width: '100%',
|
||
|
height: '100vh',
|
||
|
},
|
||
|
}
|
||
|
},
|
||
|
onLoad(option) {
|
||
|
this.title = option?.title
|
||
|
this.src = option.src ? decodeURI(option.src) : '';
|
||
|
console.log(this.src);
|
||
|
},
|
||
|
}
|
||
|
</script>
|