From ce8356433579c292b31b5f2f10cb94c5ad265780 Mon Sep 17 00:00:00 2001 From: chenghongxing <1126263215@qq.com> Date: Sat, 8 May 2021 20:41:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E5=BC=82=E6=AD=A5?= =?UTF-8?q?=E8=B7=AF=E7=94=B1=E9=83=A8=E5=88=86=E9=85=8D=E7=BD=AE=E4=B8=8D?= =?UTF-8?q?=E7=94=9F=E6=95=88=E9=97=AE=E9=A2=98=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/routerUtil.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/utils/routerUtil.js b/src/utils/routerUtil.js index d16a873..ae0741e 100644 --- a/src/utils/routerUtil.js +++ b/src/utils/routerUtil.js @@ -62,6 +62,11 @@ function parseRoutes(routesConfig, routerMap) { query: routeCfg.query, ...routeCfg.meta } + Object.keys(cfgMeta).forEach(key => { + if (cfgMeta[key] === undefined || cfgMeta[key] === null || cfgMeta[key] === '') { + delete cfgMeta[key] + } + }) Object.assign(meta, cfgMeta) const route = { path: routeCfg.path || router.path || routeCfg.router,