Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

webView.vue 957B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <template>
  2. <web-view :src="state.url">
  3. <!-- <cover-view class="custom-nav" @click="closeWebView">
  4. <cover-image class="close-icon" src="/static/image/icon-back.png" ></cover-image>
  5. <cover-view>返回</cover-view>
  6. </cover-view> -->
  7. </web-view>
  8. </template>
  9. <script setup>
  10. import {onLoad} from "@dcloudio/uni-app";
  11. import {reactive} from "vue";
  12. const state = reactive({
  13. url:"",
  14. visitCount:0
  15. })
  16. onLoad((option) => {
  17. console.log("option",option)
  18. state.url=option.url
  19. state.visitCount++
  20. });
  21. const closeWebView=()=>{
  22. uni.navigateBack({
  23. delta:state.visitCount
  24. })
  25. }
  26. </script>
  27. <style scoped>
  28. .custom-nav {
  29. position: fixed;
  30. top: 0;
  31. width: 100%;
  32. height: 44px;
  33. background-color: #fff;
  34. display: flex;
  35. justify-content: flex-start;
  36. align-items: center;
  37. z-index: 999;
  38. box-sizing: border-box;
  39. padding: 0 10rpx;
  40. }
  41. .close-icon{
  42. width: 30rpx;
  43. height: 30rpx;
  44. transform:rotateX(180deg);
  45. }
  46. </style>