f***@126.com
f***@126.com
  • 发布:2017-04-01 09:20
  • 更新:2018-02-26 16:23
  • 阅读:2882

mui.openWindowWithTitle is not a function 求助~

分类:MUI

本来用mui.openWindow()可以成功创建新窗口和触发事件传值了,但是改用mui.openWindowWithTitle就报了is not a function的错误

item.addEventListener('tap',function(){  
                            $.alert(this.data,this.innerHTML,'确认');  
                            // 触发详情页面  
                            var content = this.data;  
                            var title = this.title;  
                            if(!detailPage){  
                                detailPage = plus.webview.getWebviewById('lawDetail.html');  
                            }  
                            $.fire(detailPage,'newContent',{  
                                content:content  
                            });  
                            mui.openWindowWithTitle({  
                                id:'lawDetail.html',  
                                title:{  
                                    text:title,  
                                    position:{  
                                        top:0,  
                                        left:0,  
                                        width:"100%",  
                                        height:"100%"  
                                    }  
                                },  
                                back:{  
                                    image:{  
                                        base64Data:'',  
                                        position:{  
                                            top:"10px",  
                                            left:"10px",  
                                            width:"24px",  
                                            height:"24px"  
                                        }  
                                    },  
                                    click:function(){  

                                    }  
                                }  
                            })  
                        });

求大神指点~
现在用了新版本的mui.js解决了报错问题,但是创建出来的窗口和openWindow()的效果一样,还是不带标题栏的,呜,这是为什么呢

2017-04-01 09:20 1 条评论 负责人:无 分享
已邀请:
4***@qq.com

4***@qq.com

更新3.6.0的mui.js

  • f***@126.com (作者)

    感谢大神,用了新的js文件以后不报错了,但是创建出来的窗口和openWindow()的效果一样,还是不带标题栏的,呜,这是为什么呢

    2017-04-01 14:21

  • 4***@qq.com

    不可能吧,肯定是你那里配置错啦

    2017-04-05 10:16

1***@qq.com

1***@qq.com

你好你这个问题解决了没有

4***@qq.com

4***@qq.com

更新最新的mui.min.js。3.6以下的版本都不支持这个方法

wayhbbeed

wayhbbeed - 110

openWindowWithTitle官方文档写的已经废除,替代方法是什么?

  • DCloud_UNI_CHB

    使用mui.openWindow()方法,传入titleNView参数,具体参考:http://dev.dcloud.net.cn/mui/window/#openWindowWithTitle

    2018-02-26 16:53

该问题目前已经被锁定, 无法添加新回复