Search logic implementation
Search for your city based on the characters you enter.
- First pass the data needed by the search bar from the parent component.
- Bind our input box
- First set the data to an empty string, then listen to the bound keyword, and add a timer to it to limit the current. The basic idea is to traverse and load the string into the list if it is found
- Traverse the list and display the searched cities.
- A calculation attribute is set, and if the search fails, it will display "No matching data found"