实现pagetype的sidebar按照app优先级覆盖
This commit is contained in:
parent
b06109f675
commit
e4df592b82
@ -133,7 +133,7 @@ for (const k of Object.keys(coreIndex)) sortEntries(coreIndex[k])
|
|||||||
|
|
||||||
// 解析侧栏面板组件:优先 entity 下的视图 panel,其次核心路径 panel
|
// 解析侧栏面板组件:优先 entity 下的视图 panel,其次核心路径 panel
|
||||||
export async function resolveSidebarPanel(entity: string, compName: string): Promise<any | null> {
|
export async function resolveSidebarPanel(entity: string, compName: string): Promise<any | null> {
|
||||||
const entityKey = String(entity).toLowerCase().replace(/-/g, '_')
|
const entityKey = String(entity).toLowerCase().replace(/[-\s]/g, '_')
|
||||||
const name = compName.endsWith('.vue') ? compName : `${compName}.vue`
|
const name = compName.endsWith('.vue') ? compName : `${compName}.vue`
|
||||||
let bucket = viewIndex[`${entityKey}:${name}`]
|
let bucket = viewIndex[`${entityKey}:${name}`]
|
||||||
if ((!bucket || bucket.length === 0)) {
|
if ((!bucket || bucket.length === 0)) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user