From 99e714a49ec6aaaf128b7d519fdfcd5495571aaf Mon Sep 17 00:00:00 2001 From: henrydf Date: Wed, 27 Dec 2017 16:41:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=A9=E5=B1=95dymaicWrapper=EF=BC=8C?= =?UTF-8?q?=E9=98=B2=E6=AD=A2Model=E9=87=8D=E5=A4=8D=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E6=8A=A5=E9=94=99=20(#506)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 扩展dymaicWrapper,防止Model重复导入报错 * fix ci --- src/common/router.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/router.js b/src/common/router.js index 08b9dde3..612fee15 100644 --- a/src/common/router.js +++ b/src/common/router.js @@ -5,7 +5,8 @@ import { getMenuData } from './menu'; // wrapper of dynamic const dynamicWrapper = (app, models, component) => dynamic({ app, - models: () => models.map(m => import(`../models/${m}.js`)), + // eslint-disable-next-line no-underscore-dangle + models: () => models.filter(m => !app._models.some(({ namespace }) => namespace === m)).map(m => import(`../models/${m}.js`)), // add routerData prop component: () => { const p = component(); -- GitLab