diff --git a/components/tabi/index.wxml b/components/tabi/index.wxml index d8a0fe8..594a6f0 100644 --- a/components/tabi/index.wxml +++ b/components/tabi/index.wxml @@ -1,7 +1,7 @@ - + {{item}} @@ -17,4 +17,16 @@ return tabIndex == index ? 'type--cur' : '' } module.exports = typeActive + + + function padding(lineType, scroll) { + if (lineType == 1) { + return 4 + } else if(scroll && lineType !== 1) { + return 32 + } else { + return 12 + } + } + module.exports = padding \ No newline at end of file diff --git a/pages/moment/information/index.js b/pages/moment/information/index.js index d404d20..0504c63 100644 --- a/pages/moment/information/index.js +++ b/pages/moment/information/index.js @@ -42,7 +42,7 @@ Component({ for (let index = 0; index < this.data.typeList.length; index++) { this.data.tabList.push(this.data.typeList[index].name) } - this.setData({ tabList: this.data.tabList, scrolled: this.data.typeList.length >= 6 }) + this.setData({ tabList: this.data.tabList, scrolled: this.data.typeList.length >= 5 }) }) }, onTabChange: function ({ detail }) {