admin-vben/src/router/constant.ts

25 lines
550 B
TypeScript
Raw Normal View History

2023-03-18 13:10:54 +00:00
export const REDIRECT_NAME = 'Redirect'
export const PARENT_LAYOUT_NAME = 'ParentLayout'
export const PAGE_NOT_FOUND_NAME = 'PageNotFound'
2023-03-18 13:42:23 +00:00
export const EXCEPTION_COMPONENT = () => import('@/views/base/exception/Exception.vue')
2023-03-18 13:10:54 +00:00
/**
* @description: default layout
*/
export const LAYOUT = () => import('@/layouts/default/index.vue')
/**
* @description: parent-layout
*/
2023-07-29 10:46:43 +00:00
export function getParentLayout(_name?: string) {
2023-03-18 13:10:54 +00:00
return () =>
new Promise((resolve) => {
resolve({
2023-07-29 10:46:43 +00:00
name: _name || PARENT_LAYOUT_NAME,
2023-03-18 13:10:54 +00:00
})
})
}