This commit is contained in:
张成
2025-11-13 11:42:24 +08:00
parent 2066796977
commit ae36d6da81
3 changed files with 10 additions and 2 deletions

View File

@@ -44,6 +44,7 @@ class AdminFramework {
this.config = {}
this.store = null
this.router = null
this.HomePage = pages.HomePage // 默认使用框架内置的 HomePage
this.tools = tools
this.uiTool = uiTool
@@ -93,6 +94,7 @@ class AdminFramework {
* @param {String} config.apiUrl - API base URL
* @param {String} config.uploadUrl - upload URL (可选,默认为 apiUrl + 'upload')
* @param {Object} config.componentMap - custom component map (optional)
* @param {Component} config.HomePage - custom home page component (optional)
* @param {Function} config.onReady - callback when app is ready (optional)
* @returns {Object} Vue instance
*/
@@ -102,6 +104,11 @@ class AdminFramework {
config.uploadUrl = config.apiUrl + (config.apiUrl.endsWith('/') ? 'upload' : '/upload')
}
// 如果提供了自定义 HomePage使用自定义的否则使用默认的
if (config.HomePage) {
this.HomePage = config.HomePage
}
// 设置配置
this.config = config