Under what circumstances will the value in the parmas of vue router be a string array? #2289
-
I saw in the documentation that the value of the RouteParams property may be an array, but I didn't find what would be the case. |
Beta Was this translation helpful? Give feedback.
Answered by
skirtles-code
Jul 3, 2024
Replies: 1 comment
-
For repeatable params. See https://router.vuejs.org/guide/essentials/route-matching-syntax.html#Repeatable-params. e.g.: const routes = [
// matches /one, /one/two, /one/two/three, etc.
{ path: '/:chapters+' },
// matches /, /one, /one/two, /one/two/three, etc.
{ path: '/:chapters*' },
] |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Bo-Teng
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For repeatable params. See https://router.vuejs.org/guide/essentials/route-matching-syntax.html#Repeatable-params.
e.g.: