You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
587 B
31 lines
587 B
3 months ago
|
<template>
|
||
|
<web-view class="web-view" :webview-styles="webviewStyles" :src="url" :style="{width: windowW + 'px', height: windowH + 'px'}"></web-view>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
|
export default {
|
||
|
data() {
|
||
|
return {
|
||
|
windowH: 0,
|
||
|
windowW: 0,
|
||
|
webviewStyles: {
|
||
|
progress: {
|
||
|
color: 'transparent'
|
||
|
}
|
||
|
},
|
||
|
url: ''
|
||
|
}
|
||
|
},
|
||
|
onLoad(option) {
|
||
|
this.url = decodeURIComponent(option.url);
|
||
|
try {
|
||
|
const res = uni.getSystemInfoSync();
|
||
|
this.windowW = res.windowWidth;
|
||
|
this.windowH = res.windowHeight;
|
||
|
} catch (e) {
|
||
|
// error
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
</script>
|