How does the query parameter in vue relate to the filtering form Synchronize

has a filter form, which is bound to filter , and watch listener calls
this.$router.push ({query:this.filter}) whenever there is a change, reflecting the filter parameters into the url parameter. When opening the URL such as / aquib , the query parameter is reflected on the filter form.

so it falls into an endless cycle,

filter will affect query
query will affect filter

the final filter parameters are subject to url

initial use of vuex, does not need to show filter conditions, no problem. Now it is required to display filter conditions in url mode.
is a bit confused. How to avoid this endless cycle?

Mar.18,2021

how does it end up in an endless loop? Do not understand how you operate;
use computed to calculate query parameters, enter the page to get data according to the parameters, and then use beforeRouteUpdate to get data when the route (parameter) is changed.


url adds a parameter as a distinction, for example: type:0 / / 1 represents the entry from the outside, and 2 represents the

added to the form.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b323d3-2be05.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b323d3-2be05.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?