2024-12-05 11:46:54 +08:00
|
|
|
<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%',
|
2024-12-30 19:01:03 +08:00
|
|
|
height: '100%',
|
2024-12-05 11:46:54 +08:00
|
|
|
},
|
|
|
|
}
|
|
|
|
},
|
|
|
|
onLoad(option) {
|
|
|
|
this.title = option?.title
|
|
|
|
this.src = option.src ? decodeURI(option.src) : '';
|
2024-12-30 19:01:03 +08:00
|
|
|
console.log('this.src',this.src);
|
2024-12-05 11:46:54 +08:00
|
|
|
},
|
|
|
|
}
|
|
|
|
</script>
|