Vue implements bottom query function

Vue implements bottom query function

This article example shares the specific code of Vue to implement the bottom query function for your reference. The specific content is as follows

1. The relevant contents of using vant-list components are as follows:

2. Default value of object binding value:

3. Query method:

Full code:

methods: {
    getdata() {
      let status=3;
      this.queryParams.params={
        status:status,
        passFactory: this.$store.state.user.werksName 
      }
      let params = JSON.parse(JSON.stringify(this.queryParams));
      api.getPageList(params).then((res) => {
        if (res.success) {
          this.dataList = res.data.content;
        } else {
          Toast.fail({
            message:res.msg
          });
        }
      });
    },
     onLoad() {//Bottom query this.queryParams.page += 1; 
      let _this = this;
      let status=3;
      this.queryParams.params={
        status:status,
        passFactory: this.$store.state.user.werksName 
      }
      let params = JSON.parse(JSON.stringify(this.queryParams));
      api.getPageList(params).then((res) => {
       if(res.success){
          this.dataList = this.dataList.concat(res.data.content);
          if (this.dataList.length >= res.data.totalElements) {
            this.finished = true;
          } else {
            this.finished = false;
          }
          this.loading = false;
        }
      });
    },

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • Sample code for fuzzy query of Vue input box
  • Vue implements the fuzzy query method of Input input box
  • Vue.js implements paging query function
  • Vue implements the function of clicking on time to obtain time period query
  • Detailed example of query operation in Vue.js
  • Using Vue.js framework to implement train ticket query system (with source code)
  • Implementing paging query function based on vue.js
  • Example code for implementing paging query using Bootstrap4 + Vue2
  • Vue2 filter fuzzy query method
  • Vue implements the sample code of fuzzy query of input box (application scenario of throttling function)

<<:  Sample code for changing the color of a png image through a CSS3 filter

>>:  Solve the problem of running jupyter notebook on the server

Recommend

Essential conditional query statements for MySQL database

Table of contents 1. Basic grammar 2. Filter by c...

About the correct way to convert time in js when importing excel

Table of contents 1. Basics 2. Problem Descriptio...

Implementation steps for enabling docker remote service link on cloud centos

Here we introduce the centos server with docker i...

How to deploy services in Windows Server 2016 (Graphic Tutorial)

introduction Sometimes, if there are a large numb...

Implementation of Nginx load balancing/SSL configuration

What is load balancing? When a domain name points...

JS interview question: Can forEach jump out of the loop?

When I was asked this question, I was ignorant an...

Detailed explanation of Nginx proxy_redirect usage

Today, I encountered a little problem when I was ...

How to submit the value of a disabled form field in a form Example code

If a form field in a form is set to disabled, the ...

Vue implements a simple shopping cart example

This article example shares the specific code of ...

React+Koa example of implementing file upload

Table of contents background Server Dependencies ...