From 3e62642908006c4b98e12e5036798c7add02ed7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?rockywu=20=E5=90=B4=E4=BD=B3=E9=9B=B7?= Date: Wed, 18 Apr 2018 15:20:37 +0800 Subject: [PATCH] add extendRoutes Support for meta properties --- lib/app/router.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/app/router.js b/lib/app/router.js index 3731d6169d..c07a1bc957 100644 --- a/lib/app/router.js +++ b/lib/app/router.js @@ -10,6 +10,7 @@ import Router from 'vue-router' res += tab + '\tpath: ' + JSON.stringify(route.path) res += (route.component) ? ',\n\t' + tab + 'component: ' + (splitChunks.pages ? route._name : `() => ${route._name}.default || ${route._name}`) : '' res += (route.redirect) ? ',\n\t' + tab + 'redirect: ' + JSON.stringify(route.redirect) : '' + res += (route.meta) ? ',\n\t' + tab + 'meta: ' + JSON.stringify(route.meta) : '' res += (route.name) ? ',\n\t' + tab + 'name: ' + JSON.stringify(route.name) : '' res += (route.children) ? ',\n\t' + tab + 'children: [\n' + recursiveRoutes(routes[i].children, tab + '\t\t', components) + '\n\t' + tab + ']' : '' res += '\n' + tab + '}' + (i + 1 === routes.length ? '' : ',\n')