web-view.vue 494 B

1234567891011121314151617181920212223242526272829303132
  1. <template>
  2. <view class="web-view">
  3. <web-view :webview-styles="webviewStyles" :src="src"></web-view>
  4. </view>
  5. </template>
  6. <script>
  7. export default {
  8. data() {
  9. return {
  10. webviewStyles: {
  11. progress: {
  12. color: this.$lightColor,
  13. },
  14. },
  15. src: "",
  16. };
  17. },
  18. onLoad(params) {
  19. this.src = decodeURIComponent(params.src);
  20. },
  21. };
  22. </script>
  23. <style lang="scss" scoped>
  24. .web-view {
  25. /deep/ .web-view {
  26. padding: 0;
  27. margin: 0;
  28. }
  29. }
  30. </style>