Skip to content

Commit

Permalink
feat(projects): add default customRoutes map
Browse files Browse the repository at this point in the history
  • Loading branch information
honghuangdc committed Nov 7, 2023
1 parent 644d8b7 commit 9fa1ba6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/vue/src/core/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export function createPluginOptions(erOptions: ElegantRouterOption, options?: Pa
lazyImport: _name => true,
constDir: CONST_DIR,
customRoutes: {
map: CUSTOM_ROUTES_MAP,
map: {},
names: []
},
layouts: DEFAULT_LAYOUTS,
Expand All @@ -39,6 +39,11 @@ export function createPluginOptions(erOptions: ElegantRouterOption, options?: Pa
...options
};

opts.customRoutes.map = {
...CUSTOM_ROUTES_MAP,
...opts.customRoutes.map
};

if (!opts.layouts[opts.defaultLayout]) {
opts.defaultLayout = Object.keys(opts.layouts)[0];
}
Expand Down

0 comments on commit 9fa1ba6

Please sign in to comment.