diff --git a/lerna.json b/lerna.json index 0af0cb90..acfa9696 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.0.0", + "version": "independent", "changelog": { "repo": "WeBankFinTech/fes.js", "cacheDir": ".changelog", diff --git a/packages/fes-preset-built-in/src/plugins/misc/route/template/routes.tpl b/packages/fes-preset-built-in/src/plugins/misc/route/template/routes.tpl index 1d89a137..e6a6c6aa 100644 --- a/packages/fes-preset-built-in/src/plugins/misc/route/template/routes.tpl +++ b/packages/fes-preset-built-in/src/plugins/misc/route/template/routes.tpl @@ -3,13 +3,6 @@ import { plugin } from '@@/core/coreExports'; export function getRoutes() { const routes = {{{ routes }}}; - - plugin.applyPlugins({ - key: 'patchRoutes', - type: ApplyPluginsType.event, - args: { routes }, - }); - return routes; } @@ -28,7 +21,13 @@ export const createRouter = (routes) => { }, initialValue: {{{ CREATE_HISTORY }}}, }); - history = createHistory(ROUTER_BASE) + history = createHistory(ROUTER_BASE); + // 修改routes + plugin.applyPlugins({ + key: 'patchRoutes', + type: ApplyPluginsType.event, + args: { routes }, + }); router = createVueRouter({ history, routes