Consult the paging scheme of better-scroll horizontal scrolling

Mobile projects, scrolling components use better-scroll
because the amount of data is too large to use paging
horizontal scrolling, so it is necessary to configure scrollX as the true attribute,
but if you lose this attribute, you cannot use the pullingUp event.
so I use the scrollEnd event to request new data
to get the new data when the current position + 50 is greater than or equal to maxScrollX. After calling the refresh method
each time the five pieces of data
code is as follows

      this.$nextTick(() => {
        if (!this.scroll) {
          this.scroll = new BScroll(this.$refs.wrapper, {
            click: true,
            scrollX: true
          })
          const maxScrollX = this.scroll.maxScrollX
          this.scroll.on("scroll", (pos) => {
            console.log(pos, "scroll pos")
          })
          this.scroll.on("scrollEnd", (pos) => {
            if (pos.x < maxScrollX + 50 && this.activityList.length < this.total){
              this.$emit("loadMore", "activity")
              this.scroll.refresh()
            }
          })
        }
      })
  
  devtoolsdombetter-scroll
  
  dom
Aug.12,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ea1342-1b39.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ea1342-1b39.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?