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

Let's talk about the issue of passing parameters to React onClick

Background In a list like the one below, clicking...

Summary of Commonly Used MySQL Commands in Linux Operating System

Here are some common MySQL commands for you: -- S...

An article to help you learn more about JavaScript arrays

Table of contents 1. The role of array: 2. Defini...

Two implementations of front-end routing from vue-router

Table of contents Mode Parameters HashHistory Has...

VMware Tools installation and configuration tutorial for Ubuntu

Some time ago, the blogger installed the Ubuntu s...

Several common redirection connection example codes in html

Copy code The code is as follows: window.location...

How to set list style attributes in CSS (just read this article)

List style properties There are 2 types of lists ...

Typora code block color matching and title serial number implementation code

Effect: The title has its own serial number, the ...

Problems and pitfalls of installing Mysql5.7.23 in Win10 environment

I read many tutorials, but found that I could nev...

HTML Tutorial: title attribute and alt attribute

XHTML is the basis of CSS layout. jb51.net has al...

Vue implements pull-down to load more

Developers familiar with Element-UI may have had ...

Detailed explanation of the use of the <meta> tag in HTML

In the web pages we make, if we want more people ...

How to configure MySQL scheduled tasks (EVENT events) in detail

Table of contents 1. What is an event? 2. Enable ...