flax
flax
  • 发布:2015-08-31 22:45
  • 更新:2016-12-01 00:46
  • 阅读:3354

subpages创建子页面问题

分类:MUI

mui.init({
subpages:[{
url:"index_list.html",//子页面HTML地址,支持本地地址和网络地址
id:'index_list',//子页面标志
styles:{
top:"0",//子页面顶部位置
bottom:"0",//子页面底部位置
//width:subpage-width,//子页面宽度,默认为100%
//height:subpage-height,//子页面高度,默认为100%
}
}],
subpages:[{
url:"search.html",//子页面HTML地址,支持本地地址和网络地址
id:'search_list',//子页面标志
styles:{
top:"0",//子页面顶部位置
bottom:"0",//子页面底部位置
//width:subpage-width,//子页面宽度,默认为100%
//height:subpage-height,//子页面高度,默认为100%
}
}],
subpages:[{
url:"my.html",//子页面HTML地址,支持本地地址和网络地址
id:'my_list',//子页面标志
styles:{
top:"0",//子页面顶部位置
bottom:"0",//子页面底部位置
//width:subpage-width,//子页面宽度,默认为100%
//height:subpage-height,//子页面高度,默认为100%
}
}]
});

页面是导入了,打开页面就显示第三个,用什么方法显示第一个隐藏其他两个,再通过tap事件点击这个隐藏其他两个,。这个逻辑对的吗?

2015-08-31 22:45 负责人:无 分享
已邀请:
1***@qq.com

1***@qq.com

我也在关注这个问题,大神求解

i***@126.com

i***@126.com

同问

1***@qq.com

1***@qq.com

你这样定义subpages,只会显示第三个吧,好像一直在重复定义,subpages本身就是一个数组
试试这样
$.init({
statusBarBackground: '#f7f7f7',
swipeBack: false,
subpages: [{
id: 'index_tab',
url: 'index.html',
styles: {
top: '45px',
bottom: '51px',
bounce: 'vertical'
}
}, {
id: 'message_tab',
url: 'message.html',
styles: {
top: '45px',
bottom: '51px',
bounce: 'vertical'
}
}, {
id: 'mine_tab',
url: 'mine.html',
styles: {
top: '45px',
bottom: '51px',
bounce: 'vertical'
}
}, {
id: 'menu_list_tab',
url: 'menu_list.html',
styles: {
top: '45px',
bottom: '51px',
bounce: 'vertical'
}
}]
});

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