webview.vue 419 B

12345678910111213141516171819202122232425
  1. <template>
  2. <view v-if="src">
  3. <web-view :fullscreen="false" :src="src" :webview-styles="wbStyles"/>
  4. </view>
  5. </template>
  6. <script>
  7. export default {
  8. data() {
  9. return {
  10. title: '',
  11. src: '',
  12. wbStyles: {
  13. width: '100%',
  14. height: '100%',
  15. },
  16. }
  17. },
  18. onLoad(option) {
  19. console.log(option.title);
  20. this.title = option?.title
  21. this.src = option?.src
  22. },
  23. }
  24. </script>