|
@@ -10,8 +10,9 @@ import { CreateComponentType } from '@/packages/index.d'
|
|
|
* @param app
|
|
* @param app
|
|
|
*/
|
|
*/
|
|
|
export const setupPreviewPackages = (app: App) => {
|
|
export const setupPreviewPackages = (app: App) => {
|
|
|
|
|
+ if(!document.location.hash.includes('preview')) return
|
|
|
const localStorageInfo = getLocalStorageInfo()
|
|
const localStorageInfo = getLocalStorageInfo()
|
|
|
- if(!document.location.hash.includes('preview') || !localStorageInfo) return
|
|
|
|
|
|
|
+ if(!localStorageInfo) return
|
|
|
localStorageInfo.componentList.forEach(async (e: CreateComponentType) => {
|
|
localStorageInfo.componentList.forEach(async (e: CreateComponentType) => {
|
|
|
if (!app.component(e.key)) {
|
|
if (!app.component(e.key)) {
|
|
|
const chart = fetchChartComponent(e.chartConfig)
|
|
const chart = fetchChartComponent(e.chartConfig)
|