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

Detailed Introduction to MySQL Innodb Index Mechanism

1. What is an index? An index is a data structure...

Tutorial on installing Tomcat server under Windows

1 Download and prepare First, we need to download...

Vue implements a simple calculator

This article example shares the specific code of ...

How to use Celery and Docker to handle periodic tasks in Django

As you build and scale your Django applications, ...

HTML table tag tutorial (35): cross-column attribute COLSPAN

In a complex table structure, some cells span mul...

HTML exceeds the text line interception implementation principle and code

The HTML code for intercepting text beyond multipl...

Ubuntu starts the SSH service remote login operation

ssh-secure shell, provides secure remote login. W...

Detailed explanation of Vue px to rem configuration

Table of contents Method 1 1. Configuration and i...

Summary of Mysql-connector-java driver version issues

Mysql-connector-java driver version problem Since...

How to implement form validation in Vue

1. Installation and use First, install it in your...

Implementation of Docker to build private warehouse (registry and Harbor)

As more and more Docker images are used, there ne...

Detailed explanation of JavaScript function this pointing problem

Table of contents 1. The direction of this in the...

JavaScript immediate execution function usage analysis

We know that in general, a function must be calle...

Detailed explanation of concat related functions in MySQL

1. concat() function Function: Concatenate multip...