<template>
	 <!-- #ifdef APP -->
	  <scroll-view style="flex:1">
	  <!-- #endif -->
		<view v-if="params['url'] != null" class="uni-row view-height " >
		  <web-view :webview-styles="webviewStyles" :src="`${params['url'] as string}`"></web-view>
		</view>
	 <!-- #ifdef APP -->
	  </scroll-view>
	<!-- #endif -->
</template>

<script lang="uts">
  export default {
    data() {
      return {
        params: {},
        webviewStyles: {
          progress: {
            color: "#FF3333"
			
          }
        }
      }
    },
    props: {
      src: {
        type: [String],
        default: null
      }
    },
    onLoad(event:OnLoadOptions) {
      this.params = event as UTSJSONObject
      if (event['title'] != null) {
        uni.setNavigationBarTitle({
          title: event['title'] as string
        })
      }
    }
  }
</script>

<style lang="scss">
	.view-height{
		height: 100%;
	}
</style>
