FrozenUI选项卡自定义指向选项卡页面,在源代码里选项卡函数里添加如下内容,其它内容自行配置moveToPage:你想要打开的选项卡页面。
moveToPage: function(index) {
var self = this,
curPage = self.currentPage;
self.currentPage = index;
// tab 外层高度自适应
if (this.options.role === 'tab') {
$(this.scroller).children().height('auto');
document.body.scrollTop = 0;
}
self.scrollTo(-self.itemWidth * self.currentPage, 0, self.options.bounceTime, self.options.bounceEasing);
if (self.indicator) {
$(self.indicator).children().removeClass('current');
$(self.indicator.children[self.currentPage]).addClass('current');
$(self.scroller).children().removeClass('current');
$(self.scroller.children[self.currentPage]).addClass('current');
} else if (self.nav) {
$(self.nav).children().removeClass('current');
$(self.nav.children[self.currentPage]).addClass('current');
$(self.scroller).children().removeClass('current');
$(self.scroller.children[self.currentPage]).addClass('current');
}
}
经群里面的好友测试通过。
达维营-前端网