前端大印
前端大印
  • 发布:2016-03-08 11:16
  • 更新:2016-03-08 11:16
  • 阅读:3742

mui.plusReady()方法干嘛的呀?

分类:MUI

mui.plusReady()方法干嘛的呀?
mui.plusReady(function() {
alert(2);
});
1:写了一个测试,也没反应,这个plusReady指的是什么加载完后触发呀?是封装的ios或android方法加载完后触发吗?必须在手机上才能alert(2);吗?没明白
2:mui的例子中有这样一段代码
mui.plusReady(function() {
//仅支持竖屏显示
plus.screen.lockOrientation("portrait-primary");
main = plus.webview.currentWebview();
main.addEventListener('maskClick', closeMenu);
//处理侧滑导航,为了避免和子页面初始化等竞争资源,延迟加载侧滑页面;
setTimeout(function() {
menu = mui.preload({
id: 'index-menu',
url: 'index-menu.html',
styles: {
left: 0,
width: '70%',
zindex: -1
},
show: {
aniShow: 'none'
}
});
}, 200);
});

其中的plus从哪里来的呀?指的什么?我有谷歌浏览器模拟手机都查不到plus的。这个值是什么?必须在手机上才能看到这个值吗?

2016-03-08 11:16 负责人:无 分享
已邀请:

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