mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 22:25:12 +00:00
Merge pull request #2100 from clarkdo/route_parseQuery
feat: add parseQuery and stringifyQuery for router
This commit is contained in:
commit
de2b0a6d56
@ -60,6 +60,8 @@ export function createRouter () {
|
|||||||
routes: [
|
routes: [
|
||||||
<%= _routes %>
|
<%= _routes %>
|
||||||
],
|
],
|
||||||
|
<% if (router.parseQuery) { %>parseQuery: <%= serialize(router.parseQuery).replace('parseQuery(', 'function(') %>,<% } %>
|
||||||
|
<% if (router.stringifyQuery) { %>stringifyQuery: <%= serialize(router.stringifyQuery).replace('stringifyQuery(', 'function(') %>,<% } %>
|
||||||
fallback: <%= router.fallback %>
|
fallback: <%= router.fallback %>
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -274,6 +274,8 @@ Options.defaults = {
|
|||||||
linkExactActiveClass: 'nuxt-link-exact-active',
|
linkExactActiveClass: 'nuxt-link-exact-active',
|
||||||
extendRoutes: null,
|
extendRoutes: null,
|
||||||
scrollBehavior: null,
|
scrollBehavior: null,
|
||||||
|
parseQuery: false,
|
||||||
|
stringifyQuery: false,
|
||||||
fallback: false
|
fallback: false
|
||||||
},
|
},
|
||||||
render: {
|
render: {
|
||||||
|
Loading…
Reference in New Issue
Block a user