mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-11-18 06:33:42 +08:00
fix(projects): Fix secondary directory components is empty
This commit is contained in:
@@ -15,11 +15,11 @@ export function getLayoutAndPage(component?: string | null) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getLayout(layout: string) {
|
function getLayout(layout: string) {
|
||||||
return layout.startsWith(LAYOUT_PREFIX) ? layout.replace(LAYOUT_PREFIX, '') : '';
|
return layout?.startsWith(LAYOUT_PREFIX) ? layout.replace(LAYOUT_PREFIX, '') : '';
|
||||||
}
|
}
|
||||||
|
|
||||||
function getPage(page: string) {
|
function getPage(page: string) {
|
||||||
return page.startsWith(VIEW_PREFIX) ? page.replace(VIEW_PREFIX, '') : '';
|
return page?.startsWith(VIEW_PREFIX) ? page.replace(VIEW_PREFIX, '') : '';
|
||||||
}
|
}
|
||||||
|
|
||||||
export function transformLayoutAndPageToComponent(layout: string, page: string) {
|
export function transformLayoutAndPageToComponent(layout: string, page: string) {
|
||||||
|
|||||||
Reference in New Issue
Block a user