Search no data to solve the problem after tabbed browsing (VUE + element-ui)

The development process found: Navigate to the second page. When the query data, background data returned is empty. The reason is: the current page is the second page. Sending a request to the background so pageNumber = 2, when pageNumber = 1. You can check the data.

Therefore, when the request data, determines whether the search box has a value, if the value, the current pageNumber = 1, the data can be normally find it -

There is the same problem when I remove the second page last piece of data, or stay on the second page, there is no data. So we can solve.

Guess you like

Origin www.cnblogs.com/JiAyInNnNn/p/10983234.html