1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <template>
- <!-- <cover-view class="custom-nav" @click="closeWebView">
- <cover-image class="close-icon" src="/static/image/icon-back.png" ></cover-image>
- <cover-view>返回</cover-view>
- </cover-view> -->
- <web-view :src="state.url"></web-view>
- </template>
-
- <script setup>
- import {onLoad} from "@dcloudio/uni-app";
- import {reactive} from "vue";
- const state = reactive({
- url:"",
- visitCount:0
- })
- onLoad((option) => {
- console.log("option",option)
- state.url=option.url
- state.visitCount++
- });
- const closeWebView=()=>{
- uni.navigateBack({
- delta:state.visitCount
- })
- }
- </script>
-
- <style scoped>
- .custom-nav {
- position: fixed;
- top: 0;
- width: 100%;
- height: 44px;
- background-color: #fff;
- display: flex;
- justify-content: flex-start;
- align-items: center;
- z-index: 999;
- box-sizing: border-box;
- padding: 0 10rpx;
- }
- .close-icon{
- width: 30rpx;
- height: 30rpx;
- transform:rotateX(180deg);
- }
- </style>
|