3***@qq.com
3***@qq.com
  • 发布:2016-05-25 17:08
  • 更新:2016-05-25 17:08
  • 阅读:1063

自定义事件为何不是先执行。

分类:MUI
页面A  
var toMain = function() {  

            $.fire(mainPage, 'show', null);  
            setTimeout(function() {  
                $.openWindow({  
                    id: 'main',  
                    show: {  
                        aniShow: 'pop-in'  
                    },  
                    waiting: {  
                        autoShow: false  
                    }  
                });  

            }, 0);  
            console.log('tomain');  
        //  mui.fire(plus.webview.getWebviewById('../index/index.html'),'login',{});  
        };  
页面B  
window.addEventListener('show',function (){  
    console.log('show');  
    mui.fire(plus.webview.getWebviewById('../index/index.html'),'login',{});  
})

打印输出是先后顺序:
tomain
show

个人理解应该是先输出show,再输出tomain。有人能解答下原因吗?

2016-05-25 17:08 负责人:无 分享
已邀请:

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