1
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user