Path in this. $router. Push() method cannot be used with params, otherwise params will be invalid!!
This. $router.push can pass parameters in two ways:
The first one is the first one
Pass parameters -- this.$router.push({path: ' route ', query: {key: value}})
Parameter fetch -- this.$route.query.key
With this approach, the passed parameters are spliced after the route and appear in the address bar.
Second:
Passing parameters -- this.$router.push({name: ' name of route ', params: {key: value}})
Parameters take values -- this.$route.params.key
With this approach, the parameters are not spliced behind the route and are not visible on the address bar...
Dynamic routing also passes params, so in this. $router. Push() method, path cannot be used with params, otherwise params will be invalid. You need name to specify the page.
[access through the name attribute of routing configuration]
Read More:
- How to distinguish the source channel of router.push jump fast application
- nvalid default value for prop “params“: Props with type Object/Array must use a factory function to
- Samba shared server cannot be accessed and the path cannot be found
- Vue router click the menu bar and the same module reports an error Vue router.esm.js? 2215:2065 Uncaught (in promise) Error
- After introducing sass into Vue project, start to report error typeerror [err]_ INVALID_ ARG_ Type]: the “path” argument must be of type string
- Typeerror: write() argument must be STR, not bytes and the method of writing binary file in Python 3
- Typeerror: write() argument must be STR, not bytes and the method of writing binary file in Python 3
- The intent solution cannot be updated in onrestart method
- ClobberError: The package ‘xxx‘ cannot be installed due to a path collision for ‘xx‘ This path alre
- Wrong path to add PCH file. Apple llvm 9.0 – language cannot be found in the new project
- To solve problems in cmake VTK: error configuration process, project files may be invalid
- windows CMake error: error in configuration process, project files may be invalid
- Problems in compiling VTK with cmake: solutions to error configuration process, project files may be invalid
- Error in configuration process, project files may be invalid in cmake compilation
- Report error when using microwave “must either be declared abstract” abstract method “getWXPayDomain()” in WXPayConfig
- To solve the problem in Windows opencv installation: error configuration process, project files may be invalid
- Error configuration process and project file may be invalid appear in cmake compilation
- Error resolution-“Error in configuration process, project files may be invalid” appears when Cmake compiles openCV
- Solution: when cmake is compiled, “error in configuration process project files may be invalid” appears