我的代码:```javascript
<script src="js/mui.min.js"></script>
<script type="text/javascript" charset="utf-8">
mui.openWindow({
url: 'store.html',
id: 'store.html',
styles: {
top: '0', //新页面顶部位置
bottom: '0', //新页面底部位置
width: '100%', //新页面宽度,默认为100%
height: '100%', //新页面高度,默认为100%
},
extras: {
//自定义扩展参数,可以用来处理页面间传值
},
show: {
autoShow: 'true', //页面loaded事件发生后自动显示,默认为true
aniShow: 'slide-in-right', //页面显示动画,默认为”slide-in-right“;
duration: 100 //页面动画持续时间,Android平台默认100毫秒,iOS平台默认200毫秒;
},
waiting: {
autoShow: true, //自动显示等待框,默认为true
title: '正在加载...', //等待对话框上显示的提示内容
options: {
width: '100%', //等待框背景区域宽度,默认根据内容自动计算合适宽度
height: '100%', //等待框背景区域高度,默认根据内容自动计算合适高度
}
}
})
</script>
有时会报Uncaught TypeError: Cannot read property '0' of undefined at js/mui.min.js:2038的错误
2038的代码:```javascript
_getPage: function(a, b) {
return this.loop ? a > this.itemLength - (b ? 2 : 3) ? (a = 1, time = 0) : (b ? -1 : 0) > a ? (a = this.itemLength - 2, time = 0) : a += 1 : (b || (a > this.itemLength - 1 ? (a = 0, time = 0) : 0 > a && (a = this.itemLength - 1, time = 0)), a = Math.min(Math.max(0, a), this.itemLength - 1)), this.pages[a][0]
},
0 个回复