Dynamic route matching refresh page

the matching of child routes is as follows:
"compare/:compare",

pass path: / ${this.username} / ${this.reponame} / pulls/compare/$ {this.repo.default_branch}. ${this.repo.default_branch}

the browser address bar shows: http://localhost:8080/u177841/resetdb/pulls/compare/master.master, the page opens normally, and the route: compare matches" master.master".

but the path cannot be found after F5 refresh. Error: Cannot GET / u177841/resetdb/pulls/compare/master.master is reported. In addition, I also found that dynamic paths matched with * also have this problem. What is the reason, please? I checked the params in currentRoute and found nothing wrong with the parameters, except for.

Mar.20,2021

are you using vue-router 's history mode? This pattern requires back-end cooperation to match all routes

Menu