mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 14:15:13 +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 %>
|
||||
],
|
||||
<% if (router.parseQuery) { %>parseQuery: <%= serialize(router.parseQuery).replace('parseQuery(', 'function(') %>,<% } %>
|
||||
<% if (router.stringifyQuery) { %>stringifyQuery: <%= serialize(router.stringifyQuery).replace('stringifyQuery(', 'function(') %>,<% } %>
|
||||
fallback: <%= router.fallback %>
|
||||
})
|
||||
}
|
||||
|
@ -274,6 +274,8 @@ Options.defaults = {
|
||||
linkExactActiveClass: 'nuxt-link-exact-active',
|
||||
extendRoutes: null,
|
||||
scrollBehavior: null,
|
||||
parseQuery: false,
|
||||
stringifyQuery: false,
|
||||
fallback: false
|
||||
},
|
||||
render: {
|
||||
|
Loading…
Reference in New Issue
Block a user