Keyword Search for vue frontend processing listening

Source: Internet
Author: User

According to the business needs of components, sometimes the keyword is returned to the background for search, and the data is then returned to the frontend for rendering after processing in the background (multiple requests to the server ); sometimes the front-end obtains all the page data, and the front-end processes the keyword search (affects page loading)

In this article, I will introduce the second situation. We need to first understand the filter () and pair des () of es6 ()

Filter () method to create a new array. The elements in the new array are checked by all the elements that meet the conditions in the specified array. Empty array is not detected. Does not change the original array.

Array. Filter (function (currentvalue, index, arr), thisvalue)
Click to learn http://www.runoob.com/jsref/jsref-filter.html
Instance: 80756563

The pair des () method is used to determine whether an array or string contains a specified value. If it is true, false is returned.

  

Click to learn http://www.runoob.com/jsref/jsref-filter.html

Hahaha it's easy to know the two functions.

1. search bar

 

2. Search for the corresponding list (do not use underscores to name the class)

3. Listen in Watch (this. alloptions is where you have obtained all the data from the background for storage)

 

 

 

 

 

 

 


Keyword Search for vue frontend processing listening

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.