mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-09-27 13:46:41 +08:00
setupElegantRouter add env parameters
For cancel ElegantRouter generate.
This commit is contained in:
parent
8545c4f436
commit
57b08081ca
@ -2,7 +2,11 @@ import type { RouteMeta } from 'vue-router';
|
||||
import ElegantVueRouter from '@elegant-router/vue/vite';
|
||||
import type { RouteKey } from '@elegant-router/types';
|
||||
|
||||
export function setupElegantRouter() {
|
||||
export function setupElegantRouter(viteEnv: Env.ImportMeta) {
|
||||
const { VITE_ELEGANT_ROUTER } = viteEnv;
|
||||
if (VITE_ELEGANT_ROUTER === 'N') {
|
||||
return false;
|
||||
}
|
||||
return ElegantVueRouter({
|
||||
layouts: {
|
||||
base: 'src/layouts/base-layout/index.vue',
|
||||
|
Loading…
Reference in New Issue
Block a user