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

Summary of knowledge points about covering index in MySQL

If an index contains (or covers) the values ​​of ...

Detailed tutorial on deploying Springboot or Nginx using Kubernetes

1 Introduction After "Maven deploys Springbo...

Install and configure MySQL under Linux

System: Ubuntu 16.04LTS 1\Download mysql-5.7.18-l...

react-diagram serialization Json interpretation case analysis

The goal of this document is to explain the Json ...

Alibaba Cloud Ubuntu 16.04 builds IPSec service

Introduction to IPSec IPSec (Internet Protocol Se...

Implementation of dynamic particle background plugin for Vue login page

Table of contents The dynamic particle effects ar...

Detailed steps to change the default password when installing MySQL in Ubuntu

Step 1: Enter the directory: cd /etc/mysql, view ...

JavaScript+html to implement front-end page sliding verification (2)

This article example shares the specific code of ...

Linux file and user management practice

1. Display the files or directories in the /etc d...

Detailed steps for installing, configuring and uninstalling QT5 in Ubuntu 14.04

1. I downloaded QT5.13 version before, but after ...

A brief analysis of the basic concepts of HTML web pages

What is a web page? The page displayed after the ...

Docker images export and import operations

What if the basic images have been configured bef...

JavaScript dynamically generates a table with row deletion function

This article example shares the specific code of ...