forked from opentiny/tiny-engine
parent
fec563dda3
commit
fd164a1cd2
|
@ -86,11 +86,17 @@ export default {
|
||||||
.map((name) => fetchBlockSchema(name))
|
.map((name) => fetchBlockSchema(name))
|
||||||
|
|
||||||
const schemaList = await Promise.allSettled(promiseList)
|
const schemaList = await Promise.allSettled(promiseList)
|
||||||
|
const extraList = []
|
||||||
|
|
||||||
schemaList.forEach((item) => {
|
schemaList.forEach((item) => {
|
||||||
if (item.status === 'fulfilled' && item.value?.[0]?.content) {
|
if (item.status === 'fulfilled' && item.value?.[0]?.content) {
|
||||||
res.push(item.value[0].content)
|
res.push(item.value[0].content)
|
||||||
res.push(...getBlocksSchema(item.value[0].content, blockSet))
|
extraList.push(getBlocksSchema(item.value[0].content, blockSet))
|
||||||
|
}
|
||||||
|
})
|
||||||
|
;(await Promise.allSettled(extraList)).forEach((item) => {
|
||||||
|
if (item.status === 'fulfilled' && item.value) {
|
||||||
|
res.push(...item.value)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -136,11 +142,10 @@ export default {
|
||||||
},
|
},
|
||||||
...(blocks || []).map((blockSchema) => {
|
...(blocks || []).map((blockSchema) => {
|
||||||
return {
|
return {
|
||||||
panelName: blockSchema.fileName,
|
panelName: `${blockSchema.fileName}.vue`,
|
||||||
panelValue:
|
panelValue:
|
||||||
genSFCWithDefaultPlugin(blockSchema, appData?.componentsMap || [], { blockRelativePath: './' }) || '',
|
genSFCWithDefaultPlugin(blockSchema, appData?.componentsMap || [], { blockRelativePath: './' }) || '',
|
||||||
panelType: 'vue',
|
panelType: 'vue'
|
||||||
index: true
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue