uni-app APP端 webview页面设置name属性无法打开

uni-app APP端 webview页面设置name属性无法打开 产品分类:uniapp/App

属性
PC开发环境操作系统 Windows
PC开发环境操作系统版本号 window10
HBuilderX类型 正式
HBuilderX版本号 3.3.5
手机系统 Android
手机系统版本号 Android 7.1.1
手机厂商 模拟器
手机机型 夜神模拟器7.0.1.2
页面类型 vue
vue版本 vue2
打包方式 云端
项目创建方式 HBuilderX

bug描述

APP端打开webview页面,如果webview页面指定name属性,必定报“RangeError: Maximum call stack size exceeded”,并且页面空白

示例代码

<template>  
    <view>  
        <web-view :src="url" @message="getMessage"></web-view>  
    </view>  
</template>  

<script>  
    export default {  
        name: 'WebView',  
        data() {  
            return {  
                url: 'https://uniapp.dcloud.io/static/web-view.html'  
            }  
        },  
        onLoad(options) {  
            if (options && options.url) {  
                this.url = options.url;  
            }  
        },  
        methods: {  
            getMessage(event) {  
                uni.showModal({  
                    content: JSON.stringify(event.detail),  
                    showCancel: false  
                });  
            }  
        }  
    }  
</script>  

<style>  

</style>  

更多关于uni-app APP端 webview页面设置name属性无法打开的实战教程也可以访问 https://www.itying.com/category-93-b0.html

回到顶部