动态组件模式调整

This commit is contained in:
tangly1024.com
2024-11-18 18:10:18 +08:00
parent ab2129464f
commit 21d9bc03f7
22 changed files with 294 additions and 121 deletions

View File

@@ -38,6 +38,16 @@ export const getGlobalLayoutByTheme = themeQuery => {
}
}
/**
* 动态获取布局
* @param {*} props
*/
export const DynamicLayout = props => {
const { router, theme } = props
const SelectedLayout = getLayoutByTheme({ router, theme })
return <SelectedLayout {...props} />
}
/**
* 加载主题文件
* 如果是