webview.vue 532 B

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