privacy-web-view.uvue 698 B

1234567891011121314151617181920212223242526272829303132
  1. <template>
  2. <web-view :src="src" :update-title="updateTitle"></web-view>
  3. </template>
  4. <script>
  5. export default {
  6. data() {
  7. return {
  8. src: '',
  9. updateTitle: true
  10. }
  11. },
  12. onLoad(options : OnLoadOptions) {
  13. if (typeof options['url'] === 'string' && options['url']!.length > 0) {
  14. const src = decodeURIComponent(options['url'] as string)
  15. if (src != null) {
  16. this.src = src
  17. }
  18. }
  19. if (typeof options['title'] === 'string' && options['title']!.length > 0) {
  20. this.updateTitle = false;
  21. uni.setNavigationBarTitle({
  22. title: options['title']!
  23. });
  24. }
  25. }
  26. }
  27. </script>
  28. <style>
  29. </style>