Change $route, in vue but watch$route fails?

`

methods: {
    change(){
        this.$route.params.data1 = 1;
        // setwatch$route
        // this.$set(this.$route.params, data1, 1);
    }
},
watch: {
    $route: {
      handler(newName, oldName) {
        console.log("$route has changed");
      },
      deep: true
}  

`
when the change event is triggered, you can observe in vue-tool that the params data in $route in data does change, but still watch does not see a change in $route. Excuse me, what is the situation? (and console shows that $route really doesn"t have a _ _ ob__ attribute, even if you call this.$set () manually. )-sharp-sharp-sharp problem description

the environmental background of the problems and what methods you have tried

related codes

/ / Please paste the code text below (do not replace the code with pictures)

what result do you expect? What is the error message actually seen?

May.22,2021
Menu