How do I refresh the page data when nuxtjs switches routes?

switches like this. It"s all on this page, but the parameters are different later

<nuxt-link to="/test/abc?sq=2">test</nuxt-link>
<nuxt-link to="/test/abc?sq=1">test</nuxt-link>

whether it"s asyncData, or fetch. Or the mounted didn"t execute.
so the page cannot display different data based on the parameter sq,.

Mar.31,2021

watchQuery: ['id']


nuxt-link walks and is processed only in client. If you want to leave server, you can change to test , asyncData and others will trigger the execution of


.

< nuxt-link to= "/ test/abc?sq=2" > test < / nuxt-link >
< nuxt-link to= "/ test/abc?sq=1" > test < / nuxt-link >

correctly it should be watchQuery: ['sq'], and if the defined string changes, all component methods (asyncData, fetch, validate, layout,.) will be called.

the above is transferred from Haichang Wisdom www.hichannel.net


is uncomfortable, and that's what I'm doing right now. Or in mounted to determine whether the this.biz exists, there is no need to use the client call interface.


use watch,

export default {
       
        watch: {
            "$route": function(){
                //
            }
        },
        
    }
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-1c2fdb6-33421.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-1c2fdb6-33421.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?