<template>
  <view v-if="url">
	  <view style="min-height: 100vh;overflow-y: auto;display: flex;flex-direction: column;">
		  <view style="flex: 0 0 auto;" >1235</view>
		    <view style="height: 100vh;position: relative;"><web-view :webview-styles="webviewStyles" :src="`${url}`"></web-view></view>
		  <view style="height: 400rpx;background-color: #000;color: #000;flex: 0 0 auto;">1235</view>
	  </view>
	  
  </view>
</template>

<script>
  export default {
    data() {
      return {
        params: {},
		url:'',
        webviewStyles: {
          progress: {
            color: "#FF3333",
			height:'400rpx'
          }
        }
      }
    },
    props: {
      src: {
        type: [String],
        default: null
      }
    },
    onLoad(e) {
	  this.url=decodeURIComponent(e.url);
	  uni.showLoading({
	  	title: '加载中'
	  });
	  setTimeout(function(){
		  uni.hideLoading()
	  },1500)
	  
	  if(e.title){
	  	uni.setNavigationBarTitle({
	  		title: e.title
	  	});
	  	// #ifdef H5
	  	document.title = e.title;
	  	// #endif
	  }
    }
  }
</script>
