mirror of
https://gitee.com/dromara/go-view.git
synced 2026-04-23 00:00:12 +08:00
feat: 动态注册组件,优化首页出现性能
This commit is contained in:
+1
-11
@@ -17,16 +17,6 @@ let packagesList: PackagesType = {
|
||||
[PackagesCategoryEnum.DECORATES]: DecorateList
|
||||
}
|
||||
|
||||
// * 注册
|
||||
const packagesInstall = (app: App): void => {
|
||||
for (const item in packagesList) {
|
||||
const chartList: ConfigType[] = (packagesList as any)[item]
|
||||
chartList.forEach((chart: ConfigType) => {
|
||||
app.component(chart.key, chart.node)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* * 获取目标拖拽组件信息
|
||||
* @param dropData
|
||||
@@ -38,4 +28,4 @@ const createComponent = async (dropData: ConfigType) => {
|
||||
return new chart.default()
|
||||
}
|
||||
|
||||
export { packagesList, packagesInstall, createComponent }
|
||||
export { packagesList, createComponent }
|
||||
|
||||
Reference in New Issue
Block a user