refactor(Tabbar): refactor with composition api

This commit is contained in:
chenjiahan
2020-08-28 15:19:16 +08:00
parent e3cf460762
commit f843e6def9
7 changed files with 117 additions and 132 deletions
+3 -1
View File
@@ -251,7 +251,9 @@ export default createComponent({
const { body } = this.$refs;
const { months, monthRefs } = this;
const top = getScrollTop(body);
const heights = months.map((item, index) => monthRefs[index].getHeight());
const heights = months.map(
(item, index) => monthRefs[index].height.value
);
const heightSum = heights.reduce((a, b) => a + b, 0);
// iOS scroll bounce may exceed the range