webview.vue 489 B

123456789101112131415161718192021222324252627282930313233343536
  1. <template>
  2. <view class="webview-container">
  3. <web-view class="webview" :src="url"></web-view>
  4. </view>
  5. </template>
  6. <script>
  7. export default {
  8. components: {
  9. },
  10. data() {
  11. return {
  12. url: ''
  13. }
  14. },
  15. onLoad(options) {
  16. this.url = decodeURIComponent(options.url)
  17. console.log(options.url)
  18. },
  19. created() {
  20. },
  21. methods: {
  22. }
  23. }
  24. </script>
  25. <style lang="scss" scoped>
  26. .webview-container{
  27. display: flex;
  28. flex-direction: column;
  29. }
  30. .webview{
  31. flex: 1;
  32. }
  33. </style>