Based on the Vue framework, the vux Component Library implements the pull-up and refresh function, and vuevux

Source: Internet
Author: User

Based on the Vue framework, the vux Component Library implements the pull-up and refresh function, and vuevux

Recently, the company has been developing an app and selected a vux Component Library Based on the Vue framework. It summarizes the difficulties encountered in implementing the uppull and refresh functions:
1. Problem: refresh only once. Solution: manually reset the status.
This. scrollerStatus. pullupStatus = 'default ',
2. Problem: Do not scroll. Solution: Because keep-alive cache is enabled, you need to set

activated () { this.$refs.scroller.reset()}

If not, run the following code after obtaining the background data:

this.$nxtTick(() => {    this.$refs.scroller.reset()   })

Paste the code of the entire page.

<Template> <div styles = "height: 100%;"> <x-header slot = "header": left-options = "{showBack: false} "> meeting list <a slot =" right "v-on: click = "show = true"> <icon type = "search"> </icon> </button> </a> </x-header> <! -- Meeting list --> <scroller v-model = "scrollerStatus" height = "-46" lock-x scrollbar-y ref = "scroller": bounce = "isbounce ": use-pullup = "showUp ": pullup-config = "upobj" @ on-pullup-loading = "selPullUp"> <div class = "box2"> <p v-for = "list, index in lists "> <router-link: to =" {path: list. id} "> <p style =" height: 40px; "> <span class =" spanMeetTitle "v-html = '(index + 1) + ". "+ list. name'> </span> <span class = "spanMe EtStatu "v-html = 'list. status '> </span> </p> <p class = "prevSuper"> <form-preview header-label = "" header-value = "": bodyItems = "list ": footer-buttons = "buttons1"> </form-preview> </p> </router-link> 

The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.