fix: 修改类型报错

This commit is contained in:
MTrun
2022-03-07 15:21:45 +08:00
parent 5b14e3a70f
commit f8785a4505
13 changed files with 43 additions and 27 deletions
+10 -9
View File
@@ -10,15 +10,16 @@ import { CreateComponentType } from '@/packages/index.d'
* @param app
*/
export const setupPreviewPackages = (app: App) => {
if(!document.location.hash.includes('preview')) return
const localStorageInfo = getLocalStorageInfo()
if(!localStorageInfo) return
localStorageInfo.componentList.forEach(async (e: CreateComponentType) => {
if (!app.component(e.key)) {
const chart = fetchChartComponent(e.chartConfig)
app.component(e.key, chart)
}
})
if (document.location.hash.includes('preview')) {
const localStorageInfo = getLocalStorageInfo()
if (!localStorageInfo) return
localStorageInfo.componentList.forEach(async (e: CreateComponentType) => {
if (!app.component(e.key)) {
const chart = fetchChartComponent(e.chartConfig)
app.component(e.key, chart)
}
})
}
}
/**