35 lines
565 B
Vue
35 lines
565 B
Vue
<template>
|
|
<web-view class="web-view"
|
|
:webview-styles="webviewStyles"
|
|
:src="url" :style="[boxStyle]"></web-view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
data() {
|
|
return {
|
|
windowH: 0,
|
|
windowW: 0,
|
|
webviewStyles: {
|
|
progress: {
|
|
color: 'transparent'
|
|
}
|
|
},
|
|
url: ''
|
|
}
|
|
},
|
|
computed:{
|
|
boxStyle(){
|
|
const res = uni.getWindowInfo();
|
|
return {
|
|
'width':res.windowWidth + 'px',
|
|
'height':res.windowHeight + 'px'
|
|
}
|
|
}
|
|
},
|
|
onLoad(option) {
|
|
this.url = decodeURIComponent(option.url);
|
|
}
|
|
}
|
|
</script>
|