riku
2022-10-17 eb7366f400867d3f401fe60f06d848d6d1448457
component/switchtab/switchtab.js
@@ -57,7 +57,7 @@
      if (e) {
        setTimeout(() => {
          const p = `.page${this.data.currentTab}`
          console.log(p);
          // console.log(p);
          this.tabsHeight(p);
        }, 50);
      }
@@ -65,7 +65,7 @@
    //计算swiper高度方法(在切换的时候调用)
    tabsHeight(element) {
      let that = this;
      let query = this.createSelectorQuery(); //必须要先创建一个查询
      let query = this.createSelectorQuery().in(this); //必须要先创建一个查询
      query.select(element).boundingClientRect(function (rect) {
        that.setData({
          pageheight: rect.height + 'px'