webview.vue 408 B

12345678910111213141516171819202122232425262728293031
  1. <template>
  2. <view class="">
  3. <web-view :src="src"></web-view>
  4. </view>
  5. </template>
  6. <script>
  7. export default {
  8. name: '',
  9. data() {
  10. return {
  11. src: ''
  12. };
  13. },
  14. onLoad(options) {
  15. this.src = decodeURIComponent(options.url);
  16. if (options.title) {
  17. uni.setNavigationBarTitle({
  18. title:options.title
  19. })
  20. }
  21. },
  22. methods: {
  23. }
  24. };
  25. </script>
  26. <style lang="scss" scoped>
  27. </style>