index.uvue 865 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <template>
  2. <!-- #ifdef APP -->
  3. <scroll-view style="flex:1">
  4. <!-- #endif -->
  5. <view v-if="params.url" class="uni-row view-height " >
  6. <web-view :fullscreen="true" :webview-styles="webviewStyles" :src="`${params.url}`"></web-view>
  7. </view>
  8. <!-- #ifdef APP -->
  9. </scroll-view>
  10. <!-- #endif -->
  11. </template>
  12. <script lang="uts">
  13. export default {
  14. data() {
  15. return {
  16. params: {},
  17. webviewStyles: {
  18. progress: {
  19. color: "#FF3333"
  20. }
  21. }
  22. }
  23. },
  24. props: {
  25. src: {
  26. type: [String],
  27. default: null
  28. }
  29. },
  30. onLoad(event:OnLoadOptions) {
  31. this.params = event
  32. if (event.title) {
  33. uni.setNavigationBarTitle({
  34. title: event.title
  35. })
  36. }
  37. }
  38. }
  39. </script>
  40. <style lang="scss">
  41. .view-height{
  42. height: 100%;
  43. }
  44. </style>