mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-11-17 22:23:42 +08:00
setupElegantRouter add env parameters
For cancel ElegantRouter generate.
This commit is contained in:
@@ -2,7 +2,11 @@ import type { RouteMeta } from 'vue-router';
|
|||||||
import ElegantVueRouter from '@elegant-router/vue/vite';
|
import ElegantVueRouter from '@elegant-router/vue/vite';
|
||||||
import type { RouteKey } from '@elegant-router/types';
|
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({
|
return ElegantVueRouter({
|
||||||
layouts: {
|
layouts: {
|
||||||
base: 'src/layouts/base-layout/index.vue',
|
base: 'src/layouts/base-layout/index.vue',
|
||||||
|
|||||||
Reference in New Issue
Block a user