提交 a415bc71 编写于 作者: W wanganxp

完善自定义tabbar注释

上级 0c87f44d
......@@ -83,24 +83,24 @@
methods: {
onTabClick(index : number) {
if (this.selectedIndex == index && index == 0 && this.displayArrow == true) { //首页当tab按钮变成向上时,点向上就滚动到顶
console.log("11");
// console.log("11");
this.displayArrow = false;
(this.$refs["tab1"]! as ComponentPublicInstance).$callMethod('scrollTop', 0)
this.lastTab1Top = 0;//Todo: 临时解决android平台scroll-view在某些情况未触发onscroll事件的bug
}
else if (index !=0){ //不在首页时,把箭头变成图标
console.log("22");
// console.log("22");
this.displayArrow = false
}
else if (index == 0 && this.selectedIndex !=0){ //从其他tab切回首页时,检查是否需要把图标变箭头
console.log("33",this.lastTab1Top, this.tabViewHeight);
// console.log("33",this.lastTab1Top, this.tabViewHeight);
this.displayArrow = this.lastTab1Top > this.tabViewHeight
}
this.setSelectedIndex(index);
console.log('index: ',index);
console.log('this.selectedIndex: ',this.selectedIndex);
console.log('this.displayArrow: ',this.displayArrow);
console.log('this.lastTab1Top: ',this.lastTab1Top);
// console.log('index: ',index);
// console.log('this.selectedIndex: ',this.selectedIndex);
// console.log('this.displayArrow: ',this.displayArrow);
// console.log('this.lastTab1Top: ',this.lastTab1Top);
},
onTabPageEvent(top : number) {
// console.log('top: ',top); //iOS在v-show为false时,不应该触发这个事件
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册