1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <template>
- <web-view class="web-view" :webview-styles="webviewStyles" :src="url" :style="{width: windowW + 'px', height: windowH + 'px'}"></web-view>
- </template>
- <script>
-
-
-
-
-
-
-
-
-
- import {
- mapGetters
- } from "vuex";
- export default {
- data() {
- return {
- windowH: 0,
- windowW: 0,
- webviewStyles: {
- progress: {
- color: 'transparent'
- }
- },
- url: ''
- }
- },
- onLoad(option) {
- if(option.webUel) this.url = decodeURIComponent(option.webUel);
-
- if(option.scene) this.url += `&scene=${option.scene}`;
- uni.setNavigationBarTitle({
- title: option.title
- })
- try {
- const res = uni.getSystemInfoSync();
- this.windowW = res.windowWidth;
- this.windowH = res.windowHeight;
- } catch (e) {
-
- }
- }
- }
- </script>
|