微信小程序中与webView同级展示?

135 阅读1分钟

image.png


<template>
    <view class="container">
        <web-view src="https://xxx.com"></web-view>
        <cover-view class="submit-group">
            <cover-view class="submit-btn" style="background: #409eff" @click="goPage('/subPack/quote/sign')">去签字</cover-view>
            <cover-view class="submit-btn">确认</cover-view>
        </cover-view>
    </view>
</template>
<script lang="ts" setup>
import { onLoad, onReady, onShow } from '@dcloudio/uni-app';
import { ref, reactive } from 'vue';
onLoad((options: any) => {});
function goPage(url?: string, val?: any) {
    if (url) {
        uni.navigateTo({ url });
    }
}
</script>

<style lang="scss" scoped>
.container {
    background: #fff;
    padding: 20rpx;
}
.submit-group {
    position: fixed;
    bottom: 50rpx;
    left: 20rpx;
    right: 20rpx;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    z-index: 999999 !important;
}
.submit-btn {
    background: #ff413f;
    border-radius: 10rpx;
    padding: 10rpx 40rpx;
    color: #ffffff;
    font-weight: bold;
    text-align: center;
    margin-left: 20rpx;
}
</style>